Koja Scripts

Commands

Every Koja Chat command: RP, social, private message, utility and staff commands with their defaults, costs and cooldowns.

Commands

Every command is defined in Config.Commands in editable/config.lua. Set enabled = false to remove one, or name = '...' to rename it. Help text and parameter names in the suggestions come from the locale (help_<command>, p_<parameter>).

Staff are the players that pass Custom.IsAdmin, see Configuration. Staff ignore command cooldowns.

RP and chat commands

These post to a channel. Local commands only reach players within the range of the channel (20.0 m by default).

CommandChannelDescription
/me <action>LocalDescribe what your character does. Text above the head
/do <description>LocalDescribe the surroundings or your state. Text above the head
/try <action>LocalTry something with a random result, chance = 50 percent. Text above the head
/looc <message>LocalLocal OOC chat
/s <message>LocalShout, heard within 40 m. Text above the head
/w <message>LocalWhisper, heard within 3 m. Text above the head
/ooc <message>OOCGlobal OOC chat, shows the FiveM name
/twt <message>SocialTweet. Cooldown 10 s
/dw <message>SocialAnonymous darkweb message. Staff still see the ID. Cooldown 30 s
/ad <message>SocialPaid advertisement. Costs 500 from the bank, cooldown 60 s
/dep <message>DepartmentYour department channel
/a <message>StaffStaff chat. Staff only

If a player cannot pay for /ad, the message is rejected with the amount.

Private messages and reports

CommandDescription
/pm <id> <message>Private message with a sound ping for the receiver
/r <message>Reply to the last player who wrote to you
/report <message>Sends a report to every online staff member. Cooldown 60 s

Private messages and reports go through the mute, anti-spam and filter checks. They are logged when Config.Logs.pm and Config.Logs.reports are on.

Utility commands

These run on the client.

CommandDescription
/clearClear your own chat
/ignore <id>Hide the messages of a player until you reconnect. Reports and messages without an author still arrive
/unignore <id>Stop ignoring a player
/bind <key> <command>Run a command on a key, for example /bind F5 e dance. Saved per player, the key can be changed in GTA key settings
/unbind <key>Remove a bind
/bindsList your binds
/coordsCopies your position as a vector4 to the clipboard

Keys for /bind are letters, numbers and underscores up to 16 characters, for example F5, NUMPAD1 or X. The limit is Config.Binds.max (20).

Staff commands

Staff only. The server console can also run /announce, /mute, /unmute, /clearall, /slowmode, /pin, /unpin and /poll.

CommandDescription
/announce <message>Banner at the top of the screen and a chat line for everyone
/mute <id> <minutes> <reason>Mute a player. 0 minutes = permanent. The mute is saved by license
/unmute <id>Unmute a player
/clearallClear the chat for everyone
/slowmode <seconds>Slow mode for everyone. 0 = off
/pin <message>Pin a message at the top of everyone's chat. It is kept after restarts
/unpinRemove the pinned message
/poll Question | A | BStart a poll with 2 to 6 options. It stays open for 120 s (Config.Commands.poll.duration)

Players vote by clicking an option and can change their vote while the poll is open. Staff can also hover a message and click the bin to delete it for everyone.

Commands from other resources

Commands registered by any resource with RegisterCommand are listed in the suggestions when the player has the ACE command.<name>. An unknown command shows "Unknown command" to the player, unless a script cancels the chatMessage event. Resources can add their own commands with RegisterCommand and remove them again with RemoveCommand.