SA-MP Forums Archive
Head Shot - 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: Head Shot (/showthread.php?tid=511320)



Head Shot - Trynda - 04.05.2014

How do i make head shot for sniper only?


Re: Head Shot - [..MonTaNa..] - 04.05.2014

Use the search button mate..

https://sampforum.blast.hk/showthread.php?tid=496120


Re: Head Shot - Trynda - 04.05.2014

Quote:
Originally Posted by [..MonTaNa..]
Посмотреть сообщение
lol, its Team Headshot system.

I have roleplay server


Re: Head Shot - Abagail - 04.05.2014

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if(bodypart == BULLET_HIT_TYPE_HEAD) {
SetPlayerHealth(playerid, 0.0);
new string[128];
format(string, sizeof(string), "HEAD-SHOT: %s has shot you in the head(weaponID %d)", GetName(issuerid) weaponid);
SendClientMessage(playerid, -1, string);
}
return 1;
}
Untested.


Re: Head Shot - Gill - 04.05.2014

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
    {
        SetPlayerHealth(playerid, 0.0);
        GameTextForPlayer(playerid, "~r~HEADSHOT!", 7000, 5); // Will display to the person who is killed.
        SendClilentMessage(issuerid, -1, " Headshot Kill!"); // Will display to the person who killed.
    }
    return 1;
}