Highest killstreak - 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: Highest killstreak (
/showthread.php?tid=195619)
Highest killstreak -
WillyP - 03.12.2010
Hey, I'm wondering if it would be cool if you had something like:
(dini save file)
HighestKS:1337
But would I put it like
OnPlayerDeath
kills++ ect
but saving highest killstreak until they die? I'm confused.
Re: Highest killstreak -
DevilG - 03.12.2010
To create some kind of killstreaks.. I do think that you can increase the counter with OnPlayerDeath.
It will look like..
pawn Код:
public OnPlayerDeath( playerid, killerid, reason)
{
if(PlyrStat[playerid][AdminDuty] != 1)
{
PlyrStat[killerid][KillStreak] += 1; // Will increase the killer's killstreak counter
PlyrStat[playerid][KillStreak] = 0; // Will make killed player's killstreak counter to be zero
}
return 1;
}
And you should have another stuffs, to save the highest KS to a file.
Like, put it on OnGameModeInIt, check "Scriptfiles/HighestKS.ini" file (which should have the HighestKS data inside it), put it to the MaxKS on the script, and everytime a player kills another player, it checks if his KillStreak is already more than the MaxKS, and then he puts his KillStreak to the file using dini_IntSet, and you can also put the name with dini_Set, so then everytime a player connect, they'll see something like;
"Highest Kill Streak's now held by [name], with [KillStreak]!" as an announcement