Results 1 to 5 of 5

Thread: emp scrpt

  1. #1
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts

    emp scrpt

    who have script EMP to share
    Electromagnetic pulse

    emp for 20sec = player dont have weapon
    disableweapon

  2. #2
    Sergeant EvoloZz's Avatar
    Join Date
    Sep 2012
    Location
    Helsinki, Finland
    Posts
    360
    Thanks
    314
    Thanked 167 Times in 120 Posts
    The player wont have weapon or damage is disabled?

  3. The Following User Says Thank You to EvoloZz For This Useful Post:

    kung foo man (28th March 2013)

  4. #3
    Private First Class Earliboy's Avatar
    Join Date
    Nov 2012
    Location
    Germany
    Posts
    130
    Thanks
    5
    Thanked 88 Times in 61 Posts
    Something like this?
    (Credit me if u use it)
    Code:
    emp()
    {
           iprintlnBold("EMP!!");
           players = getEntArray("player","classname");
           for(i = 0; i < players.size; i++)
           {
                   if(isDefined(players[i]))
                         players[i] disableWeapon();
           }
            wait 20;
           for(i = 0; i < players.size; i++)
           {
                   if(isDefined(players[i]))
                            players[i] enableWeapon();
            }
    }
    No ... No ... this is not possible .......

  5. The Following 2 Users Say Thank You to Earliboy For This Useful Post:

    EvoloZz (28th March 2013),kung foo man (28th March 2013)

  6. #4
    Private First Class
    Join Date
    Feb 2013
    Posts
    201
    Thanks
    4
    Thanked 10 Times in 7 Posts
    earliboy, if i use emp and kill zombies, zombie will not have a weapon on spawn ?
    Last edited by malyczolg; 29th March 2013 at 07:35.

  7. The Following User Says Thank You to malyczolg For This Useful Post:

    kung foo man (29th March 2013)

  8. #5
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    PHP Code:
    emp(time)
    {
        for(; 
    time 0time -= 0.05)
        {
            
    players getentarray("player""classname");
            for(
    0players.sizei++)
                
    players[ithread doemp(time);
            
    wait 0.05;
        }
    }

    doemp(time)
    {
        if(!
    isdefined(self.sessionstate) || self.sessionstate != "playing")
        {
            
    self.inemp undefined;
            return;
        }
        if(
    isdefined(self.inemp))
            return;
        
    self.inemp true;
        
    self disableweapon();
        
    wait time;
        if(
    isdefined(self))
        {
            
    self.inemp undefined;
            if(
    isdefined(self.sessionstate) && self.sessionstate == "playing")
                
    self enableweapon();
        }

    This script should keep monitoring players while emp-ing.
    Call it once, as a thread with the time in seconds as its argument.

  9. The Following User Says Thank You to IzNoGoD For This Useful Post:

    kung foo man (29th March 2013)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •