5 Commits

Author SHA1 Message Date
Resxt
b0b66dcfbc 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.)
2023-03-18 01:27:20 +01:00
Resxt
53dc47157e chat_commands 1.2.3
Added CamoDoesNotExistError error
Added GetWeaponNameWithoutCamo util function
Added GetCamoNameFromNameOrIndex util function
2023-02-21 19:29:38 +01:00
Resxt
0c20175902 chat_commands 1.2.2
Added TargetIsMyself util function
2023-02-19 15:01:14 +01:00
Resxt
994e69632e chat_commands 1.2.1
Added DvarDoesNotExistError error
Added DvarIsInitialized util function
2023-02-16 16:27:49 +01:00
Resxt
113424553d chat_commands 1.2.0
This is a refactor/dev that changes how the commands work but the usage stays the same for the end user. The only difference is that you now have to install each command as a separate file

[Refactor]
Moved all the commands to their respective file, just like a plugin system to easily allow the user to add/remove commands

If the server has no commands it will display a message when trying to run any command with the prefix

[Dev]
Added args comment for the CreateCommand function (commandValue and commandHelp)
2023-02-16 03:42:39 +01:00