Added wallhack command to grant or remove access to a wallhack (red boxes) to a player (toggle)
[DEV]
This showcases how to implement a status/toggle command with a non permanent logic (implementing OnPlayerSpawned())
Added invisible command to grant or remove the invisible state to a player (toggle)
Note that this does not make you invisible to bots in the sense that even if they can't see you they will still know your position and shoot you on sight
All commands that require a player name to be passed now work both with a player name or with "me" to target yourself
[Dev]
All commands that use FindPlayerByName will now work with "me" passed as the player out of the box since FindPlayerByName now returns self if the name param is "me"
[Refactor]
Fix undefined errors when calling a status command for the first time on a player
Added norecoil command to grant or remove access to no recoil to a player (toggle)
[DEV]
Introduced the status system to make implementing toggle commands easier.
It allows the dev to get and set a status on a player per command and display messages both for the person running the command and for the player affected when the player status changes (for example no recoil ON/OFF).
Note that the status is always OFF by default since we always grant something to a player
Added teleport command to teleport a player or yourself to another player or yourself
!teleport me Eldor
!teleport Eldor me
!teleport Eldor Rektinator
[Refactor]
Replaced array[array.size] = value with AddElementToArray(array, value)
Made it possible to have a default randomized map and mode from a user defined list when the human players count is between two values defined by the user
Added dvar mapvote_default_rotation_maps
Added dvar mapvote_default_rotation_modes
Added dvar mapvote_default_rotation_min_players
Added dvar mapvote_default_rotation_max_players
Added the possibility to have no maps at all in the mapvote_maps dvar.
This is useful for when you want to organise your maps dvar and you don't want any MW3 map for example
Added help command to display the help message for a particular command.
An optional commandHelp argument has been added to the CreateCommand function.
A help command with no arguments can still be created. The script will understand the context and display the right info
Made examples in InitCommands() clearer by separating them and adding comments
Added comments to separate each command section: commands, help and other commands
Allow configuration of the commands prefix
Added a function to easily create commands
Added the ability to pass an array of server ports instead of just one port per command
Added the ability to add a command to all servers using level.commands_servers_ports
Fixed the warning when running a function command by explicitly defining whether a command is of type text or function
Fixed commands not working when using the say command through the console instead of the chat. Now both works
First working and releasable version of the gun game mode.
It can still be worked on to add support for dvars instead of configuring level scope variables, also support other game modes among other possible improvements