11 Commits

Author SHA1 Message Date
Resxt
fb57ea3c4e chat_commands 1.1.5
Added PowerupDoesNotExistError
Added GetAvailablePowerups util function
Added IsValidPowerup util function
2023-10-27 13:54:25 +02:00
Resxt
139ff05c46 chat_commands 1.1.4
Made it so that players can type commands and "me" (when targeting a player) any way they want. There doesn't need to be an exact match full lower case anymore for both of these
2023-10-23 22:48:36 +02:00
Resxt
8bb3055978 chat_commands 1.1.3
Added the NotEnoughPointsError
2023-10-09 18:50:44 +02:00
Resxt
55c89418c4 chat_commands 1.1.2
Added the ability to find players by typing a part of their name (starting from the beginning of their names) instead of having to type their full names all the time.

For example to kill Resxt you can now just type !kill res
If there is a player named Resxt and another named Resxtola then typing !kill resxt will kill Resxt because we got an exact match. If you type !kill Resx it won't kill anyone because there are two potential players found so we can't be sure who the command should be run on. If you type !kill Resxto it will kill Resxtola
2023-10-09 07:39:01 +02:00
Resxt
5001fc8b8f chat_commands 1.1.1
Fix commands not working on dedicated servers
The newly added ExecuteCommand function already exists (on dedicated servers only) and therefore it was always called the game's function instead of the chat commands function.
Simply renaming them to a more specific name fixed the issue
2023-06-18 15:39:41 +02:00
Resxt
52820e82fc chat_commands 1.1.0
Added an alias system so that a command can be called with different names.
The alias commands respects the permission system and can be used seemingly with the help and alias command.
The commands command still only lists the original/full command name, it doesn't list aliases
CreateCommand now has an addition argument commands can use: commandAliases

Added a new !alias or !aliases command
With these commands you can get the available alias(es) of a command by its original name or one of its alias
For example !alias god or !alias godmode

Some refactor to make the ChatListener function easier to read along with some comments to separate each command logic (built-in commands and "any other command")

Added CommandAliasesDoesNotExistError

Added GetCommandNameFromAlias util function
2023-06-17 10:25:39 +02:00
Resxt
a4a714da47 chat_commands 1.0.4
Only create variables for the port currently in-use
For example: there's no need to create level.chat_commands["4977"] if the currently used port is 4976. This simply adds a bunch of variables and child variables for no reason, this was a flawed implementation that create an array per port on every server. Now it will only create an array for its own port as expected

Removed 3074 from the default ports
This port is not actively used by net_port, this was just a misunderstanding on my part
2023-06-15 13:34:04 +02:00
Resxt
6a7a518c73 chat_commands 1.0.3
Added 3074 to default ports

Added WeaponDoesNotExistError error

Added IsValidWeapon utils function
2023-06-12 21:13:03 +02:00
Resxt
0e9181f188 chat_commands 1.0.2
Added default 1s wait time to TellPlayer in case no wait time is passed

Added TellAllPlayers util function

Added InvalidRoundError error
2023-03-25 22:32:58 +01:00
Resxt
3b2ca9405a chat_commands 1.0.1
Added IsMultiplayerMode utils function
2023-03-24 01:20:43 +01:00
Resxt
4103a82fb2 chat_commands 1.0.0
This is a port of my MW3 chat_commands script (version 1.3.2)
ba1322b933

The array declarations such as array = ["value"] were changed to use the array function

The tell function (player chat) was changed IPrintLnBold. More explanation in the README

Support for clantags was added. Clantags were changing the player's name which would then make the script fail to find the player when typing his name. This has been tested and fixed. More explanation in the README

Errors and util functions related to camo were removed. The way camo works seems to be really different than MW3 so work is required to implement these again
2023-03-21 02:50:45 +01:00