AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random CT die (https://forums.alliedmods.net/showthread.php?t=143506)

Tonda 11-20-2010 19:14

Random CT die
 
Hi i have script:

Code:

public ct()
 {
        static players[32], pnum;
        get_players(players, pnum, "ae", "CT");
        if(pnum>0)
        random_ct(players[ random(pnum) ]);
       
 }

and

Code:

public random_ct(id){
user_silentkill(id);
}

If i set command to say /kill - random CT will be dead. But if i set task, all players on the server are dead (CT and T) ...
Why ? I need only one CT die.

Exolent[jNr] 11-20-2010 20:16

Re: Random CT die
 
Show how you used set_task().

Tonda 11-21-2010 04:31

Re: Random CT die
 
set_task(8.0, "ct");

Exolent[jNr] 11-21-2010 09:37

Re: Random CT die
 
That should still only kill 1 player.

Tonda 11-21-2010 16:42

Re: Random CT die
 
Realy no, kill all players :(

Exolent[jNr] 11-21-2010 16:58

Re: Random CT die
 
Show full code.


All times are GMT -4. The time now is 11:22.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.