Results 1 to 3 of 3
  1. #1
    kratos 475's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0

    Post [Help] make text permanent on the screen

    in my script, very easy, but i have a problem:
    the text that i want to display disappear in a few minutes, how can i make it permanentely during the match??

    script:
    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Timers;
    using InfinityScript;
    
    namespace Myscript
    {
    
        public class My : BaseScript
        {
            public HudElem info;
    
    
            public override void OnPlayerDamage(Entity player, Entity inflictor, Entity attacker, int damage, int dFlags, string mod, string weapon, Vector3 point, Vector3 dir, string hitLoc)
            {
                info.SetText("\r\r");
                if (mod == "MOD_FALLING" || damage != 0 || player.Health > 0)
                {
    
                    info.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 0);
                    info.HideWhenInMenu = true;
                    info.SetText("^2Health: " + player.Health + "\n^1Damage: " + damage);
                }
            }
    
            public My()
                : base()
            {
                info = HudElem.CreateServerFontString("hudsmall", 0.7f);
                info.SetPoint("BOTTOMLEFT", "BOTTOMLEFT", 10, -120);
                info.HideWhenInMenu = false;
                info.SetText("^1Server & Plugin ^5By ^8Peppe PE");
            }
        }
    }
    p.s. i'm noob in programming.

  2. #2
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,417
    Reputation
    611
    Thanks
    11,989
    My Mood
    Cheerful
    Code:
    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.Timers;
    using System.Threading;
    using InfinityScript;
    
    namespace Myscript
    {
        int interval = 0; //In seconds
        int max = 0; //In seconds
        public class My : BaseScript
        {
            public HudElem info;
    
            public override void OnPlayerDamage(Entity player, Entity inflictor, Entity attacker, int damage, int dFlags, string mod, string weapon, Vector3 point, Vector3 dir, string hitLoc)
            {
                info.SetText("\r\r");
                if (mod == "MOD_FALLING" || damage != 0 || player.Health > 0)
                {
                    info.SetPoint("TOPRIGHT", "TOPRIGHT", -10, 0);
                    info.HideWhenInMenu = true;
                    for(int i = 0; i <= max; i++)
                    {
                    info.SetText("^2Health: " + player.Health + "\n^1Damage: " + damage); 
                    Thread.Sleep(interval * 1000);
                    }            
                 }
            }
    
            public My()
                : base()
            {
                info = HudElem.CreateServerFontString("hudsmall", 0.7f);
                info.SetPoint("BOTTOMLEFT", "BOTTOMLEFT", 10, -120);
                info.HideWhenInMenu = false;
                info.SetText("^1Server & Plugin ^5By ^8Peppe PE");
            }
        }
    }
    You have to change interval & max variables.
    This will write same text every [interval] seconds.
    Last edited by Lovroman; 08-14-2013 at 06:13 AM.

  3. #3
    kratos 475's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Posts
    7
    Reputation
    10
    Thanks
    0
    thank you..
    where can i found all functions to write script?
    how can i count kill of a player?

Similar Threads

  1. [Help Request] scrolling text bar at the bottom of the screen - question
    By Twizzy in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 1
    Last Post: 02-20-2012, 06:12 PM
  2. [Need Help]Get the screen resolution
    By larta in forum WarRock Hack Source Code
    Replies: 6
    Last Post: 11-30-2010, 12:34 PM
  3. here is the screen shot that how to make moneyto buy vip hack
    By traechiwt in forum CrossFire Hacks & Cheats
    Replies: 7
    Last Post: 02-07-2010, 04:55 AM
  4. here is the screen shot that how to make money
    By aiajfirkkk in forum CrossFire Hacks & Cheats
    Replies: 4
    Last Post: 02-06-2010, 04:54 AM
  5. How to fix hacks making the screen Half-Size
    By aaronsxc in forum Combat Arms Hacks & Cheats
    Replies: 61
    Last Post: 07-01-2009, 05:34 PM