PHP Code:
public plugin_init()
{
register_plugin("P.M","1.0","MasterKy")
register_event("DeathMsg", "EVENT_TakeDamage", "be")
RegisterHam(Ham_TakeDamage, "player", "EVENT_TakeDamage")
}
public EVENT_TakeDamage(id){
new iPlayers[ 32 ];
new iPlayerCount
get_players ( iPlayers , iPlayerCount , "a" , "CS_TEAM_T" );
if(iPlayerCount == 1){
}else
if(iPlayerCount == 2){
new CsTeams:userTeam = cs_get_user_team(id)
if(get_user_attacker(id)){
if(userTeam == CS_TEAM_T) {
cs_set_user_team(id,CS_TEAM_CT)
visivel(id)
ultimoPlayer()
modelPlayer()
}
}
}else{
cs_set_user_team(id,CS_TEAM_CT)
visivel(id)
contaPlayersTimes()
client_print(0,print_chat, "Hahaha. %s FOI PEGOOO!!!",id)
server_cmd("amx_execall spk misc/risamalo")
}
return PLUGIN_CONTINUE
}
It is an part of my plugin.
The terrorist player go to CT if he get attacked
If have only 2, it send 1 for CT and the last terrorist receive a CT Player Model.
When the last be attacked and killed, the game over.
but... THIS DONT WORK CORRECTLY
PHP Code:
if(iPlayerCount == 2){
and
PHP Code:
if(iPlayerCount == 1){
dont work!
Whats up?
plz help me!