Raised This Month: $ Target: $400
 0% 

/top15 plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
meNe
Junior Member
Join Date: Nov 2012
Old 09-20-2015 , 10:06   Re: /top15 plugin
Reply With Quote #9

Hello,
Try this:

PHP Code:
#include <amxmodx>
#include <csx>

public plugin_init()
{
    
register_plugin("Stats new""1.0""meNe")
    
register_clcmd("say /top15""show_top"0);
}

public 
show_top(id)
{
    
show_menu(id0"\n"1)
    new 
menu menu_create("\rTOP 15""menu_handler")
    new 
szmenu[512]
    new 
iMax get_statsnum()
    new 
izStats[8], izBody[8], t_sName[32];
    
iMax 100

    
for (new 0iMaxi++)
    {
        
get_stats(iizStatsizBodyt_sName31);
        
replace_all(t_sName31"<""[");
        
replace_all(t_sName31">""]");
        
formatex(szmenu511"\y%s \r| \wKills:\r %d \r| \wDeaths:\r %d"t_sNameizStats[0], izStats[1]);
        
menu_additem(menuszmenu)
    }

    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
}
 
public 
menu_handler(idmenuitem)
{
    switch(
item)    
    {
        case 
0..99:
        {
            
// your command
        
}
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;


Last edited by meNe; 09-20-2015 at 10:07.
meNe is offline
 



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 23:19.


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