PHP Code:
public plugin_init()
{
register_plugin(PLUG, VERS, AUTH);
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, "ae", "TERRORIST" );
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)
captured(id)
}
}
}else{
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)
captured(id)
client_print(0,print_chat, "Hahaha.A terrorist has been captured!!!",id)
server_cmd("amx_execall spk misc/risamalo")
}
}
}
return PLUGIN_CONTINUE
}
Hello!
this is my plugin but i have a problem

it send the TR player for CT if him be attacked.
I need it to send the terrorist
for CT if a CT shoot him, but do not want him to lose HP and do not want him(Terrorist) to go (to CT team) if a terrorist attack him.
Thanks for all!