SA-MP Forums Archive
Help me - 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: Help me (/showthread.php?tid=532584)



Help me - krytans - 19.08.2014

I need script for one hit kill for hitman with sniper?

Could anyone help me?


Re: Help me - Threshold - 19.08.2014

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && issuerid != playerid) //If the player who issued it was not an invalid player or the player themself
    {
        if(weaponid == 34) SetPlayerHealth(playerid, 0.0); //Kill the player
    }
    return 1;
}
Sources:
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
https://sampwiki.blast.hk/wiki/SetPlayerHealth
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage


Re: Help me - krytans - 19.08.2014

Alright, How could i define that issuerid is hitman member ?


Re: Help me - Threshold - 19.08.2014

Well that depends... how do 'you' do it?

if(Hitman[issuerid] == 1) ?

I cannot tell you without seeing your script, or your variables at the least.


Re: Help me - krytans - 19.08.2014

PlayerInfo[playerid][pMember] == 8;

8 denotes HITMAN Faction


Re: Help me - MicroD - 19.08.2014

Код:
if(weaponid == 34 && PlayerInfo[issuerid][pMember] == 8) SetPlayerHealth(playerid, 0.0);