Last amount killed?
#1

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

Using variable to store amout of kills and OnPlayerDeath, what is the problem?
Reply
#3

Код:
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
Reply
#4

Oh was it that easy! I got it thanks a lot!.

I know variables. But I thought you had to do it another way..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)