Skip to content

Commands & Exports ​

Admin commands ​

Only players whose Discord ID is in Config.Admins (in server.lua) can use these. Each one can be turned off in Config.Commands.

CommandDescription
/setuplabPlace a new lab and assign it to a gang.
/setdoorsRebuild the ox_doorlock doors for every placed lab.
/addobjAdd a prop to the shared lab layout (applies to every lab).
/gangslab_addxp <gang> <xp>Give XP to a gang.
lua
Config.Commands = {
    labsetup       = { enabled = true },  -- /setuplab
    setdoors       = { enabled = true },
    addobj         = { enabled = true },
    gangslab_addxp = { enabled = true },
}

Missions from other scripts ​

The Mafia creates missions for gangs in the laptop, such as robbing a number of stores. When a player completes that action in another script, report it to MG-Gangslab so the mission progresses.

Server-side:

lua
-- For a player (uses their gang automatically)
exports['MG-Gangslab']:ReportMissionObjective(source, 'store', 1)

-- For a gang directly
exports['MG-Gangslab']:ReportGangMissionObjective(gangName, 'store', 1, playerName, citizenid)
ParameterDescription
sourceThe player's server ID.
objectiveTypeThe objective type (see below).
countHow many to add.

Objective types from outside scripts:

TypeMission
storeStore Robbery
houseHouse Robbery
laundromatLaundromat Robbery
cashexchangeCash Exchange

Lab actions (meth, laundry, raids) are counted automatically by MG-Gangslab.

Example in a store robbery script:

lua
-- after a successful robbery
exports['MG-Gangslab']:ReportMissionObjective(source, 'store', 1)

Laptop ​

Open or close the lab laptop from another client script:

lua
exports['MG-Gangslab']:OpenTablet()
exports['MG-Gangslab']:CloseTablet()

All MG Development resources are protected. Redistribution is not permitted.