Raised This Month: $ Target: $400
 0% 

[HELP] Menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Redfalcon
BANNED
Join Date: Sep 2009
Location: Prison Break
Old 10-13-2009 , 14:43   Re: [HELP] Menu
Reply With Quote #3

when i write /menu my menu cames up but how can i do so Godmode,Noclip and add 200 Health work? So it will be added?

Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd( "/menu","Adminmenu");
}
public Adminmenu(id)
{
new menu = menu_create("\rAdmin Menu:", "menu_handler");
menu_additem(menu, "\wGodmode", "1", ADMIN_IMMUNITY);
menu_additem(menu, "\wNoClip", "2", ADMIN_IMMUNITY);
menu_additem(menu, "\w200 Health", "3", ADMIN_IMMUNITY);
menu_setprop(menu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, menu, 0);
 
}
public menu_handler(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
 
new key = str_to_num(data);
switch(key)
{
case 1:
{
client_print(id, print_chat, "Godmode ON");
menu_destroy(menu);
return PLUGIN_HANDLED;
}
case 2:
{
client_print(id, print_chat, "NoClip ON");
}
case 3
{
client_print(id, print_chat, "200 Health Added");
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
Redfalcon is offline
Send a message via MSN to Redfalcon
 



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 22:42.


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