CheckCommandAccess Function

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.

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


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

True if the client has access, false otherwise.