AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help! (https://forums.alliedmods.net/showthread.php?t=159900)

RollerBlades 06-23-2011 07:28

Need help!
 
ok i made a menu and i need help here with random rewards

PHP Code:

public random_reward(wepmenu)
{
    static 
iplayer[32], playerCountid;
    
get_players(playerplayerCount"ah");
    
    static 
RandomNumRandomNum random_num(05);
    
    for ( 
0playerCounti++ )
    {
        
id player[i];
        
        if ( 
RandomNum == (2) )
        {
            
sh_give_weapon(idCSW_AWPtrue);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A AWP!");
            
menu_destroy(wepmenu);
        }
        else if ( 
RandomNum == (3) )
        {
            
sh_give_weapon(idCSW_FAMAStrue);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A FAMAS!");
            
menu_destroy(wepmenu);
        }
        else if ( 
RandomNum == (5) )
        {
            
sh_give_weapon(idCSW_SG552true);
            
client_print(idprint_chat"[AMXX] Congratulations! You Just Won A SG552!");
            
menu_destroy(wepmenu);
        }
        else {
            
client_print(idprint_chat"[AMXX] Better Luck Next Time");
            
menu_destroy(wepmenu);
            
cmd_menu(id//<<<< can i return to the menu without doing this?? just wanna know...
        
}
    }


ok, so can i stop the random looping when its not being used`??


All times are GMT -4. The time now is 23:26.

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