AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random Player Change (https://forums.alliedmods.net/showthread.php?t=117008)

mininova 01-28-2010 09:39

Random Player Change
 
PHP Code:

#include <cstrike>

new g_maxplayers

public plugin_init()
{
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
g_maxplayers get_maxplayers()
}

public 
event_round_start()
{
    new 
ronda_random
    ronda_random 
random_num(03)
    static 
successucces ronda_random
    
switch(succes)
    
    static 
id
    
for (id 1id <= g_maxplayersid++)
    {
        if (!
is_user_connected(id))
            return;
        
        if (
cs_get_user_team(id) && CS_TEAM_T)
            return;
        
        new 
variable
        variable 
random_num(01)
        static 
asd
        asd 
variable
        
switch(asd)
        {
            case 
1cs_set_user_team(idCS_TEAM_T)
        }
    }


As I do in this code for change, that of all TTs spend 4 to CT every round that is different to 4 CTs. And that is 100% fit to the Ramdom to 4CTS

Sorry my inglish


All times are GMT -4. The time now is 07:20.

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