Raised This Month: $ Target: $400
 0% 

[Q.?] random_num


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
kketan77
Member
Join Date: Apr 2012
Location: India
Old 05-12-2012 , 22:39   Re: [Q.?] random_num
Reply With Quote #11

PHP Code:
public classmenu_handler(idmenuitem)
{   
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu);        
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
cs_reset_user_model(id)
            new 
CsTeams:team cs_get_user_team(id)
            if (
team == CS_TEAM_CT)
            {
                
cs_set_user_model (id"swatboy")
                
client_print(0print_chat"Your Class Set as 'SWATBOY'!")
            }
            else if (
team == CS_TEAM_T)
            {
                
cs_set_user_model (id"trxboy")
                
client_print(0print_chat"Your Class Set as 'TRXBOY'!")
            }
        }
        case 
2:
        {
            
cs_reset_user_model(id)
            new 
CsTeams:team cs_get_user_team(id)
            if (
team == CS_TEAM_CT)
            {
                
cs_set_user_model (id"swatgirl")
                
client_print(0print_chat"Your Class Set as 'SWATGIRL'!")
            }
            else if (
team == CS_TEAM_T)
            {
                
cs_set_user_model (id"trxgirl")
                
client_print(0print_chat"Your Class Set as 'TRXGIRL'!")
            }
        }
        case 
5:
        {
            
classmenu_handler(idmenurandom_num(12))
        }
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;

Tell me above code is correct or not?
__________________
♚ || -=[ḰḝṮẫṊ]=- || ᕙ(`▽´)ᕗ || (⊙.⊙(☉_☉)⊙.⊙) || ⁀⊙﹏☉⁀

Last edited by kketan77; 05-12-2012 at 22:47.
kketan77 is offline
Send a message via Yahoo to kketan77
 



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 00:29.


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