[HELP] Client Menu
So hi guys. Today i need a help. I'm doing something for my community and its a very important thing.
I wanna give a client VIP permissions (only root admins can do it) on a menu. I already done this PHP Code:
And obviously check if all the other things are correct. Then reply when its done or PM me the code! Thanks for the attention! |
Re: [HELP] Client Menu
You have some errors:
You create "Menu" type but return "Action" type instead. Actually, I see no reason to pre-call it without caching to global variable if that was your reason. Also, you don't need explicitly call "delete menu" (twice) bacause it is already called when "MenuAction_End" msg is come in your callback. ADMFLAG_CUSTOM1. Correct tags are: https://sm.alliedmods.net/new-api/admin/AdminFlag Also, ExitButton is true by default. GetItem should be called e.g. on MenuAction_Select msg. A bit rewritten code: PHP Code:
|
Re: [HELP] Client Menu
If you will grant vip through this menu what you made the VIP will lasts only until he disconnects or until map change. Adding VIP through MySQL Database is better option for you. :wink: Totenfluch made something similiar to what you want.
https://forums.alliedmods.net/showthread.php?t=292183 |
Re: [HELP] Client Menu
+1, you need DB, KeyValues (depending on how many users) or direct editing the admins_simple.ini file (if you prever VIPs based on admin flags), like this one (code for removing only).
|
Re: [HELP] Client Menu
Quote:
|
Re: [HELP] Client Menu
Quote:
PHP Code:
Code:
Thanks for all your help and others as well! :) |
Re: [HELP] Client Menu
Code:
if (!FileExists(path)) https://sm.alliedmods.net/new-api/files/WriteFileLine 1-st argument is a handle. "%s" "20:ao", ... - what is this? WriteFileLine( - and what is this? You should write correctly. Handle, "string". Or Handle, "specifiers(s)", arg(s) char path[512]; - use PLATFORM_MAX_PATH const FormatEx - in the non-performance critical places it's better to use Format() |
Re: [HELP] Client Menu
Quote:
How do i fix it? |
Re: [HELP] Client Menu
Show your code.
|
Re: [HELP] Client Menu
Quote:
Code should look like this: PHP Code:
|
All times are GMT -4. The time now is 16:07. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.