Raised This Month: $ Target: $400
 0% 

[HELP] Plugin fps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
joyceteamo
Member
Join Date: Jan 2013
Old 02-27-2013 , 18:40   [HELP] Plugin fps
Reply With Quote #1

someone could help me in this plugin .. not running the ta / fps or menu appears dele.ele was for a menu appears when the player connects in server
------------------------------------------------------------------------------------------------
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("\yFPS Menu","menu_handler")
menu_addblank(menu)
menu_additem(menu,"\wFPS 101","3",0)
menu_additem(menu,"\wFPS 125","4",0)
menu_additem(menu,"\wFPS 131","5",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 
3:{
client_cmd(id,"fps_max 101")
}
case 
4:{
client_cmd(id,"fps_max 125")
}
case 
5:{
client_cmd(id,"fps_max 131")

}
case 
0:{
menu_destroy(menu)
return 
PLUGIN_HANDLED
}
}
menu_destroy(menu)
return 
PLUGIN_HANDLED

joyceteamo is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 02-27-2013 , 21:20   Re: [HELP] Plugin fps
Reply With Quote #2

Clients can change their own fps_max in console.

Also, please speak in english so people can understand you.
__________________

Last edited by fysiks; 02-27-2013 at 21:21.
fysiks is offline
oxygen935
Veteran Member
Join Date: Jun 2012
Location: Athens, Greece
Old 02-28-2013 , 12:21   Re: [HELP] Plugin fps
Reply With Quote #3

just add this:

PHP Code:
public client_putinserver(id
{
    
menu_display(idmenu0)

__________________
Quote:
Originally Posted by quark View Post
You're a genius
Stopped any pawn work cause of university for computer science
oxygen935 is offline
Send a message via Skype™ to oxygen935
joyceteamo
Member
Join Date: Jan 2013
Old 02-28-2013 , 15:30   Re: [HELP] Plugin fps
Reply With Quote #4

Quote:
Originally Posted by oxygen935 View Post
just add this:

PHP Code:
public client_putinserver(id
{
    
menu_display(idmenu0)

could you post the sma?

I do not know add this code = /

Last edited by joyceteamo; 02-28-2013 at 15:31.
joyceteamo is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 03-01-2013 , 00:40   Re: [HELP] Plugin fps
Reply With Quote #5

Quote:
Originally Posted by oxygen935 View Post
just add this:

PHP Code:
public client_putinserver(id
{
    
menu_display(idmenu0)

That will not work. The menu does not exist yet.
__________________

Last edited by fysiks; 03-01-2013 at 00:45.
fysiks is offline
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 21:42.


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