Raised This Month: $ Target: $400
 0% 

Menus + Cvars


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-07-2010 , 20:39   Re: Menus + Cvars
Reply With Quote #6

Oh, is a number... not a string, sry... my mistake.

Here an example:

Code:
#include <amxmodx> #define PLUGIN  "New Plugin" #define AUTHOR  "Alucard" #define VERSION "0.0.1" new p_CvarSomething; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);         p_CvarSomething = register_cvar("cvar_something", "1");         register_clcmd("say /menu", "HookCmdMenu"); } public HookCmdMenu(id) {     new menu = menu_create("I am a menu", "FuckingMenuHandler");         new szItem[32];     formatex(szItem, 31, "%d HP", get_pcvar_num(p_CvarSomething) );         menu_additem(menu, szItem, "1");         menu_display(id, menu);     return PLUGIN_HANDLED; }

But if is an string, see the fysik's example.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 05:28.


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