Help for script..
Hey, I would like you to help me a little.. I would like the last 2 weapons to be just for VIP and if he doesn't have a vip, a message will come in chat... what code should i put?
Code:
menu_additem(Menu, "\rM4A1", "1", 0) |
Re: Help for script..
Code:
|
Re: Help for script..
You can use a menu callback if you want to have the items shown but be disabled if they don't have the requisite flag. Callback example found here.
If you want them to see a chat message then you have to let them select the item and then check their flags in the handler and show the message if needed. Optionally, you can re-show the menu if you want. |
Re: Help for script..
[QUOTE=Shadows Adi;2706923][pawn]
menu_additem(Menu, "\rM4A1", "1") menu_additem(Menu, "\rAK47", "2") menu_additem(Menu, "M3", "3") menu_additem(Menu, "Aug", "4") menu_additem(Menu, "Famas", "5") if(get_user_flags(id) & VIP_LEVEL_ACCES) { menu_additem(Menu, "\rMP5 Navy \w- \r[\yACCES V.I.P\r]", "6") menu_additem(Menu, "\rXM1014 \w- \r[\yACCES V.I.P\r]", "7") } menu_setprop(Menu, MPROP_EXIT, MEXIT_ALL); menu_display(id, Menu, 0); Sorry, but you could like that when you're not a VIP to show you the menu but can't you take it? In this code, if you don't have a VIP, they don't show you the weapons from the VIP, I want them to appear but they can't take them. |
Re: Help for script..
Quote:
Code:
|
Re: Help for script..
Quote:
Code:
public menuitem_callback( id, menu, item ) |
Re: Help for script..
Aleku. they said wronger than you , you did good but did you define that value?
PHP Code:
and if you didn't ,do it and your code will be working PHP Code:
Every if(get_user_flags(id) & x) has to do a else after you wrote the code because then the code will let anyone use it bcs it's like without else it's creating a invisible one that does the same thing, i found out this thing when i was doing my menu. and btw you could also do like this PHP Code:
|
Re: Help for script..
Quote:
|
Re: Help for script..
Quote:
|
Re: Help for script..
Easiest way to do this (that I can think of) is something like this
PHP Code:
PHP Code:
|
| All times are GMT -4. The time now is 17:00. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.