Highest Kill Help - 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: Highest Kill Help (
/showthread.php?tid=654678)
Highest Kill Help -
TadePoleMG - 03.06.2018
Hi there fellas
Can anyone tell me how to make a highest kill system per round with variables working with per second repeatable time OnGameModeInit shows in a textdraw with kills and killer name(if most kills and someone's kills are same then textdraw shows draw instead of name and kills) and when round finish a msg goes to everyone that This(example) player wins the round with that kills like.
Thank You, Please help.
+1rep for who help me.
Re: Highest Kill Help -
TadePoleMG - 03.06.2018
anyone help pls
Re: Highest Kill Help -
Lokii - 03.06.2018
EDIT fixed
PHP код:
something(...)
{
static player, best = 0; //set best to 0 at first
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++) //loop
{
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || pKills[i] <= best) //skip if player not connected, npc or his kill score is not higher than the best score
best = pKills[playerid]; //if is higher set best to playerid
player = i;
}
new name[24], str[90];
GetPlayerName(player, name, sizeof(name));
format(str, sizeof(str), "%s {FF0000}is the top killer {FFFFFF}({FF0000}%d kills{FFFFFF})", name, best);
SendClientMessageToAll(-1, str);
}
Re: Highest Kill Help -
Sew_Sumi - 03.06.2018
Can you take notice...
24 HOUR BUMPS ONLY
I subscribed to this when you posted it, yet you bumped it within an hour because you're so 'dire in need' of code to help you even get anything.
Re-read those forum rules, and make sure you understand them.