Kill Streak - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Kill Streak (
/showthread.php?tid=155800)
Kill Streak -
TKZ227 - 19.06.2010
I'm making a killstreak thing for my server, but I just want to know how exactly do I find how many kills they have gotten without dying? What's the best method I mean..
Re: Kill Streak -
ViruZZzZ_ChiLLL - 19.06.2010
Heres an example :
pawn Код:
new KillingSpree[playerid];
public OnPlayerDeath(playerid, killerid, reason)
{
KillingSpree[killerid] ++;
KillingSpree[playerid] = 0;
if(KillingSpree[killerid] == 3){
SendClientMessage(playerid, Color, "SERVER : You now have 3 killing sprees!");}
return 1;
}
You get the idea
Re: Kill Streak -
DJDhan - 19.06.2010
Have a variable like
Код:
new killingspree[MAX_PLAYERS];
Then
Код:
public OnPlayerDeath(playerid,killerid,reason)
{
killingspree[playerid]=0;
killingspree[killerid]++;
return 1;
}
EDIT: Viruzz beat me to it :P