⚙️
TMC v2 Core
DiscordWebsite
  • Get Started
  • TMC Core Object
    • Client Functions
      • Vehicle Functions
      • Interaction Ped Functions
      • Interaction Object Functions
      • Interaction Prompts
      • Polyzones
    • Client Menus
    • Events
      • Client
      • Server
    • Server Functions
      • General Functions
      • Commands
      • Player Functions
    • Common Functions
    • 🚘Vehicle Names
  • Object Models
    • Job
  • 📄Other Resources
    • ✨Status Effects
    • 📤Dispatch
    • 🫂Parties
    • 💶Banking
    • 🔍Evidence
Powered by GitBook
On this page
  1. TMC Core Object
  2. Server Functions

Commands

Add

Register a command to be used by players

Parameter
Required
Type
Description

name

String

Name of command

help

String

Help test, description of the command

arguments

Object

Arguments required

argsRequired

Boolean

Set arguments required

callback

Function

Callback function

permission

String

Permission required, defaults to user

TMC.Commands.Add("example", "Example Command", {{name="arg", help="An Argument"}}, true, function(source, args)
    -- source: player's server id
    -- args: values set for arguments
end, "helper")
PreviousGeneral FunctionsNextPlayer Functions

Last updated 1 year ago