Hi, iīm making a plugin where you can buy diffrent stuff from the menu.
i have been looking around and reading Empīs TUT on the new Amxx Menu but the thing i canīt seem to figure out is...
How do i make a forward so that if a Player press example. nr.1 the plugin starts a special public function? and how do i make it so that the plugin checks that he hasnīt already done it before.
This example is taken from
http://forums.alliedmods.net/showthread.php?t=46364 and modded to help people understand my problem
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_clcmd( "my_awesome_menu","AwesomeMenu");
}
public AwesomeMenu(id)
{
new menu = menu_create("\rLook at this awesome Menu!:", "menu_handler");
menu_additem(menu, "\wI'm Selection #1", "1", 0);
menu_additem(menu, "\wI'm Selection #2", "2", 0);
menu_additem(menu, "\wI'm Secret Selection #3", "3", ADMIN_ADMIN);
}
// and so on...
switch(key)
{
case 1:
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
public ex
{
bla bla user hp....
How do i make it so that if a player picks CASE 1, he will get the functions thats writen att public EX?