Need help serious!!!!! - 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: Need help serious!!!!! (
/showthread.php?tid=246500)
Need help serious!!!!! -
[Ha]Lommo - 04.04.2011
Okay, so i need to get the player with the most kills after every round.
For example KillCount[playerid]++; on OnPlayerDeath.
After the round i need to find the one with the most KillCount..
Could u help me? give me an example? Would be nice!
Re: Need help serious!!!!! -
Sascha - 04.04.2011
pawn Код:
stock GetHighestKillCount()
{
new player = -1;
for(new i=0; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
if(player == -1) player = i;
if(KillCount[i] > KillCount[player])
{
player = i;
}
}
}
return player;
}
(not tested)