This script is supposed to find the highest number in iPlayerDamage[id][7]
7 is contains the total amount of damage the player has done the current round. id is the player id.
Whats wrong with it? And im sure there is a better way of making this...
Code:
public eventEndRound()
{
new player[31]
new hits[3]
new damage[3] = (0,0,0)
for (new i = 0; i >= 32; i++) {
if ( iPlayerDamage[i][5] > damage[3] ) {
get_user_info(i, "name", player, 31)
damage[1] = iPlayerDamage[i]
hits[1] = iPlayerDamage[7]
}
}
set_hudmessage(0, 200, 200, 0.60, 0.35, 0, 0.1, 5.0, 0.3, 0.3, 4)
show_hudmessage(0,"Most damage was done^nby %s ^n %i dmg / %i hits", player, damage[1], hits[1])
return PLUGIN_CONTINUE
}