Raised This Month: $51 Target: $400
 12% 

Top10 menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-25-2020 , 09:17   Top10 menu
Reply With Quote #1

1. Create top10 menu and motd according xp of players in Dec order
Xp are loaded from nvault

So can use any of them

Thnx
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-25-2020 , 18:24   Re: Top10 menu
Reply With Quote #2

maybe post your xp plugin so people could use this to add the top10?
__________________
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-26-2020 , 03:49   Re: Top10 menu
Reply With Quote #3

xp is just an example lol , you can define it as

g_XP[33];

g_XP[id]
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
Napoleon_be
Veteran Member
Join Date: Jul 2011
Location: Belgium
Old 01-26-2020 , 07:56   Re: Top10 menu
Reply With Quote #4

This is something i copied from a plugin years ago, maybe you can do something with this:

PHP Code:
public Cmd_Top15(id)
{
    new 
icount;
    static 
sort[33][3], maxPlayers;
    
    if(!
maxPlayersmaxPlayers get_maxplayers();
    
    for(
i=1;i<=maxPlayers;i++)
    {
        
sort[count][0] = i;
        
sort[count][1] = iPlayerLevel[i]
        
sort[count][2] = iPlayerXP[i]
        
count++;
    }
    
    
SortCustom2D(sort,count,"stats_custom_compare");
    
    new 
motd[1024], len    
    
    len 
format(motd1023,"<body bgcolor=#000000><font color=#FFB000><pre>")
    
len += format(motd[len], 1023-len,"%s %-22.22s %3s %3s^n""#""Name""Level""Experience")
    
    new 
players[32], num
    get_players
(playersnum)
    
    new 
clamp(count,0,15)
    
    new 
name[32], player
    
    
for(new 0ba++)
    {
        
player sort[a][0]
        
        
get_user_name(playername31)        
        
len += format(motd[len], 1023-len,"%d %-22.22s %d      %d^n"a+1namesort[a][1], sort[a][2])
    }
    
    
len += format(motd[len], 1023-len,"</body></font></pre>")
    
show_motd(idmotd"Experience15")
    
    return 
PLUGIN_CONTINUE
}

public 
stats_custom_compare(elem1[],elem2[])
{
    if(
elem1[1] > elem2[1]) return -1;
    else if(
elem1[1] < elem2[1]) return 1;
        
    return 
0;

__________________

Last edited by Napoleon_be; 01-26-2020 at 07:56.
Napoleon_be is offline
Send a message via Skype™ to Napoleon_be
Reply



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 12:29.


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