Last amount killed? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Last amount killed? (
/showthread.php?tid=530372)
Last amount killed? -
davve95 - 06.08.2014
Hi!
I'm creating a turfwar system (used checkpoints first time).
But now I want to create it when a player have killed a specific amount of players.
Like if kills > 5..
Might sound like a noobish question, but like said I used checkpoints first time..
And I have never seen a way to get a players latest kills.
Thansk!
Re: Last amount killed? -
ViniBorn - 06.08.2014
Using variable to store amout of kills and OnPlayerDeath, what is the problem?
Re: Last amount killed? -
Blademaster680 - 06.08.2014
Код:
new kills[MAX_PLAYERS] = 0;
public OnPlayerDeath(playerid, killerid, reason)
{
kills[killerid] ++;
return 1;
}
/*Something*/
if(kills[playerid] > 5)
{
}
This is just an example though on how you could go about doing this.

hope it helps
Re: Last amount killed? -
davve95 - 06.08.2014
Oh was it that easy! I got it thanks a lot!.
I know variables. But I thought you had to do it another way..