Repository navigation
Scripting Network
-
PSenum - Automatic weapon selection type for player settings:-
PS.WAS_ONLYNEW- Only select newly picked up weapons -
PS.WAS_NONE- Never select weapons automatically -
PS.WAS_ALL- Automatically select every picked up weapon -
PS.WAS_BETTER- Only select weapons that are stronger than the currently held one
-
-
PSFenum - Player settings flags:-
PSF.HIDEWEAPON- Whether to hide the weapon viewmodel from the first person view -
PSF.PREFER3RDPERSON- Whether to automatically switch to the third person view -
PSF.NOQUOTES- Whether to mute all sounds played byCVoiceHolderentities -
PSF.AUTOSAVE- Whether to autosave the game in single player -
PSF.COMPSINGLECLICK- Whether to only use a single press of the NETRICSA button in order to bring it up -
PSF.SHARPTURNING- Whether to use sharp turning on the first person view -
PSF.NOBOBBING- Whether to disable view & weapon bobbing from the first person view
-
-
SOFenum - Sound playback flags:-
SOF.NONE- No flags (equal to0) -
SOF.LOOP- Make the sound repeat indefinitely -
SOF.3D- Use 3D positioning for the sound -
SOF.VOLUMETRIC- Allow the sound to change pitch when played from a moving source -
SOF.SURROUND- Simulate the effect of the sound coming from every direction at once -
SOF.LOCAL- Allow the sound to be played only for the local player (if playing from a sound object of a player entity) -
SOF.SMOOTHCHANGE- Play the new sound as soon as the old one finishes playing instead of immediately switching to it -
SOF.MUSIC- Use the music channel for playing the sound -
SOF.NONGAME- Allow the sound to continue playing outside the game (when the menu is open) -
SOF.NOFILTER- Ignore listener filter (e.g. more bassy sounds when underwater) SOF.PAUSEDSOF.LOADEDSOF.PREPARESOF.PLAY
-
-
ChatCommandAccessenum - Access level for chat commands:-
ChatCommandAccess.Everyone- Chat command can be used by anyone -
ChatCommandAccess.Admin- Chat command can only be used by admins and operators -
ChatCommandAccess.Operator- Chat command can only be used by operators
-
VanillaSP enum contains byte offsets of each session property in the vanilla game. These values may be invalid when used in user-made mods due to the differences in session properties, where some of the properties may be offset or removed entirely. This enum exists purely for convenience when scripting server plugins for the vanilla game.
The First Encounter session properties in order
| Session property | Type | Length | Offset |
|---|---|---|---|
VanillaSP.ctMaxPlayers |
Integer | 4 bytes | 0 |
VanillaSP.bWaitAllPlayers |
Integer | 4 bytes | 4 |
VanillaSP.bQuickTest |
Integer | 4 bytes | 8 |
VanillaSP.bCooperative |
Integer | 4 bytes | 12 |
VanillaSP.bSinglePlayer |
Integer | 4 bytes | 16 |
VanillaSP.bUseFrags |
Integer | 4 bytes | 20 |
VanillaSP.gmGameMode |
Integer | 4 bytes | 24 |
VanillaSP.gdGameDifficulty |
Integer | 4 bytes | 28 |
VanillaSP.ulSpawnFlags |
Integer | 4 bytes | 32 |
VanillaSP.bMental |
Integer | 4 bytes | 36 |
VanillaSP.iScoreLimit |
Integer | 4 bytes | 40 |
VanillaSP.iFragLimit |
Integer | 4 bytes | 44 |
VanillaSP.iTimeLimit |
Integer | 4 bytes | 48 |
VanillaSP.bTeamPlay |
Integer | 4 bytes | 52 |
VanillaSP.bFriendlyFire |
Integer | 4 bytes | 56 |
VanillaSP.bWeaponsStay |
Integer | 4 bytes | 60 |
VanillaSP.bAmmoStays |
Integer | 4 bytes | 64 |
VanillaSP.bHealthArmorStays |
Integer | 4 bytes | 68 |
VanillaSP.bPlayEntireGame |
Integer | 4 bytes | 72 |
VanillaSP.bAllowHealth |
Integer | 4 bytes | 76 |
VanillaSP.bAllowArmor |
Integer | 4 bytes | 80 |
VanillaSP.bInfiniteAmmo |
Integer | 4 bytes | 84 |
VanillaSP.fEnemyMovementSpeed |
Float | 4 bytes | 88 |
VanillaSP.fEnemyAttackSpeed |
Float | 4 bytes | 92 |
VanillaSP.fDamageStrength |
Float | 4 bytes | 96 |
VanillaSP.fAmmoQuantity |
Float | 4 bytes | 100 |
VanillaSP.fManaTransferFactor |
Float | 4 bytes | 104 |
VanillaSP.iInitialMana |
Integer | 4 bytes | 108 |
VanillaSP.fExtraEnemyStrength |
Float | 4 bytes | 112 |
VanillaSP.fExtraEnemyStrengthPerPlayer |
Float | 4 bytes | 116 |
VanillaSP.ctCredits |
Integer | 4 bytes | 120 |
VanillaSP.ctCreditsLeft |
Integer | 4 bytes | 124 |
VanillaSP.tmSpawnInvulnerability |
Float | 4 bytes | 128 |
VanillaSP.iBlood |
Integer | 4 bytes | 132 |
VanillaSP.bGibs |
Integer | 4 bytes | 136 |
VanillaSP.bEndOfGame |
Integer | 4 bytes | 140 |
VanillaSP.ulLevelsMask |
Integer | 4 bytes | 144 |
VanillaSP.bRespawnInPlace |
Integer | 4 bytes | 148 |
The Second Encounter session properties in order
| Session property | Type | Length | Offset |
|---|---|---|---|
VanillaSP.ctMaxPlayers |
Integer | 4 bytes | 0 |
VanillaSP.bWaitAllPlayers |
Integer | 4 bytes | 4 |
VanillaSP.bQuickTest |
Integer | 4 bytes | 8 |
VanillaSP.bCooperative |
Integer | 4 bytes | 12 |
VanillaSP.bSinglePlayer |
Integer | 4 bytes | 16 |
VanillaSP.bUseFrags |
Integer | 4 bytes | 20 |
VanillaSP.gmGameMode |
Integer | 4 bytes | 24 |
VanillaSP.gdGameDifficulty |
Integer | 4 bytes | 28 |
VanillaSP.ulSpawnFlags |
Integer | 4 bytes | 32 |
VanillaSP.bMental |
Integer | 4 bytes | 36 |
VanillaSP.iScoreLimit |
Integer | 4 bytes | 40 |
VanillaSP.iFragLimit |
Integer | 4 bytes | 44 |
VanillaSP.iTimeLimit |
Integer | 4 bytes | 48 |
VanillaSP.bTeamPlay |
Integer | 4 bytes | 52 |
VanillaSP.bFriendlyFire |
Integer | 4 bytes | 56 |
VanillaSP.bWeaponsStay |
Integer | 4 bytes | 60 |
VanillaSP.bAmmoStays |
Integer | 4 bytes | 64 |
VanillaSP.bHealthArmorStays |
Integer | 4 bytes | 68 |
VanillaSP.bPlayEntireGame |
Integer | 4 bytes | 72 |
VanillaSP.bAllowHealth |
Integer | 4 bytes | 76 |
VanillaSP.bAllowArmor |
Integer | 4 bytes | 80 |
VanillaSP.bInfiniteAmmo |
Integer | 4 bytes | 84 |
VanillaSP.bRespawnInPlace |
Integer | 4 bytes | 88 |
VanillaSP.fEnemyMovementSpeed |
Float | 4 bytes | 92 |
VanillaSP.fEnemyAttackSpeed |
Float | 4 bytes | 96 |
VanillaSP.fDamageStrength |
Float | 4 bytes | 100 |
VanillaSP.fAmmoQuantity |
Float | 4 bytes | 104 |
VanillaSP.fManaTransferFactor |
Float | 4 bytes | 108 |
VanillaSP.iInitialMana |
Integer | 4 bytes | 112 |
VanillaSP.fExtraEnemyStrength |
Float | 4 bytes | 116 |
VanillaSP.fExtraEnemyStrengthPerPlayer |
Float | 4 bytes | 120 |
VanillaSP.ctCredits |
Integer | 4 bytes | 124 |
VanillaSP.ctCreditsLeft |
Integer | 4 bytes | 128 |
VanillaSP.tmSpawnInvulnerability |
Float | 4 bytes | 132 |
VanillaSP.iBlood |
Integer | 4 bytes | 136 |
VanillaSP.bGibs |
Integer | 4 bytes | 140 |
VanillaSP.bEndOfGame |
Integer | 4 bytes | 144 |
VanillaSP.ulLevelsMask |
Integer | 4 bytes | 148 |
VanillaSP.bUseExtraEnemies |
Integer | 4 bytes | 152 |
Class for representing a single input action for some server client.
Resets action data to empty defaults. Equivalent to the engine's
CPlayerAction::Clear().
Return value: null
Applies linear interpolation between two actions and sets the results to this action. Equivalent to the engine's
CPlayerAction::Lerp().
Arguments:
-
action0-CPlayerActionwith the first action. -
action1-CPlayerActionwith the second action. -
factor- Linear interpolation factor between the two actions from0.0to1.0.
Return value: null
Applied movement of the player. Equivalent to the engine's
CPlayerAction::pa_vTranslation.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
FLOAT3D |
FLOAT3D(0, 0, 0) |
Yes | Yes |
Applied rotation of the player. Equivalent to the engine's
CPlayerAction::pa_aRotation.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
FLOAT3D |
FLOAT3D(0, 0, 0) |
Yes | Yes |
Applied rotation of the player's view. Equivalent to the engine's
CPlayerAction::pa_aViewRotation.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
FLOAT3D |
FLOAT3D(0, 0, 0) |
Yes | Yes |
Mask of pressed button actions, excluding movement and rotations. Equivalent to the engine's
CPlayerAction::pa_ulButtons.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
integer |
0 |
Yes | Yes |
Class for representing a character profile of a specific server player.
Constructs a character instance with a GUID from the specified buffer with at least 16 bytes of data.
Arguments:
-
buffer(optional) -CRawDataBufferwith at least 16 bytes containing the GUID to set to the player character.
Creates a copy of the character instance.
Return value: CPlayerCharacter
Returns character name for printing with appropriate decoration tags around it.
Return value: string
Compares this character with another character. A helper method for the lack of the
==operator overloading.
Arguments:
-
other- AnotherCPlayerCharacterto compare this one with.
Return value: bool
Returns full path to the file with the used player model. Equivalent to the engine's
((CPlayerSettings *)CPlayerCharacter::pc_aubAppearance)->GetModelFilename().
Return value: string
Player's display name. Equivalent to the engine's
CPlayerCharacter::pc_strName.
| Type | Readable | Writeable |
|---|---|---|
string |
Yes | Yes |
Player's internal team name. Equivalent to the engine's
CPlayerCharacter::pc_strTeam.
| Type | Readable | Writeable |
|---|---|---|
string |
Yes | Yes |
Name of the used player model. Equivalent to the engine's
((CPlayerSettings *)CPlayerCharacter::pc_aubAppearance)->ps_achModelFile.
| Type | Readable | Writeable |
|---|---|---|
string |
Yes | Yes |
Weapon auto-select mode from the
PSenum. Equivalent to the engine's((CPlayerSettings *)CPlayerCharacter::pc_aubAppearance)->ps_iWeaponAutoSelect.
| Type | Readable | Writeable |
|---|---|---|
integer |
Yes | Yes |
Currently selected crosshair type. Equivalent to the engine's
((CPlayerSettings *)CPlayerCharacter::pc_aubAppearance)->ps_iCrossHairType.
| Type | Readable | Writeable |
|---|---|---|
integer |
Yes | Yes |
Player settings flags from the
PSFenum. Equivalent to the engine's((CPlayerSettings *)CPlayerCharacter::pc_aubAppearance)->ps_ulFlags.
| Type | Readable | Writeable |
|---|---|---|
integer |
Yes | Yes |
Class for holding a sequence of session properties values for applying over the network. Extends CRawDataBuffer class.
Constructs a new buffer by copying session properties from another structure. If left unspecified, fills the buffer with the current session properties in order to preserve current values in gaps between modified values.
Arguments:
-
other(optional) -Network.SessionPropertiesto copy session properties from.
Sends a chunk of modified session properties to all clients on the server.
Return value: null
local props = Network.SessionProperties(); // Create session properties structure
// Use values from the VanillaSP enum to specify byte offsets of session properties from vanilla games
props.SetFloat(VanillaSP.fExtraEnemyStrength, 2); // Increase extra enemy strength
props.SetBool(VanillaSP.bInfiniteAmmo, true); // Enable infinite ammo
props.SetIndex(VanillaSP.ctCreditsLeft, props.GetIndex(VanillaSP.ctCreditsLeft) - 1); // Decrease respawn credits by 1
props.SetIndex(VanillaSP.bAllowHealth, props.GetIndex(VanillaSP.bAllowArmor)); // Synchronize bAllowHealth with bAllowArmor
props.Apply(); // Send new session properties values to all clientsClass for setting up a network-synchronized sound to play for all clients (or locally).
Constructs a new sound and optionally presets the sound file, the channel to play on and the volume. Unspecified values are set to no sound file, channel 0 and volume
1.0.
Arguments:
-
path(optional) - Path to the sound file. -
channel(optional) - Index of a channel to use for the sound from0to31. -
volume(optional) - Sound volume from0.0to4.0.
Checks whether any sound is currently playing on the specified channel.
Return value: bool
Checks whether the sound on the specified channel is currently paused.
Return value: bool
Plays set up sound. The optional argument specifies whether to play the sound locally, which doesn't send any packet from the server and can be called by non-hosting clients.
Arguments:
-
local(optional) - Whether to play the sound locally on the same game instance as the executed script.
Return value: null
Stops the sound. The optional argument specifies whether to stop the sound locally, which doesn't send any packet from the server and can be called by non-hosting clients.
Arguments:
-
local(optional) - Whether to play the sound locally on the same game instance as the executed script.
Return value: null
Path to the sound file to play. Setting it to
/stop/stops any playback on the specified channel. Leaving it empty allows modifying sound properties during playback on the specified channel.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
string |
"" |
Yes | Yes |
Index of a channel to use for playing the sound from 0 to 31. Only one sound can be played on each channel at a time.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
integer |
0 |
Yes | Yes |
Sound playback flags from the
SOFenum.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
integer |
SOF.NONE |
Yes | Yes |
Delay before playing the sound in seconds.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
0.0 |
Yes | Yes |
Sound cutoff point from the beginning in seconds.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
0.0 |
Yes | Yes |
Volume of the left sound channel from
0.0to4.0.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
1.0 |
Yes | Yes |
Volume of the right sound channel from
0.0to4.0.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
1.0 |
Yes | Yes |
Convenience variable for setting volume for both sound channels at once.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
N/A | No | Yes |
Bass filter of the left sound channel from
1.0to500.0.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
1.0 |
Yes | Yes |
Bass filter of the right sound channel from
1.0to500.0.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
1.0 |
Yes | Yes |
Convenience variable for setting bass filter for both sound channels at once.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
N/A | No | Yes |
Sound pitch from
0.0to10.0.
| Type | Default value | Readable | Writeable |
|---|---|---|---|
float |
1.0 |
Yes | Yes |
// Set up a new sound on channel 0 at 50% volume
local snd = Network.Sound("Sounds\\Menu\\Chat.wav", 0, 0.5);
snd.fPitch = 2; // Play twice as fast
snd.Play(); // Play the sound for all clients globallyChecks whether the client is currently hosting any game: splitscreen, multiplayer server or a single player game.
Return value: bool
Checks whether the client is currently communicating via a network, e.g. hosting an online server or is connected to a remote server.
Return value: bool
Helper function that checks whether the client is specifically hosting an online multiplayer server.
Return value: bool
Helper function that checks whether the client is specifically connected to a remote server.
Return value: bool
Checks whether the client is currently observing an online game instead of participating in it as another player.
Return value: bool
Checks whether the client has prediction enabled for the current game.
Return value: bool
Returns maximum amount of players allowed in the current game.
Return value: integer
Checks whether the currently running server is compatible with vanilla clients, i.e. has
ser_bForbidVanillaturned off and has all gameplay extensions disabled.
This function is only relevant for the server and will always returnfalseifNetwork.IsHost()is alsofalse.
Return value: bool
Starts recording a new demo of the current game in the specified file.
Arguments:
-
path- Path to a demo file (.dem) to start recording the demo into.
Return value: null
Stops all demo recording, if there's any.
Return value: null
Checks whether the current game is a demo playback.
Return value: bool
Checks whether any demo is currently being recorded.
Return value: bool
Checks whether any demo playback has just finished.
Return value: bool
Checks whether the server is waiting for more players to connect.
Return value: bool
Checks whether the client is waiting for the server to respond.
Return value: bool
Checks whether the connection to the server is stable.
Return value: bool
Checks whether the client got disconnected from a server.
Return value: bool
Returns the reason for disconnecting the client from the server.
Return value: string
Checks whether the current game has been finished.
Return value: bool
Returns time multiplication factor of the current simulation.
Return value: float
Returns file path of the currently loaded world.
Return value: string
Returns time since the start of the current game in seconds.
Return value: float
Returns entity of a specific player by a unique index on the server. If the player target is inactive, returns an empty
CEntityPointer.
Throws a runtime error if the specified index is out of bounds.
Arguments:
-
index- Index of a player from0toNetwork.GetMaxPlayerTargets() - 1.
Return value: CEntityPointer that points to a player entity (may be none).
Checks whether a specific player is currently active under a unique index on the server.
Throws a runtime error if the specified index is out of bounds.
Arguments:
-
index- Index of a player from0toNetwork.GetMaxPlayerTargets() - 1.
Return value: bool
Returns maximum amount of player targets that can currently be on the server at any given time.
Return value: integer
Returns entity of a specific player by name on the server. If multiple players have the exact same name, returns the entity of the first found player with that name.
Arguments:
-
name- Display name of a specific player to search for.
Return value: CEntityPointer that points to a player entity (may be null).
Counts all entities in the current world with a specific entity name.
Arguments:
-
name- Name of entities to count.
Return value: integer with the amount of entities under the specified name.
Goes through all entities in the current world with a specific name and returns one under a specific index in order of appearance.
Arguments:
-
name- Name of entities to go through. -
index- Which entity under the specified name to retrieve.
Return value: CEntityPointer that points to the indexth entity under the specified name.
Checks whether the specified entity is a player entity and whether it belongs to the client who runs this function.
Arguments:
-
entity-CEntityPointerwith the player entity to check.
Return value: bool with whether the specified entity is a player of a local client.
Requests a game pause from the client side. If "Clients may pause" game option is turned off, this won't work.
Return value: null
Checks whether the current game is paused.
Return value: bool
Sends a chat message from specific clients to other specific clients.
Arguments:
-
from- Client flags to send the chat message from (-1to send from all local players). -
to- Client flags to send the chat message to (-1to send to everyone on the server). -
message- Chat message to send.
Return value: null
Sends a chat message to just one specific client with a custom sender name.
Arguments:
-
client- Index of a client to send a message to. -
name- Name of the sender to display. -
message- Chat message to send.
Return value: null
Sends a chat message to all clients on the server with a custom sender name.
Arguments:
-
name- Name of the sender to display. -
message- Chat message to send.
Return value: null
Kicks a specific client from the server with a reason. Client index
0refers to the server itself and cannot be used.
Arguments:
-
client- Index of a client to kick. -
reason- Message explaining the reason for a kick.
Return value: null
Returns the name of the machine that's currently running the server.
Return value: string with the host name.
Returns a comma-separated list of local network addresses of the machine that are currently used for running the server.
Return value: string with the host addresses.
Returns a list of unique indices of active server clients. Valid values may be from
0toNetwork.GetMaxClients() - 1. These indices refer to unique computers that are connected to the server, which may include clients with no players (observers) and clients with multiple players (split screen).
Return value: array with indices of active server clients.
Returns maximum amount of clients that may exist on a server at any given time, including clients with no players (observers) and clients with multiple players (split screen).
Return value: integer
Checks whether the specified client slot is currently occupied by an active client. Throws a runtime error if the client index is out of bounds.
Arguments:
-
client- Index of a client to check.
Return value: bool with whether the specified client is active.
Returns the amount of actual players on the server, which may differ from the amount of clients.
Arguments:
-
vip- Whether to only count VIP players.
Return value: integer with the amount of players.
Returns the amount of server clients.
Arguments:
-
vip- Whether to only count VIP clients.
Return value: integer with the amount of clients.
Returns the amount of clients with no players.
Return value: integer with the amount of observers.
Returns the amount of actual players of a specific client.
Arguments:
-
client- Index of a client to count the players of
Return value: integer with the amount of players.
Returns current value of the specified gameplay extension. Throws a runtime error if the gameplay extension doesn't exist.
Arguments:
-
name- Name of the gameplay extension to get the value of.
Return value: bool/integer/float/string - depending on the gameplay extension type.
Sets a new value to the specified gameplay extension by sending a network packet with the change to all clients.
Arguments:
-
name- Name of the gameplay extension to set the value to. -
value- New value to set. May bebool,integer,floatorstring.
Return value: null
Naturally changes the current level on the server by creating and triggering a
CWorldLinkentity. May not work in mods that significantly change the behavior of this entity class.
Arguments:
-
file- Path to a world file to change to.
Return value: null
Immediately changes the current level on the server by calling the
CNetworkLibrary::ChangeLevel()engine function, which may introduce unintentional side effects, such as spawning all players in the center of the next level instead of anyCPlayerMarker.
Arguments:
-
file- Path to a world file to change to.
Return value: null
Stops playing sounds on the specified global channel.
Arguments:
-
channel- Sound channel to stop playing sounds on (0-31).
Return value: null
Returns a copy of a network sound from the specified channel that can be used to get information about the currently playing sound or to set it up to play a different sound.
Arguments:
-
channel- Sound channel to get a sound from (0-31).
Return value: Network.Sound with copied sound properties from the specified channel.
Reads a signed 32-bit integer value (4 bytes) from raw session properties data at the specified offset. Throws a runtime error if the offset is out of bounds.
Arguments:
-
offset- Offset to read session properties data from.
Return value: integer
Reads a 32-bit float value (4 bytes) from raw session properties data at the specified offset. Throws a runtime error if the offset is out of bounds.
Arguments:
-
offset- Offset to read session properties data from.
Return value: float
Reads a 32-bit integer value (4 bytes) from raw session properties data at the specified offset and casts it into a boolean value. Throws a runtime error if the offset is out of bounds.
Arguments:
-
offset- Offset to read session properties data from.
Return value: bool
Reads the specified amount of bytes from raw session properties data at the specified offset and returns them as a null-terminated string. Throws a runtime error if the offset is out of bounds.
Arguments:
-
offset- Offset to read session properties data from. -
length- Amount of bytes/characters to read.
Return value: string
Reads a single byte from raw session properties data at the specified offset and casts it into an integer value. Throws a runtime error if the offset is out of bounds.
Arguments:
-
offset- Offset to read session properties data from.
Return value: integer
Registers a new chat command by its name. Throws a runtime error if the command with that name already exists.
Squirrel closure for the command should accept two arguments: client index (integer) and command arguments as a continuous string as provided (string). The return value must be a string that will act as command output.
Arguments:
-
command- Name of the command to add. -
function- Squirrel closure to execute upon running the command.
Return value: null
function MyCommand(client, args) {
// Example output:
// : You are client number 1, congratulations!
// : Passed command arguments: 123 hello
return "You are client number " + client + ", congratulations!\nPassed command arguments: " + args;
};
// Example input:
// > !mycom 123 hello
Network.AddChatCommand("mycom", MyCommand);Unregisters a chat command by its name. Throws a runtime error if the command with that name doesn't exist or hasn't been registered by the same VM/script.
Arguments:
-
command- Name of the command to remove.
Return value: null
Checks whether some chat command has been registered.
Arguments:
-
command- Name of the command to check.
Return value: bool with whether the specified command already exists.
Sets access level for the chat command and whether to hide it from regular clients when listing it using the
!helpcommand.
Arguments:
-
command- Name of the command to check. -
level- Access level to set from theChatCommandAccessenum. -
hidden- Whether the command should be hidden from the list of all commands.
Return value: bool with whether the command access has been changed.
Sets useful usage information about the chat command when listing it using the
!helpcommand.
Arguments:
-
command- Name of the command to set info for. -
arguments- List of arguments that the command accepts (may be empty). Example:"<index> <time> [message]" -
description- Short description of the command's purpose.
Return value: bool with whether the command info has been changed.
Designed and developed by Dreamy Cecil since 2022