View Single Post
LiveAndLetDie
Junior Member
Join Date: Sep 2019
Location: Finland
Old 03-18-2021 , 14:25   Re: Checking for flag in script
Reply With Quote #2

Code:
#include <sourcemod>

public void OnPluginStart()
{
	RegConsoleCmd("sm_test", Test);
}

public Action Test(int client, int args)
{
	ClientHasFlag(client) ? PrintToChat(client, "Yea") : PrintToChat(client, "Nope");
	
	return Plugin_Handled;
}

bool ClientHasFlag(int client)
{
	return(CheckCommandAccess(client, "", ADMFLAG_CUSTOM1, true));
}
Adapt it to your own needs. List of flags: https://wiki.alliedmods.net/Checking...dmin_Flag_Bits
LiveAndLetDie is offline