Raised This Month: $300 Target: $400

GetAdminFlag Tag Mismatch

Post New Thread Reply   
Thread Tools Display Modes
Author Message
New Member
Join Date: Nov 2019
Old 11-19-2019 , 05:24   GetAdminFlag Tag Mismatch
Reply With Quote #1

PHP Code:
new AdminId:adminID GetUserAdmin(client);
GetAdminFlag(adminIDADMFLAG_RESERVATIONAccess_Real) == true)
PrintToChat(client" \x02[SM]\x01 You have acces to this command!");

This code is in OnClientPostAdminCheck(). I get tag mismatch error on if line.

I've used:

PHP Code:
if(IsClientInGame(client) && CheckCommandAccess(client"scolor"ADMFLAG_RESERVATIONfalse))

But that doesn't work either. I can use the command it doesn't says "you don't have permission to this command", but nothing happens too. It doesn't even prints a message.

Last edited by Synaesthesia; 11-19-2019 at 05:26.
Synaesthesia is offline
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 11-20-2019 , 06:08   Re: GetAdminFlag Tag Mismatch
Reply With Quote #2

The defines like ADMFLAG_RESERVATION aren't what those functions want.

Here's the doc for GetAdminFlag: https://sm.alliedmods.net/new-api/admin/GetAdminFlag

You can click on "AdminFlag" for the second parameter's type and it'll take you to that enum.
Fyren is offline
Veteran Member
Join Date: Aug 2011
Old 11-25-2019 , 11:43   Re: GetAdminFlag Tag Mismatch
Reply With Quote #3

Accepting private work. Contact me if you're interested.
If you like my work, feel free to donate in appreciation with PayPal or CSGO Skins.

Total Donated: 10$
eyal282 is offline
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 11-25-2019 , 17:20   Re: GetAdminFlag Tag Mismatch
Reply With Quote #4

Originally Posted by eyal282 View Post
You can't emphasize this enough. CheckCommandAccess is designed for this very purpose: https://sm.alliedmods.net/new-api/co...kCommandAccess
Am I back? Well, we'll see.
Powerlord is offline

Thread Tools
Display Modes

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 10:19.

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