How would one make a spree system?
#1

How does a person make a spree system...
Such as if you get 3 kills, it'd say "Username is on a 3 streak killing spree", 5 kills, and 10 kills, and so on.
Reply
#2

Here - I found a filterscript code for you. Look at it and learn (I didn't make it because I'm too noob for that).

http://pastebin.com/mqzNdJ56

Hope this helped.
Reply
#3

I'll try it out once my script gets fixed
Thread: https://sampforum.blast.hk/showthread.php?tid=444739
Reply
#4

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;
}
Reply
#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
#6

Quote:
Originally Posted by MP2
Посмотреть сообщение
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.
Ahh, true.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)