mirror of
https://github.com/Resxt/Plutonium-IW5-Scripts.git
synced 2025-04-19 12:42:54 +00:00
chat_commands 1.3.0
This update adds an optional permission system that commands can use to determine what the minimum permission level is to be able to access that specific command This update forces changes on the other commands scripts. If you download this version make sure to download the updated version of your individual chat command(s) script as well Added cc_debug dvar Added cc_permission_enabled Added cc_commands_mode dvar Added cc_permission_mode dvar Added cc_permission_default dvar Added cc_permission_max dvar Added cc_permission_0, cc_permission_1, cc_permission_2, cc_permission_3 & cc_permission_4 dvars Added InsufficientPermissionError error Added InvalidPermissionLevelError error Added GetPlayerPermissionLevelFromDvar util function Added GetPlayerPermissionLevel util function Added SetPlayerPermissionLevel util function Added PlayerHasSufficientPermissions util function Added SetDvarIfNotInitialized util function Added IsBot util function Added DebugIsOn util function Added PermissionIsEnabled util function [Refactor] Replaced player.chat_commands with player.pers["chat_commands"] This is to make sure the variables are kept between rounds Replaced level scoped variables with a single level scoped array variable <level.chat_commands> holding all properties (prefix, ports etc.)
This commit is contained in:
parent
945bc04e3c
commit
b0b66dcfbc
@ -5,13 +5,17 @@ This can be used to display text to the player, for example the server rules or
|
||||
This has been created for private games or servers that aren't running IW4MAdmin and want to have some commands.
|
||||
This hasn't been tested on a server running IW4MAdmin so I highly recommend doing some testing on a private server if you want to use both.
|
||||
|
||||
**[IMPORTANT]** Installing `chat_commands.gsc` is **mandatory** to make the commands work as this is the core of this whole system and all the command scripts depend on it.
|
||||
## chat_commands.gsc
|
||||
|
||||
The core script that holds the configuration, runs all the chat logic and holds utils function that are shared between all the `chat_command` scripts.
|
||||
**[IMPORTANT]** Installing it is **mandatory** to make the commands work as this is the core of this whole system and all the command scripts depend on it.
|
||||
Also note that this script doesn't provide any command on its own. You must install at least one command script to be able to use commands. Otherwise it will always say that you don't have any command.
|
||||
|
||||
:white_check_mark: Features available
|
||||
### Main features
|
||||
|
||||
- Easy per server (port) commands configuration. You can either pass an array of one server port, or multiple, or the `level.commands_servers_ports` array to easily add a command to one/multiple/all servers
|
||||
- Chat text print and functions support
|
||||
- Optional permissions level system to restrict commands to players with a certain permission level (disabled by default)
|
||||
- All exceptions are handled with error messages (no commands on the server, not enough arguments, command doesn't exist, command doesn't have any help message, player doesn't exist etc.)
|
||||
- A `commands` command that lists all available commands on the server you're on dynamically
|
||||
- A `help` command that explains how to use a given command. For example `help map`
|
||||
@ -19,12 +23,40 @@ Also note that this script doesn't provide any command on its own. You must inst
|
||||
- Configurable command prefix. Set to `!` by default
|
||||
- A plugin system to easily allow adding/removing commands. Each command has its own GSC file to easily add/remove/review/configure your commands. This also makes contributing by creating a PR to add a command a lot easier
|
||||
|
||||
:no_entry_sign: Features not available/to add
|
||||
### Dvars
|
||||
|
||||
- Commands aliases
|
||||
- Permissions/ranks to restrict some commands to a certain type of players (admin, VIP etc.)
|
||||
- Support for more target aliases such as "all", "bots" and "humans"
|
||||
- Configurable text colors/accent. As of now the majority of the text will be white
|
||||
Here are the dvars you can configure:
|
||||
|
||||
| Name | Description | Default value | Accepted values |
|
||||
|---|---|---|---|
|
||||
| cc_debug | Toggle whether the script is in debug mode or not. This is used to print players GUID in the console when they connect | 0 | 0 or 1 |
|
||||
| cc_permission_enabled | Toggle whether the permission system is enabled or not. If it's disabled any player can run any available | 0 | 0 or 1 |
|
||||
| cc_permission_mode | Changes whether the permission dvars values are names or guids | name | name or guid |
|
||||
| cc_permission_default | The default permission level players who aren't found in the permission dvars will be granted | 1 | Any plain number from 0 to `cc_permission_max` |
|
||||
| cc_permission_max | The maximum/most elevated permission level | 4 | Any plain number above 0 |
|
||||
| cc_permission_0 | A list of names or guids of players who will be granted the permission level 0 when connecting (no access to any command) | "" | Names or guids (depending on `cc_permission_mode`). Each value is separated with a colon (:) |
|
||||
| cc_permission_1 | A list of names or guids of players who will be granted the permission level 1 when connecting | "" | Names or guids (depending on `cc_permission_mode`). Each value is separated with a colon (:) |
|
||||
| cc_permission_2 | A list of names or guids of players who will be granted the permission level 2 when connecting | "" | Names or guids (depending on `cc_permission_mode`). Each value is separated with a colon (:) |
|
||||
| cc_permission_3 | A list of names or guids of players who will be granted the permission level 3 when connecting | "" | Names or guids (depending on `cc_permission_mode`). Each value is separated with a colon (:) |
|
||||
| cc_permission_4 | A list of names or guids of players who will be granted the permission level 4 when connecting | "" | Names or guids (depending on `cc_permission_mode`). Each value is separated with a colon (:) |
|
||||
|
||||
### Configuration
|
||||
|
||||
Below is an example CFG showing how each dvars can be configured.
|
||||
The values you see are the default values that will be used if you don't set a dvar.
|
||||
|
||||
```c
|
||||
set cc_debug 0
|
||||
set cc_permission_enabled 0
|
||||
set cc_permission_mode "name"
|
||||
set cc_permission_default 1
|
||||
set cc_permission_max 4
|
||||
set cc_permission_0 ""
|
||||
set cc_permission_1 ""
|
||||
set cc_permission_2 ""
|
||||
set cc_permission_3 ""
|
||||
set cc_permission_4 ""
|
||||
```
|
||||
|
||||
## chat_command_change_team.gsc
|
||||
|
||||
@ -249,7 +281,3 @@ Toggles wallhack (red boxes) on the targeted player.
|
||||
|---|
|
||||
| `!wallhack me` |
|
||||
| `!wallhack Resxt` |
|
||||
|
||||
## chat_commands.gsc
|
||||
|
||||
The core script that holds the configuration, runs all the chat logic and holds utils function that are shared between all the `chat_command` scripts.
|
||||
|
@ -20,15 +20,33 @@ Main()
|
||||
|
||||
InitChatCommands()
|
||||
{
|
||||
level.commands = []; // don't touch
|
||||
level.commands_prefix = "!"; // the symbol to type before the command name in the chat. Only one character is supported. The slash (/) symbol won't work normally as it's reserved by the game. If you use the slash (/) you will need to type double slash in the game
|
||||
level.commands_servers_ports = ["27016", "27017", "27018"]; // an array of the ports of all your servers you want to have the script running on. This is useful to easily pass this array as first arg of CreateCommand to have the command on all your servers
|
||||
level.commands_no_commands_message = ["^1No commands found", "You either ^1didn't add any chat_command file ^7to add a new command ^1or ^7there are ^1no command configured on this port", "chat_commands.gsc is ^1just the base system. ^7It doesn't provide any command on its own", "Also ^1make sure the ports are configured properly ^7in the CreateCommand function of your command file(s)"]; // the lines to print in the chat when the server doesn't have any command added
|
||||
level.commands_no_commands_wait = 6; // time to wait between each line in <level.commands_no_commands_message> when printing that specific message in the chat
|
||||
InitChatCommandsDvars();
|
||||
|
||||
level.chat_commands = []; // don't touch
|
||||
level.chat_commands["prefix"] = "!"; // the symbol to type before the command name in the chat. Only one character is supported. The slash (/) symbol won't work normally as it's reserved by the game. If you use the slash (/) you will need to type double slash in the game
|
||||
level.chat_commands["ports"] = ["27016", "27017", "27018"]; // an array of the ports of all your servers you want to have the script running on. This is useful to easily pass this array as first arg of CreateCommand to have the command on all your servers
|
||||
level.chat_commands["no_commands_message"] = ["^1No commands found", "You either ^1didn't add any chat_command file ^7to add a new command ^1or ^7there are ^1no command configured on this port", "chat_commands.gsc is ^1just the base system. ^7It doesn't provide any command on its own", "Also ^1make sure the ports are configured properly ^7in the CreateCommand function of your command file(s)"]; // the lines to print in the chat when the server doesn't have any command added
|
||||
level.chat_commands["no_commands_wait"] = 6; // time to wait between each line in <level.chat_commands["no_commands_message"]> when printing that specific message in the chat
|
||||
|
||||
level thread OnPlayerConnect();
|
||||
level thread ChatListener();
|
||||
}
|
||||
|
||||
InitChatCommandsDvars()
|
||||
{
|
||||
SetDvarIfNotInitialized("cc_debug", 0);
|
||||
|
||||
SetDvarIfNotInitialized("cc_permission_enabled", 0);
|
||||
SetDvarIfNotInitialized("cc_permission_mode", "name");
|
||||
SetDvarIfNotInitialized("cc_permission_default", 1);
|
||||
SetDvarIfNotInitialized("cc_permission_max", 4);
|
||||
|
||||
for (i = 0; i <= GetDvarInt("cc_permission_max"); i++)
|
||||
{
|
||||
SetDvarIfNotInitialized("cc_permission_" + i, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Commands section */
|
||||
@ -38,9 +56,10 @@ InitChatCommands()
|
||||
<commandName> the name of the command, this is what players will type in the chat
|
||||
<commandType> the type of the command: <text> is for arrays of text to display text in the player's chat and <function> is to execute a function
|
||||
<commandValue> when <commandType> is "text" this is an array of lines to print in the chat. When <commandType> is "function" this is a function pointer (a reference to a function)
|
||||
<commandHelp> an array of the lines to print when typing the help command in the chat followed by a command name. You can also pass an array of one preset string to have it auto generated, for example: ["default_help_one_player"]
|
||||
<commandMinimumPermission> (optional, if no value is provided then anyone who's permission level is default or above can run the command) the minimum permission level required to run this command. For example if this is set to 3 then any user with permission level 3 or 4 will be able to run this command
|
||||
<commandHelp> (optional) an array of the lines to print when typing the help command in the chat followed by a command name. You can also pass an array of one preset string to have it auto generated, for example: ["default_help_one_player"]
|
||||
*/
|
||||
CreateCommand(serverPorts, commandName, commandType, commandValue, commandHelp)
|
||||
CreateCommand(serverPorts, commandName, commandType, commandValue, commandMinimumPermission, commandHelp)
|
||||
{
|
||||
foreach (serverPort in serverPorts)
|
||||
{
|
||||
@ -53,11 +72,11 @@ CreateCommand(serverPorts, commandName, commandType, commandValue, commandHelp)
|
||||
|
||||
if (commandHelpString == "default_help_one_player")
|
||||
{
|
||||
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me", "Example: " + level.commands_prefix + commandName + " Resxt"];
|
||||
commandHelpMessage = ["Example: " + level.chat_commands["prefix"] + commandName + " me", "Example: " + level.chat_commands["prefix"] + commandName + " Resxt"];
|
||||
}
|
||||
else if (commandHelpString == "default_help_two_players")
|
||||
{
|
||||
commandHelpMessage = ["Example: " + level.commands_prefix + commandName + " me Resxt", "Example: " + level.commands_prefix + commandName + " Resxt me", "Example: " + level.commands_prefix + commandName + " Resxt Eldor"];
|
||||
commandHelpMessage = ["Example: " + level.chat_commands["prefix"] + commandName + " me Resxt", "Example: " + level.chat_commands["prefix"] + commandName + " Resxt me", "Example: " + level.chat_commands["prefix"] + commandName + " Resxt Eldor"];
|
||||
}
|
||||
|
||||
level.commands[serverPort][commandName]["help"] = commandHelpMessage;
|
||||
@ -71,6 +90,15 @@ CreateCommand(serverPorts, commandName, commandType, commandValue, commandHelp)
|
||||
{
|
||||
level.commands[serverPort][commandName]["function"] = commandValue;
|
||||
}
|
||||
|
||||
if (IsDefined(commandMinimumPermission))
|
||||
{
|
||||
level.commands[serverPort][commandName]["permission"] = commandMinimumPermission;
|
||||
}
|
||||
else
|
||||
{
|
||||
level.commands[serverPort][commandName]["permission"] = GetDvarInt("cc_permission_default");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -84,16 +112,22 @@ ChatListener()
|
||||
{
|
||||
level waittill("say", message, player);
|
||||
|
||||
if (message[0] != level.commands_prefix) // For some reason checking for the buggy character doesn't work so we start at the second character if the first isn't the command prefix
|
||||
if (message[0] != level.chat_commands["prefix"]) // For some reason checking for the buggy character doesn't work so we start at the second character if the first isn't the command prefix
|
||||
{
|
||||
message = GetSubStr(message, 1); // Remove the random/buggy character at index 0, get the real message
|
||||
}
|
||||
|
||||
if (message[0] != level.commands_prefix) // If the message doesn't start with the command prefix
|
||||
if (message[0] != level.chat_commands["prefix"]) // If the message doesn't start with the command prefix
|
||||
{
|
||||
continue; // stop
|
||||
}
|
||||
|
||||
if (PermissionIsEnabled() && player GetPlayerPermissionLevel() == 0)
|
||||
{
|
||||
player thread TellPlayer(InsufficientPermissionError(0), 1);
|
||||
continue; // stop
|
||||
}
|
||||
|
||||
commandArray = StrTok(message, " "); // Separate the command by space character. Example: ["!map", "mp_dome"]
|
||||
command = commandArray[0]; // The command as text. Example: !map
|
||||
args = []; // The arguments passed to the command. Example: ["mp_dome"]
|
||||
@ -105,14 +139,31 @@ ChatListener()
|
||||
|
||||
if (IsDefined(level.commands[GetDvar("net_port")]))
|
||||
{
|
||||
if (command == level.commands_prefix + "commands") // commands command
|
||||
if (command == level.chat_commands["prefix"] + "commands") // commands command
|
||||
{
|
||||
if (GetDvarInt("cc_permission_enabled"))
|
||||
{
|
||||
playerCommands = [];
|
||||
|
||||
foreach (commandName in GetArrayKeys(level.commands[GetDvar("net_port")]))
|
||||
{
|
||||
if (PlayerHasSufficientPermissions(player, level.commands[GetDvar("net_port")][commandName]["permission"]))
|
||||
{
|
||||
playerCommands = AddElementToArray(playerCommands, commandName);
|
||||
}
|
||||
}
|
||||
|
||||
player thread TellPlayer(playerCommands, 2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
player thread TellPlayer(GetArrayKeys(level.commands[GetDvar("net_port")]), 2, true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// help command
|
||||
if (command == level.commands_prefix + "help" && !IsDefined(level.commands[GetDvar("net_port")]["help"]) || command == level.commands_prefix + "help" && IsDefined(level.commands[GetDvar("net_port")]["help"]) && args.size >= 1)
|
||||
if (command == level.chat_commands["prefix"] + "help" && !IsDefined(level.commands[GetDvar("net_port")]["help"]) || command == level.chat_commands["prefix"] + "help" && IsDefined(level.commands[GetDvar("net_port")]["help"]) && args.size >= 1)
|
||||
{
|
||||
if (args.size < 1)
|
||||
{
|
||||
@ -123,6 +174,8 @@ ChatListener()
|
||||
commandValue = level.commands[GetDvar("net_port")][args[0]];
|
||||
|
||||
if (IsDefined(commandValue))
|
||||
{
|
||||
if (!PermissionIsEnabled() || PlayerHasSufficientPermissions(player, commandValue["permission"]))
|
||||
{
|
||||
commandHelp = commandValue["help"];
|
||||
|
||||
@ -136,6 +189,11 @@ ChatListener()
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player thread TellPlayer(InsufficientPermissionError(player GetPlayerPermissionLevel(), args[0], commandValue["permission"]), 1.5);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (args[0] == "commands")
|
||||
{
|
||||
@ -155,6 +213,8 @@ ChatListener()
|
||||
commandValue = level.commands[GetDvar("net_port")][commandName];
|
||||
|
||||
if (IsDefined(commandValue))
|
||||
{
|
||||
if (!PermissionIsEnabled() || PlayerHasSufficientPermissions(player, commandValue["permission"]))
|
||||
{
|
||||
if (commandValue["type"] == "text")
|
||||
{
|
||||
@ -171,6 +231,11 @@ ChatListener()
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player thread TellPlayer(InsufficientPermissionError(player GetPlayerPermissionLevel(), commandName, commandValue["permission"]), 1.5);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player thread TellPlayer(CommandDoesNotExistError(commandName), 1);
|
||||
}
|
||||
@ -179,7 +244,7 @@ ChatListener()
|
||||
}
|
||||
else
|
||||
{
|
||||
player thread TellPlayer(level.commands_no_commands_message, level.commands_no_commands_wait, false);
|
||||
player thread TellPlayer(level.chat_commands["no_commands_message"], level.chat_commands["no_commands_wait"], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -192,7 +257,7 @@ TellPlayer(messages, waitTime, isCommand)
|
||||
|
||||
if (IsDefined(isCommand) && isCommand)
|
||||
{
|
||||
message = level.commands_prefix + message;
|
||||
message = level.chat_commands["prefix"] + message;
|
||||
}
|
||||
|
||||
self tell(message);
|
||||
@ -206,11 +271,40 @@ TellPlayer(messages, waitTime, isCommand)
|
||||
|
||||
|
||||
|
||||
/* Player section */
|
||||
|
||||
OnPlayerConnect()
|
||||
{
|
||||
for(;;)
|
||||
{
|
||||
level waittill("connected", player);
|
||||
|
||||
if (player IsBot())
|
||||
{
|
||||
continue; // stop
|
||||
}
|
||||
|
||||
if (!IsDefined(player.pers["chat_commands"]))
|
||||
{
|
||||
player.pers["chat_commands"] = [];
|
||||
|
||||
if (DebugIsOn())
|
||||
{
|
||||
Print("GUID of " + player.name + ": " + player.guid);
|
||||
}
|
||||
}
|
||||
|
||||
player SetPlayerPermissionLevel(player GetPlayerPermissionLevelFromDvar());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Error functions section */
|
||||
|
||||
CommandDoesNotExistError(commandName)
|
||||
{
|
||||
return ["The command " + commandName + " doesn't exist", "Type " + level.commands_prefix + "commands to get a list of commands"];
|
||||
return ["The command " + commandName + " doesn't exist", "Type " + level.chat_commands["prefix"] + "commands to get a list of commands"];
|
||||
}
|
||||
|
||||
CommandHelpDoesNotExistError(commandName)
|
||||
@ -218,6 +312,21 @@ CommandHelpDoesNotExistError(commandName)
|
||||
return ["The command " + commandName + " doesn't have any help message"];
|
||||
}
|
||||
|
||||
InsufficientPermissionError(playerPermissionLevel, commandName, requiredPermissionLevel)
|
||||
{
|
||||
if (playerPermissionLevel == 0)
|
||||
{
|
||||
return ["You don't have the permissions to run any command"];
|
||||
}
|
||||
|
||||
return ["Access to the ^5" + commandName + " ^7command refused", "Your permission level is ^5" + playerPermissionLevel + " ^7and the minimum permission level for this command is ^5" + requiredPermissionLevel];
|
||||
}
|
||||
|
||||
InvalidPermissionLevelError(requestedPermissionLevel)
|
||||
{
|
||||
return ["^5" + requestedPermissionLevel + " ^7is not a valid permission level", "Permission levels range from ^50 ^7to ^5" + GetDvarInt("cc_permission_max")];
|
||||
}
|
||||
|
||||
NotEnoughArgsError(minimumArgs)
|
||||
{
|
||||
return ["Not enough arguments supplied", "At least " + minimumArgs + " argument expected"];
|
||||
@ -282,27 +391,82 @@ ToggleStatus(commandName, commandDisplayName, player)
|
||||
|
||||
GetStatus(commandName, player)
|
||||
{
|
||||
if (!IsDefined(player.chat_commands)) // avoid undefined errors in the console
|
||||
if (!IsDefined(player.pers["chat_commands"])) // avoid undefined errors in the console
|
||||
{
|
||||
player.chat_commands = [];
|
||||
player.pers["chat_commands"] = [];
|
||||
}
|
||||
|
||||
if (!IsDefined(player.chat_commands["status"])) // avoid undefined errors in the console
|
||||
if (!IsDefined(player.pers["chat_commands"]["status"])) // avoid undefined errors in the console
|
||||
{
|
||||
player.chat_commands["status"] = [];
|
||||
player.pers["chat_commands"]["status"] = [];
|
||||
}
|
||||
|
||||
if (!IsDefined(player.chat_commands["status"][commandName])) // status is set to OFF/false by default
|
||||
if (!IsDefined(player.pers["chat_commands"]["status"][commandName])) // status is set to OFF/false by default
|
||||
{
|
||||
SetStatus(commandName, player, false);
|
||||
}
|
||||
|
||||
return player.chat_commands["status"][commandName];
|
||||
return player.pers["chat_commands"]["status"][commandName];
|
||||
}
|
||||
|
||||
SetStatus(commandName, player, status)
|
||||
{
|
||||
player.chat_commands["status"][commandName] = status;
|
||||
player.pers["chat_commands"]["status"][commandName] = status;
|
||||
}
|
||||
|
||||
GetPlayerPermissionLevelFromDvar()
|
||||
{
|
||||
for (dvarIndex = GetDvarInt("cc_permission_max"); dvarIndex > 0; dvarIndex--)
|
||||
{
|
||||
dvarName = "cc_permission_" + dvarIndex;
|
||||
|
||||
foreach (value in StrTok(GetDvar(dvarName), ":"))
|
||||
{
|
||||
if (GetDvar("cc_permission_mode") == "name")
|
||||
{
|
||||
if (ToLower(value) == ToLower(self.name))
|
||||
{
|
||||
return dvarIndex;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value == self.guid)
|
||||
{
|
||||
return dvarIndex;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return GetDvarInt("cc_permission_default");
|
||||
}
|
||||
|
||||
GetPlayerPermissionLevel()
|
||||
{
|
||||
return self.pers["chat_commands"]["permission_level"];
|
||||
}
|
||||
|
||||
SetPlayerPermissionLevel(newPermissionLevel)
|
||||
{
|
||||
self.pers["chat_commands"]["permission_level"] = newPermissionLevel;
|
||||
}
|
||||
|
||||
PlayerHasSufficientPermissions(player, targetedPermissionLevel)
|
||||
{
|
||||
playerPermissionLevel = player GetPlayerPermissionLevel();
|
||||
|
||||
if (playerPermissionLevel == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!IsDefined(targetedPermissionLevel))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return playerPermissionLevel >= targetedPermissionLevel;
|
||||
}
|
||||
|
||||
DvarIsInitialized(dvarName)
|
||||
@ -311,6 +475,19 @@ DvarIsInitialized(dvarName)
|
||||
return result != "";
|
||||
}
|
||||
|
||||
SetDvarIfNotInitialized(dvarName, dvarValue)
|
||||
{
|
||||
if (!DvarIsInitialized(dvarName))
|
||||
{
|
||||
SetDvar(dvarName, dvarValue);
|
||||
}
|
||||
}
|
||||
|
||||
IsBot()
|
||||
{
|
||||
return IsDefined(self.pers["isBot"]) && self.pers["isBot"];
|
||||
}
|
||||
|
||||
TargetIsMyself(targetName)
|
||||
{
|
||||
return targetName == "me" || ToLower(targetName) == ToLower(self.name);
|
||||
@ -391,3 +568,13 @@ AddElementToArray(array, element)
|
||||
array[array.size] = element;
|
||||
return array;
|
||||
}
|
||||
|
||||
DebugIsOn()
|
||||
{
|
||||
return GetDvarInt("cc_debug");
|
||||
}
|
||||
|
||||
PermissionIsEnabled()
|
||||
{
|
||||
return GetDvarInt("cc_permission_enabled");
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user