Raised This Month: $ Target: $400
 0% 

Need help!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RollerBlades
Senior Member
Join Date: Feb 2011
Location: Sweden
Old 06-23-2011 , 07:28   Need help!
Reply With Quote #1

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`??

Last edited by RollerBlades; 06-23-2011 at 08:51.
RollerBlades is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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