How to chek if player is connected and is in CT or T team?
PHP Code:
public CheckClientConnectedTeam(Client,Client2)
{
if(is_user_connected(Client) && get_user_team(Client) == CS_TEAM_T && is_user_connected(Client2) && get_user_team(Client2) == CS_TEAM_CT)
{
/*DO SOMETHING*/
client_print(0,3,"OK, ALL CLIENTS IS NOW CONNECTED, CONTINUE");
return PLUGIN_HANDLED;
}
else
{
/*DO SOMETHING ELSE*/
client_print(0,3,"LOL, WAIT FOR CLIENT CONNECT");
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
HTML Code:
Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright (c) 1997-2006 ITB CompuPhase, AMX Mod X Team
Warning: Tag mismatch on line 22
Warning: Tag mismatch on line 22
Header size: 244 bytes
Code size: 680 bytes
Data size: 252 bytes
Stack/heap size: 16384 bytes; estimated max. usage=780 cells (3120 bytes)
Total requirements: 17560 bytes
2 Warnings.
Done.
__________________