πŸ‘·commands

Overview

Commands are configured in shared/commands.config.lua within the Chat.Commands table. Each command has its own configuration for behavior, templates, logging, and 3D display.


Command Types

Type
Property
Description

Distance-based

distance

Messages visible only within range

Global

isGlobal = true

Messages sent to all players

Private

isPrivate = true

Direct messages between two players

Report

isReport = true

Player reports sent to admins

System

isSystem = true

System messages to single player

50/50 (TRY)

fiftyfifty

Random success/fail outcomes

Default

defaultMessage = true

Default chat behavior (like OOC)


Command Configuration Options

Basic Options

Option
Type
Description

logType

string

Log category for Discord webhooks

distance

number

Message visibility range (meters)

template

string

HTML template for message display

suggestion

table

Command autocomplete configuration

requiredGroups

table

Groups allowed to use command

GroupRoles

table

Color mapping per user group

GroupColors

table

Alternative color mapping

Display Options (3D Text)

Option
Type
Description

displayTrigger

table

RGBA color for 3D text

displayBackground

table

RGBA background color for 3D text

displayDuration

number

How long 3D text displays (ms)

displaySettings

table

Override global display settings

Suggestion Configuration


Template Placeholders

Use these placeholders in your HTML templates:

Placeholder
Description

{playerId}

Player's server ID

{name}

Player's character/display name

{message}

The message content

{time}

Current time (HH:MM format)

{nameColor}

Calculated name color

{groupColor}

Group-specific color

{targetId}

Target player ID (private messages)

{targetName}

Target player name (private messages)

{senderId}

Sender player ID (private messages)

{senderName}

Sender player name (private messages)


Built-in Commands

OOC (Out of Character)

Default local OOC chat when typing without command prefix.


GLOBALOOC (Global OOC)

Global OOC chat visible to all players.

Usage: /globalooc Hello everyone!


ME (Action)

Roleplay action command with 3D display.

Usage: /me reaches into his pocket


DO (Environment Description)

Describe environment or character state.

Usage: /do The door is slightly open


MED (Medical Action)

Medical roleplay actions.

Usage: /med checks patient's vitals


TRY (50/50 Chance)

Random success/fail action.

Usage: /try picks the lock


W (Whisper/Private Message)

Private message between two players.

Usage: /w 5 Hey, want to meet up?


AC (Admin Announcement)

Global admin announcements (restricted).

Usage: /ac Server restart in 5 minutes!


REPORT (Player Report)

Player reports to admin team.

Usage: /report Player ID 42 is cheating


REPORTODP (Report Response)

Admin response to player reports (restricted).

Usage: /reportodp 5 Thank you, we're investigating


SYSTEM (System Messages)

Internal system messages.

Usage: Called programmatically via SendRPMessage('SYSTEM', playerId, message)


Adding Custom Commands

Basic Distance Command


Faction-Restricted Command


DisplaySettings Override

Per-command display settings that override global Chat.Display:


Next Steps

Last updated