Posts: 695
Threads: 141
Joined: Jan 2012
Reputation:
0
Hello,
I have this thing where the army can blow up the criminals with a missile...
How can i assign the kills to the player?
Thanks,
stormchaser206
Posts: 202
Threads: 18
Joined: Sep 2011
Reputation:
0
OnPlayerDeath?
I don't know actually, but under OnPlayerDeath, make a script with (killerid)?
Posts: 695
Threads: 141
Joined: Jan 2012
Reputation:
0
I know under OnPlayerDeath, but the code?
Posts: 202
Threads: 18
Joined: Sep 2011
Reputation:
0
Which type of missile is it?
RPG or HS Rocket?
Posts: 930
Threads: 7
Joined: Jul 2010
Reputation:
0
It really doesn't matter... they're both the same.
If you're trying to find out HOW to kill them, try using: CreateExplosion(X, Y, Z, Radius);
Or you could use SetPlayerHealth and set to 0 etc.
Posts: 218
Threads: 47
Joined: Apr 2011
Reputation:
0
Seeing as there is no way to actually relate the killer and the victim using native functions (For explosions at least) you would need to do the following:
Create a variable that would change depending on who send the missle, for example, if it is some kind of turret, you would need to find out who is firing the turret by declaring and using:
Firedturret = playerid;
Then you need to find out which player died using the reason code that Kitten gave you and in this you would find out which playerid used the turret and manually assign the kill to the players statistics.
This is a way of doing it with no code, if you need any more help just post what code you have that's relevant and I'll give you a hand.