08.03.2013, 16:51
Hi i have this include https://sampforum.blast.hk/showthread.php?tid=403713 and i got told to add this is my gamemode for it to work
But when i try the headshot with sniper or Silenced it dosnt set health to 0.0 What am i doing wrong?
pawn Код:
public OnPlayerHeadshot(issuerid,playerid,weaponid)
{
if(GetPlayerWeapon(playerid) == 34) // 34 is the sniper ID
{
SetPlayerHealth(issuerid, 0.0);
printf(" player %d has been shot by player %d" , playerid, issuerid);
}
if(GetPlayerWeapon(playerid) == 23) // 23 is the silenced ID
{
SetPlayerHealth(issuerid, 0.0);
printf(" player %d has been shot by player %d" , playerid, issuerid);
}
return 1;
}