PHP Code:
public mh_MyMenu(id, menu, item)
{
if(item == MENU_EXIT)
{
menu_cancel(id);
return PLUGIN_HANDLED;
}
new money = get_user_point(id)
new command[6], name[64], access, callback;
menu_item_getinfo(menu, item, access, command, sizeof command - 1, name, sizeof name - 1, callback);
switch(item)
{
case 0:
{
if(g_hasitem[id] == true)
{
client_print(id,"You already have one item")
return;
}
else ( get_user_point(id) >= 150)
{
g_hasitem[id] == true
}
case 1:
{
if(g_hasitem[id] == true)
{
return;
client_print(id,"You already have one item")
}
else( get_user_point(id) >= 100)
{
....
g_hasitem[id] == true;
}
}
menu_destroy(menu);
return PLUGIN_HANDLED;
}
I am trying to limit items to players .. i.e if player buys one item he cant buy other
But when im using this method im unable to buy anything .. Everytime i buy it shows you already have one item
Also is there any way i can show Points of players below menu
EX:
Quote:
Menu
Your Coins : ... Coins
1.
2.
|
One last error is im using \r to make it color as in the guide of article [New Amxx Menu System]
But its not working