One Hit KO?
#1

Hi guys,
I'm making a Sniper-only gamemode,
and I like to know how I can make the knife (only the knife!) can kill somebody with one hit.
Somebody can help me?
ty
Reply
#2

1 easy thing i know:
OnPlayerConnect:
Код:
GivePlayerHealth(playerid, 1.0);
Than, by all things what happen, he is death :P

Another function doesn't exists i think, but maybe another people know a function.
Reply
#3

Quote:
Originally Posted by Remi-X
1 easy thing i know:
OnPlayerConnect:
Код:
GivePlayerHealth(playerid, 1.0);
Than, by all things what happen, he is death :P

Another function doesn't exists i think, but maybe another people know a function.
Yea, but then he can get killed by every other weapon too :P
Reply
#4

You'd need to find the function (I don't remember the name) that gets the distance between players and give the closest player to the player with the knife 1 health point.
Reply
#5

Quote:
Originally Posted by pıʞoɹʎd
You'd need to find the function (I don't remember the name) that gets the distance between players and give the closest player to the player with the knife 1 health point.
GetClosestPlayer by Sacky, I think
Reply
#6

Quote:
Originally Posted by pıʞoɹʎd
You'd need to find the function (I don't remember the name) that gets the distance between players and give the closest player to the player with the knife 1 health point.
mm, that's not going to help cause the closest player can be far away from that player with the knife
thx anyway
Is there any function that can check if the player's being hit by a weapon?
Reply
#7

Quote:
Originally Posted by Exquiza
Is there any function that can check if the player's being hit by a weapon?
No, You can only check if there health decreases.
Reply
#8

No wait, i think that i can made something. Moment please
Reply
#9

Quote:
Originally Posted by Remi-X
No wait, i think that i can made something. Moment please
Great
Quote:
Originally Posted by On_Top_Non_Stop
Quote:
Originally Posted by Exquiza
Is there any function that can check if the player's being hit by a weapon?
No, You can only check if there health decreases.
Mmm, I saw it was possible in MTA :/
Reply
#10

Hmm, problem now. I must made something like this:
If A is 1 more, or 1 less than B, something will happen. How can i made that?

And i think that i'm going to release the script if its ready, if you got no problem with that. Because i like it :P
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)