CheckCommandAccess

Last Updated2011-09-10
Created At2007-07-15

Returns whether a client has access to a given command string. The string can be any override string, as overrides can be independent of commands. This feature essentially allows you to create custom flags using the override system.

native bool CheckCommandAccess(int client, const char[] command, int flags, bool override_only = false)

Parameters

int client
Client index.
const char[] command
Command name. If the command is not found, the default flags are used.
int flags
Flag string to use as a default, if the command or override is not found.
bool override_only
If true, SourceMod will not attempt to find a matching command, and it will only use the default flags specified. Otherwise, SourceMod will ignore the default flags if there is a matching admin command.

Return Value

bool True if the client has access, false otherwise.