Raised This Month: $ Target: $400
 0% 

Help With FPS Menu -- Menu Won't Show


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
baneado
Veteran Member
Join Date: Dec 2012
Location: amxmodx-es.com
Old 04-14-2013 , 15:04   Re: Help With FPS Menu -- Menu Won't Show
Reply With Quote #9

Quote:
Originally Posted by oxygen935 View Post
sorry i forgot... i was busy...
P.S dc = disconnect

Code, untested:
PHP Code:
#include <amxmodx>

#define PLUGIN "FPS Menu"
#define VERSION "1.0"
#define AUTHOR "shadow.hk"

new fpsmenu
new menu

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_clcmd("say /fps","showFPSmenu",0,"Brings up an FPS menu")
    
fpsmenu register_cvar("amx_allowfps","1")
}

public 
showFPSmenu(id)
{
    if (
get_pcvar_num(fpsmenu) == 1)
    {
        
menu menu_create("\yCombatZone FPS Menu","menu_handler")
        
menu_additem(menu,"\wDeveloper ON/OFF","1",0)
        
menu_additem(menu,"\wShow/Hide FPS","2",0)
        
menu_additem(menu,"\wFPS 101","3",0)
        
menu_additem(menu,"\wFPS 131","4",0)
        
menu_additem(menu,"\wFPS 150","5",0)
        
menu_additem(menu,"\wFPS 200","6",0)
        
menu_additem(menu,"\wFPS 250","7",0)
        
menu_additem(menu,"\wFPS 300","8",0)
        
menu_setprop(menuMPROP_EXITMEXIT_ALL)
        
menu_display(idmenu0)
    }
}
public 
menu_handler(id,menu,item)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}
    new 
data[6], iName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,5iName63callback)
    new 
key str_to_num(data)
    switch(
key)
    {
        case 
1:
        {
            
client_cmd(id,"developer on")
        }
        case 
2:
        {
            
client_cmd(id,"net_graph 3")
        }
        case 
3:
        {
            
client_cmd(id,"fps_max 101")
        }
        case 
4:
        {
            
client_cmd(id,"fps_max 131")
        }
        case 
5:
        {
            
client_cmd(id,"fps_max 150")
        }
        case 
6:
        {
            
client_cmd(id,"fps_max 200")
        }
        case 
7:
        {
            
client_cmd(id,"fps_max 250")
        }
        case 
8:
        {
            
client_cmd(id,"fps_max 300")
        }
    }
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED

4 years... I think it's very late to post now.

Last edited by baneado; 04-14-2013 at 15:06.
baneado 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 17:07.


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