24.11.2015, 11:34
hello samp . when player have helmet its working fine.but when player dont have helmet .and i shoot any player.
player dying instantly. if i shoot on lag or arms.. i mean headshot working on every part.i just want it for head
sorry for my bad english .
player dying instantly. if i shoot on lag or arms.. i mean headshot working on every part.i just want it for head
![Cheesy](images/smilies/biggrin.png)
PHP код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && gHelmet[playerid] == true) return GameTextForPlayer(issuerid,"~r~Player have helmet protection",5000,3);
if(issuerid != INVALID_PLAYER_ID && AntiSK[playerid] == 1) return 0;
if(weaponid == 34 || weaponid == 32 || weaponid == 31 || weaponid == 30 || weaponid == 29 || weaponid == 28 || weaponid == 27 || weaponid == 26 || weaponid == 24 || weaponid == 22 && issuerid != INVALID_PLAYER_ID && bodypart == 9)
{
SetPlayerHealth(playerid,0.0);
GameTextForPlayer(playerid,"~r~YOU GOT HEADSHOT~n~Type /buy To get Helmet",5000,3);
GivePlayerMoney(issuerid, 5000);
GivePlayerScore(issuerid, 1);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
PlayerPlaySound(issuerid, 1052, 0.0, 0.0, 0.0);
}