How would one make a spree system?
#5

Quote:
Originally Posted by RealCop228
Посмотреть сообщение
It took me 30 seconds to do this...

pawn Код:
new
    KillStreak[MAX_PLAYERS];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(killerid != INVALID_PLAYER_ID) KillStreak[killerid]++;
    else KillStreak[playerid] = 0;
   
    switch(KillStreak[killerid])
    {
        case 3: // do something, they have 3 kills
        case 7: // do something, they have 7 kills
        case 10: // do something, they have 10 kills
        case 20: // do something, they have 20 kills
    }
    return 1;
}
The player's kill streak will only be reset to 0 when they suicide. It should be reset for playerid every time they die, not just uf killerid is INVALID_PLAYER_ID.
Reply


Messages In This Thread
How would one make a spree system? - by DJTunes - 18.06.2013, 03:29
Re: How would one make a spree system? - by Songason - 18.06.2013, 03:40
Re: How would one make a spree system? - by DJTunes - 18.06.2013, 03:47
Re: How would one make a spree system? - by Scenario - 18.06.2013, 04:20
Re: How would one make a spree system? - by MP2 - 18.06.2013, 04:49
Re: How would one make a spree system? - by Scenario - 18.06.2013, 05:03

Forum Jump:


Users browsing this thread: 1 Guest(s)