AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   GetAdminFlag Tag Mismatch (https://forums.alliedmods.net/showthread.php?t=319771)

Synaesthesia 11-19-2019 05:24

GetAdminFlag Tag Mismatch
 
PHP Code:

new AdminId:adminID GetUserAdmin(client);
    
if(
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.

Fyren 11-20-2019 06:08

Re: GetAdminFlag Tag Mismatch
 
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.

eyal282 11-25-2019 11:43

Re: GetAdminFlag Tag Mismatch
 
CheckCommandAccess

Powerlord 11-25-2019 17:20

Re: GetAdminFlag Tag Mismatch
 
Quote:

Originally Posted by eyal282 (Post 2674430)
CheckCommandAccess

You can't emphasize this enough. CheckCommandAccess is designed for this very purpose: https://sm.alliedmods.net/new-api/co...kCommandAccess


All times are GMT -4. The time now is 04:47.

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