PHP Code:
#include <amxmodx>
#define VERSION "1.0"
new xp[33], level[33]
public plugin_init() {
register_plugin("Rank System", VERSION, "NapoleoN#")
FunctionName(1)
}
stock FunctionName( const type ) {
new iPlayer
for(new i = 1; i <= 32; i++)
if(is_user_connected(i))
if( !iPlayer
|| ( (type && (level[iPlayer] < level[i]) || (!type && (level[iPlayer] > level[i]) ) )
|| ( (level[iPlayer] == level[i]) && ( (type && xp[iPlayer] < xp[i]) || (!type && xp[iPlayer] > xp[i]) )) ) )
iPlayer = i
return iPlayer
}
Not sure if this will work.
__________________