29.12.2017, 17:30
Wait... shouldn't the variables be on top and then you do something within the lines of this..?
This is the way to do it if you're putting it at OnPlayerSpawn, you gotta put playerid to use otherwise its absolutely useless putting all of those loops at OnPlayerSpawn or maybe i got the concept wrong but from the code you've shown so far this is what i understood.
PHP код:
for(new i=0;i<MAX_PLAYERS;i++) // This loop will check for the player that has the most kills
{
if(kills[playerid] > kills[i])
{
first = playerid;
GetPlayerName(first, Nick[0], MAX_PLAYER_NAME);
format(string20, sizeof(string20), "~R~#1 - ~W~%s", Nick[0]);
TextDrawSetString(Textdraw12, string20);
TextDrawShowForPlayer(playerid, Textdraw12);
}
}