Raised This Month: $51 Target: $400
 12% 

Can an author help me ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Darkwob
BANNED
Join Date: Oct 2018
Old 06-30-2021 , 20:54   Can an author help me ?
Reply With Quote #1

When we do this, players with the "custom 3" flag do not have access to this menu. what exactly is wrong? outputs a message to the chat.

PHP Code:
public Action HandleCmdMenu(int clientint args) {
   if (
GetUserFlagBits(client) == ADMFLAG_CUSTOM3) {
    
Menu menu = new Menu(HandleMenuOpen);
    
menu.SetTitle("%T""MENU"client);

     for(
int i=0i<sizeof(g_sCmds); i++)
      {
if(
g_sCmds[i][0] == '\0') break;
char option [64];
char optionName [10];
if(
TranslationPhraseExists(g_sCmds[i])) Format(optionsizeof(option), "%T"g_sCmds[i], client);
else 
Format(optionsizeof(option), "%s"g_sCmds[i]);
Format(optionNamesizeof(optionName),"option%d"i);
menu.AddItem(optionNameoption);
}
menu.ExitButton true;
menu.Display(clientMENU_TIME_FOREVER);
}
else { 
    
PrintToChat (client"\x05No Acces, You're Not A \x03Gold Vip \n \x05Purchase: \x04regionz.ml/home-page/fiyatlar.html");

}

Print this Message
Quote:
No Acces, You're Not A Gold Vip
Purchase: regionz.ml/home-page/fiyatlar.html
Darkwob is offline
SpirT
Senior Member
Join Date: Sep 2018
Location: Portugal
Old 07-07-2021 , 06:20   Re: Can an author help me ?
Reply With Quote #2

ADMFLAG_CUSTOM3 isn't a valid BitFlag
Use Admin_Custom3 instead
__________________
SpirT is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 07-07-2021 , 17:28   Re: Can an author help me ?
Reply With Quote #3

kinda work aswell

https://github.com/alliedmodders/sou...in.inc#L60-L88
__________________
Marttt is offline
MAGNAT2645
Senior Member
Join Date: Nov 2015
Location: AlliedMods.net
Old 07-08-2021 , 14:01   Re: Can an author help me ?
Reply With Quote #4

Try to replace
Code:
   if (GetUserFlagBits(client) == ADMFLAG_CUSTOM3) {
with
Code:
   if ((GetUserFlagBits(client) & ADMFLAG_CUSTOM3) == ADMFLAG_CUSTOM3) {
__________________
MAGNAT2645 is offline
Reply



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 18:17.


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