Easy System Headshot -
lucotaku1 - 11.07.2014
I was bored, I made a simple eh headshot system.
WEAPONS:
Sniper Rifle
Rifle
CODE
pawn Код:
#include <a_samp>
new name[MAX_PLAYERS];
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33) && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
new stringa[80];
GetPlayerName(playerid, name, sizeof(name));
format(stringa, sizeof(stringa), "[ ! ]:[%s] He was killed by a shot to the head", name);
SendClientMessageToAll(0xFFFF00FF,stringa);
}
return 1;
}
IMAGES
I have no pictures because I could not test it with anyone. Later add images.
It tests if anyone who uploads a picture please.
Excuse my bad English
bye and have a good day
EDIT:bug fixed
Re: Easy System Headshot -
Inverse - 11.07.2014
With
0.3z, anybody can do it. You haven't really put any work into it.
Re: Easy System Headshot -
rockhopper - 11.07.2014
Good

And simple ...
Re: Easy System Headshot -
HitterHitman - 11.07.2014
Simple and nice..
Re: Easy System Headshot -
Battlezone - 11.07.2014
It has to be like this:
pawn Код:
#include <a_samp>
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
if(issuerid != INVALID_PLAYER_ID && (weaponid == 34 || weaponid == 33) && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
new stringa[MAX_PLAYER_NAME+40];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(stringa, sizeof(stringa), "[ ! ]:[%s] He was killed by a shot to the head", name);
SendClientMessageToAll(0xFFFF00FF,stringa);
}
return 1;
}
Re: Easy System Headshot -
rockhopper - 11.07.2014
error 025: function heading differs from prototype ? Getting error
Re: Easy System Headshot -
Inverse - 12.07.2014
^ Update the definition of OnPlayerGiveDamage and OnPlayerTakeDamage in all your includes and your script as well.
Re: Easy System Headshot -
FahadKing07 - 12.07.2014
Simple but good. I see you releasing many filterscripts. Its very nice. That what makes a guy HQ.
Keep it up bro
You would have received my REP but
I will give you rep later xD
Re: Easy System Headshot -
Rabea - 18.08.2014
How i can make it to all weapons i wont do weaponid == 1 to 50, is there any idea how i can make it in one line?
Re: Easy System Headshot -
DovFlaminggo - 25.08.2014
Good Filtersrcipt Dude (y)
Respuesta: Easy System Headshot -
Alej - 25.08.2014
Good job!
Re: Easy System Headshot -
Ryz - 11.09.2014
nice and easy
Re: Easy System Headshot -
xMx4LiFe - 17.10.2014
hhhmm nice