Raised This Month: $ Target: $400
 0% 

Help With FPS Menu -- Menu Won't Show


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
shadow.hk
Senior Member
Join Date: Dec 2008
Location: WA, Australia
Old 02-24-2009 , 12:03   Help With FPS Menu -- Menu Won't Show
Reply With Quote #1

Hey, made this script, except I'm not sure what I've done wrong. If someone could help me out

PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#define PLUGIN "FPS Menu"
#define VERSION "1.0"
#define AUTHOR "shadow.hk"
new fpsmenu
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)
 {
  new 
menu menu_create("\yCombatZone FPS Menu","menu_handler")
  
menu_addblank(menu)
  
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_addblank(menu)
  
menu_additem(menu,"\wExit","0",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")
   }
   case 
0:{
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
   
}
  }
  
menu_destroy(menu)
  return 
PLUGIN_HANDLED


Last edited by shadow.hk; 02-24-2009 at 12:16.
shadow.hk is offline
Send a message via MSN to shadow.hk
 



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