03.12.2012, 21:44
hi guyz i made a command sd pistol as a tazer but my problem is everybody can use it if they have SD Pistol - ID 23
the tazer works even they are civillian
can anyone help me that it will only work for this teams
thanks to those who tried to help me + rep
the tazer works even they are civillian
can anyone help me that it will only work for this teams
pawn Код:
if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != TEAM_ARMY && gTeam[playerid] != TEAM_CIA)
pawn Код:
public OnPlayerShootPlayer(Shooter,Target,Float:HealthLost,Float:ArmourLost)
{
if(GetPlayerWeapon(Shooter) == 23)
{
new string[17+48], playerid;
TogglePlayerControllable(Target, true);
ApplyAnimation(Target,"CRACK","crckdeth2",4.1,1,1,1,1,1);
pTazed[Target] = 1;
tazetimer[Target] = SetTimerEx("Tazed", 10000, 0, "d", Target);
format(string, sizeof(string), "%s has been tazed by %s.", RemoveUnderScore(Target), RemoveUnderScore(Shooter));
ProxDetector(30.0, playerid, string, PURPLE,PURPLE,PURPLE,PURPLE,PURPLE);
return 1;
}
return 1;
}