I have this:
PHP Code:
register_clcmd("say /random", "cmd_random")
PHP Code:
public cmd_random(player)
{
new players[32], num, player;
get_players( players, num, "a" );
for( new i = 0; i < num; i++ )
{
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.