Raised This Month: $ Target: $400
 0% 

Not giving weapon!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
CarbonDioxide
Member
Join Date: Apr 2012
Old 06-14-2012 , 14:49   Not giving weapon!
Reply With Quote #1

I have this:
PHP Code:
register_clcmd("say /random""cmd_random"
PHP Code:
public cmd_random(player)
{    
    new 
players[32], numplayer;
    
get_playersplayersnum"a" );
    
    for( new 
0numi++ )
    {
        
player players[i];
        
        switch(
cs_get_user_team(player))
        {
            case 
CS_TEAM_T:
            {
                 
//Do some stuff   
            
}            
            case 
CS_TEAM_CT:
            {
                
//Some stuff
                
give_item(player"weapon_glock18");
            }
        }
    }

When the command is executed the terrorist part of the switch is executed without any problem, but the ct part just won't work for some reason. What am I doing wrong ?

*The function can only be excecuted when there is only one T alive, and only by this one T.

Last edited by CarbonDioxide; 06-14-2012 at 14:50.
CarbonDioxide is offline
 


Thread Tools
Display Modes

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 06:13.


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