16.03.2015, 21:57
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 ?
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;