DoesPlayerHaveAccessToCommand

From GT-MP
Jump to: navigation, search
DoesPlayerHaveAccessToCommand
Server-Side Function
Utilities-terminal.png Server-Side Csharp.png C#

Checks whether a player has access to the given command based on the ACL.

Dialog-warning.png Using ACL is currently not recommended because of certain issues.

Syntax

API.doesPlayerHaveAccessToCommand(Client player, string cmd);

Required Arguments

  • player: parameter input should be in Client type.
  • cmd: parameter input should be in string type.

NOTE: This function returns data in bool type.

Usage example(s)

if (API.doesPlayerHaveAccessToCommand(player, "kick")) {
  // Do stuff...
}


References