Code:
new a, b, tempid, pId[32], pNum;
get_players(pId, pNum)
for ( new c ; c < pNum ; c++ ) {
tempid = pId[c]
if ( Player_totalkills[tempid] > b ) {
a = tempid
b = Player_totalkills[tempid]
}
}
most kills: Player_totalkills[a]
Notice this only works if there are one with the highest kills. If two players has the same and highest score, the second one would be ignored.
EDIT: Another, better way.
Code:
new a, tempid, pId[32], pNum;
get_players(pId, pNum)
for ( new b ; b < pNum ; b++ ) {
tempid = pId[b]
if ( Player_totalkills[tempid] > Player_totalkills[a] )
a = tempid
}