Menus [Admin Only]
I forgot how to make a menu or the items only for people will a flag.
Can you give me an example? Can't find one. Like there's 4 items, the last 2 are admin only. How? |
Re: Menus [Admin Only]
Like this maybe?
PHP Code:
|
Re: Menus [Admin Only]
Quote:
Plus you don't need to send the info parameters. When your not using them. |
Re: Menus [Admin Only]
Quote:
Aaand now about the info parameters. I think, that the separate items have to have their separate info markers, which are the numbers. In this case, it's really unnecessary, because they are added for sure. But if the dude want's to add a cvar maybe, or some special conditions which to turn the items on/off, this is the better way, right? |
Re: Menus [Admin Only]
Okay. How to make the item not clickable for none vip?
Like the item will be grey. Edit: And how to make a bool to have a flag? Like: bool:isvip, i want that to have the a flag for example. How? |
Re: Menus [Admin Only]
Just create a callback like this:
PHP Code:
|
Re: Menus [Admin Only]
Simple Menu For Admin:
PHP Code:
|
Re: Menus [Admin Only]
Thanks. Can you tell me what i did wrong?
Code:
VIP is a bool. In the const, when it's true, in the menu it shows [VIP] but everyone can still chose the item. What's the problem? |
Re: Menus [Admin Only]
Did you even read our replies?
|
Re: Menus [Admin Only]
Duh...
I noted all your examples and made me a notepad on my pc. But in my code, what's wrong? Edit: In my code, it's in BuildMenus() function. |
| All times are GMT -4. The time now is 09:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.