CONSOLE
Console Pseudoplayer Library.
- ServerCONSOLE:Announce(msg)Source ☍
-
Announce an automated server message in every player's chat, attributed to the console. Rendered through the Discord relay's stand-in player table, so the line carries the console rank's icon and colour rather than the bare "Console: " the engine's
sayproduces. The relay owns that table on both realms, so without it there is nothing clientside to receive the announcement and this falls back tosay.Parameters
- msgstringThe message to announce.
- ServerCONSOLE:ChatPrint(msg)Source ☍
-
Print a chat message to the console.
Parameters
- msgstringThe message to print.
- ServerCONSOLE:EntIndex() → numberSource ☍
-
Get the console pseudoplayer's entity index.
Returns
- numberAlways returns the WorldIndex
- ServerCONSOLE:EventMgr() → booleanSource ☍
-
Check if the console pseudoplayer is an event manager.
Returns
- booleanAlways returns true.
- ServerCONSOLE:GetSVRank() → stringSource ☍
-
Get the console pseudoplayer's server rank.
Returns
- stringAlways returns "console".
- ServerCONSOLE:HasAccess(tag) → booleanSource ☍
-
Check if the console pseudoplayer has specific access.
Parameters
- tagstringThe access tag to check (ignored for console).
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsAdmin() → booleanSource ☍
-
Check if the console pseudoplayer has admin privileges.
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsModerator() → booleanSource ☍
-
Check if the console pseudoplayer has Moderator permissions.
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsModerator2() → booleanSource ☍
-
Check if the console pseudoplayer has Moderator 2 permissions.
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsPlayer() → booleanSource ☍
-
Check if the console pseudoplayer is a player.
Returns
- booleanAlways returns true for compatibility with player checks.
- ServerCONSOLE:IsSuperAdmin() → booleanSource ☍
-
Check if the console pseudoplayer has superadmin privileges.
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsTrialMod() → booleanSource ☍
-
Check if the console pseudoplayer has Trial Moderator permissions.
Returns
- booleanAlways returns true.
- ServerCONSOLE:IsValid() → booleanSource ☍
-
Check if the console pseudoplayer is valid.
Returns
- booleanAlways returns true.
- ServerCONSOLE:Name() → stringSource ☍
-
Get the console pseudoplayer's name.
Returns
- stringAlways returns "Console".
- ServerCONSOLE:Notify(msg, class, priority)Source ☍
-
Send a notification to the console.
Parameters
- msgstringThe notification message to display.
- classnumberThe notification class/type.
- prioritybooleanThe notification priority.
- ServerCONSOLE:printMessage(msg)Source ☍
-
Print a message to the console.
Parameters
- msgstringThe message to print.
- ServerCONSOLE:PrintMessage(msgType, msg)Source ☍
-
Print a message to the console with a message type.
Parameters
- msgTypenumberThe message type (unused, for compatibility).
- msgstringThe message to print.
- ServerCONSOLE:SteamID() → stringSource ☍
-
Get the console pseudoplayer's SteamID.
Returns
- stringAlways returns "CONSOLE".
- ServerCONSOLESource ☍
-
A pseudoplayer table that can be used in place of a regular player for automated server actions. This table implements a subset of the Player metatable methods to allow it to be used where a player object is expected, such as for bans, kicks, or admin commands initiated by the server.
Note: while this table can be used in place of a regular player, it will fail for most regular player operations that require an actual entity (e.g., GetPos(), Spawn(), etc.).
Example usage:
CONSOLE:Name() -- Returns "Console" cityrp.bans.DoBan(CONSOLE, steamid, nick, 0, reason) cityrp.acommands.adminDo(CONSOLE, "Server action performed", icon, flags)
- ServerCONSOLESource ☍
-
A pseudoplayer table that can be used in place of a regular player for automated server actions. This table implements a subset of the Player metatable methods to allow it to be used where a player object is expected, such as for bans, kicks, or admin commands initiated by the server.
Note: while this table can be used in place of a regular player, it will fail for most regular player operations that require an actual entity (e.g., GetPos(), Spawn(), etc.).
Example usage:
CONSOLE:Name() -- Returns "Console" cityrp.bans.DoBan(CONSOLE, steamid, nick, 0, reason) cityrp.acommands.adminDo(CONSOLE, "Server action performed", icon, flags)