Raised This Month: $ Target: $400
 0% 

Get ranks in ascending order


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 08-25-2012 , 12:40   Re: Get ranks in ascending order
Reply With Quote #2

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 1<= 32i++)
        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.
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode