Need script for headshot
#1

Hiye!

I saw a server with headshot kinda system ( script ).

So, if you shoot 1 in the head he dies ( 1 shot needed ) and a Message appears with HEADSHOT.

Do you have a script for this?

EDIT:

I have a problem,

I want to send a message to the killer so I use:

GameTextForPlayer(killerid,"~r~HEAD~y~SHOT",2000,3 );

But I get error...

I know I am noob so can you help me
Reply
#2

Be a little creative, use the Custom weapon damage tutorial, then set the damage for body parts to 0 except the head
Reply
#3

Okay thanks
Reply
#4

Can't figure it out You may have the script?
Reply
#5

How could you not be able to figure it out while ****** comes up with 21900 search-results?
Reply
#6

I saw one, but I don't know where to add the scripts.

Got it from here: https://sampforum.blast.hk/showthread.php?tid=558839
Reply
#7

Add this under the callback Public OnPlayerTakeDamage

if(issuerid != INVALID_PLAYER_ID && weaponid == 34 && bodypart == 9)
{
SetPlayerHealth(playerid, 0.0);
}
Reply
#8

You can read my tutorial how to detect / set up bodyparts in OnPlayerTakeDamage, once you got that set up, you can just SetPlayerHealth 0 if the bodypart hit was the head.
But if you want someone to give you a script instead, hire some scripter instead of requesting here.
EDIT: Nvm you made another post at the same time.
Reply
#9

OnPlayerTakeDamage use this callback,read wiki and you will find it
Reply
#10

FIXED!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)