07.06.2014, 17:05
In Wiki samp it shows that it has all of these parameters
(playerid, issuerid, Float:amount, weaponid, bodypart)
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
but it always gave me this error: : error 025: function heading differs from prototype
So after fucking around I removed bodypart from the parameters and it worked.
My request is, is there a way to do a headshot script with OnPlayerTakeDamage like it showed in it's examples in wiki-samp ?
This is their example:
(playerid, issuerid, Float:amount, weaponid, bodypart)
https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
but it always gave me this error: : error 025: function heading differs from prototype
So after fucking around I removed bodypart from the parameters and it worked.
My request is, is there a way to do a headshot script with OnPlayerTakeDamage like it showed in it's examples in wiki-samp ?
This is their example:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart) { if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9) { // One shot to the head to kill with sniper rifle SetPlayerHealth(playerid, 0.0); } return 1; }