08.10.2012, 17:24
This post is my post in an other topic. I just recopied what I did.
Use OnPlayerGiveDamage
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
playerid = cop
damageid = tazed man
weaponid = tazer id
Something like this:
Use OnPlayerGiveDamage
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage
playerid = cop
damageid = tazed man
weaponid = tazer id
Something like this:
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(GotTazer[playerid] == 1 && arrFaction[playerid][p_iMember] > 0)
{
TogglePlayerControllable(giveplayerid, 0);
format(string, sizeof(string), "*%s stuns %s with the tazer.", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);
}
return 1;
}