Raised This Month: $ Target: $400
 0% 

[REQ] Top 15 (motd function)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zombiesucker
BANNED
Join Date: Sep 2015
Location: Usa
Old 09-27-2015 , 05:02   Re: [REQ] Top 15 (motd function)
Reply With Quote #1

you mean like 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;

</span></span>
zombiesucker is offline
Send a message via ICQ to zombiesucker Send a message via AIM to zombiesucker Send a message via Yahoo to zombiesucker Send a message via Skype™ to zombiesucker
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 23:23.


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