[FilterScript] Easy System Headshot
#1

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
Reply
#2

With 0.3z, anybody can do it. You haven't really put any work into it.
Reply
#3

Good And simple ...
Reply
#4

Simple and nice..
Reply
#5

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;
}
Reply
#6

error 025: function heading differs from prototype ? Getting error
Reply
#7

^ Update the definition of OnPlayerGiveDamage and OnPlayerTakeDamage in all your includes and your script as well.
Reply
#8

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
Reply
#9

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?
Reply
#10

Good Filtersrcipt Dude (y)
Reply
#11

Good job!
Reply
#12

nice and easy
Reply
#13

hhhmm nice
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)