04.05.2018, 19:35
a fix on @Lokii solution. not skipping and never assigning last_score to a value.
PHP код:
if(!IsPlayerConnected(i) || IsPlayerNPC(i) || p_Deaths[i] <= last_score || (last_player != -1 && p_Deaths[i] <= p_Deaths[last_player] )) continue; //if player not connected, npc or got same score as previous player or less (skip)
last_player = i; //set the last player with best score
last_score = p_Deaths[i];