Problem with HeadShot script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Problem with HeadShot script (
/showthread.php?tid=567828)
Problem with HeadShot script -
HailPutin - 16.03.2015
Well im trying to make a headshot script but I want it to work only if players doesn't have armour.
Here is the code if I remove the armour thing, headshots work but with doesn't why ?
Код:
if(issuerid != INVALID_PLAYER_ID)
{
new Float:armour;
GetPlayerArmour(issuerid,armour);
if(GetPlayerTeam(issuerid) != GetPlayerTeam(playerid) && armour < 0.0)
{
if((weaponid == 34 || weaponid == 33) && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
GameTextForPlayer(issuerid, "~r~Headshot!", 3000, 4);
GameTextForPlayer(playerid, "~r~Headshot!", 3000, 4);
}
else return PlayerPlaySound(issuerid,17802,0.0,0.0,0.0);
}else {GameTextForPlayer(issuerid, "~w~don't shoot team mates", 3000, 4);}
}
return 1;
Re: Problem with HeadShot script -
Matess - 16.03.2015
Armour can't be negative so change
to
Re: Problem with HeadShot script -
HailPutin - 16.03.2015
Tyyy +rep