HEADshot :D
#1

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 .
PHP код:
public OnPlayerTakeDamage(playeridissueridFloatamountweaponidbodypart)
{
 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(issuerid5000);
   
GivePlayerScore(issuerid1);
   
PlayerPlaySound(playerid10520.00.00.0);
   
PlayerPlaySound(issuerid10520.00.00.0);
 } 
Reply
#2

Try this:
pawn Код:
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);
 }
Reply
#3

PHP код:
|| && c   // shit
(|| b) && // ok 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)