Raised This Month: $ Target: $400
 0% 

Limiting items


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
RAW_192
Senior Member
Join Date: Feb 2017
Old 08-01-2017 , 09:50   Limiting items
Reply With Quote #1

PHP Code:
public mh_MyMenu(idmenuitem)
{         
if(
item == MENU_EXIT)
{
menu_cancel(id);
return 
PLUGIN_HANDLED;
}
new 
money =  get_user_point(id
new 
command[6], name[64], accesscallback;
menu_item_getinfo(menuitemaccesscommandsizeof command 1namesizeof name 1callback);

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

Last edited by RAW_192; 08-01-2017 at 09:51.
RAW_192 is offline
 



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 23:03.


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