How would one make a spree system? - 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: How would one make a spree system? (
/showthread.php?tid=444737)
How would one make a spree system? -
DJTunes - 18.06.2013
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.
Re: How would one make a spree system? -
Songason - 18.06.2013
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.
Re: How would one make a spree system? -
DJTunes - 18.06.2013
I'll try it out once my script gets fixed
Thread:
https://sampforum.blast.hk/showthread.php?tid=444739
Re: How would one make a spree system? -
Scenario - 18.06.2013
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;
}
Re: How would one make a spree system? -
MP2 - 18.06.2013
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.
Re: How would one make a spree system? -
Scenario - 18.06.2013
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.