Skip to main content

Chat commands

CommandWhoWhat it does
/drugscreatorAdminsOpens the creator panel.
/selldrugsPlayersToggles street selling mode.
/cornersellPlayersToggles corner selling mode.
/trapphonePlayersOpens the trap phone (also opened by using the trap_phone item).
/pocketcraftPlayersOpens the pocket crafting menu.
Where the names come from:
  • /drugscreatorConfig.Command in config.lua.
  • /pocketcraftConfig.World.PocketCraftCommand in config.lua.
  • /selldrugs, /cornersell, /trapphone — defaults from the world settings, renameable live from the panel’s Settings and config tabs. The trap phone item name (trap_phone by default) is editable there too.

Server exports

exports.nex_drugscreator:UseDrug(source, 'joint')
-- Triggers a configured drug for a player as if they used the item.
-- Returns true when the item is a saved drug, false otherwise.

exports.nex_drugscreator:GiveTerritoryPoints(territoryId, factionName, points)
-- Adds territory-war points to a faction in a territory and syncs all clients.

exports.nex_drugscreator:ResetTerritoryPoints(territoryId)
-- Clears all faction points (and earnings accumulators) for one territory.
UseDrug still runs the full server-side flow — required-item gate, item removal, anti-spam, and effect application.

Dispatch hook

Config.PoliceAlert in config.lua is called server-side whenever a sale alerts the police, so you can wire ps-dispatch, cd_dispatch, qs-dispatch, or anything else:
Config.PoliceAlert = function(source, coords)
    exports['ps-dispatch']:DrugSale(source)
end
Independent of the hook, on-duty police (jobs in Config.PoliceJobs) always receive the built-in alert blip for Config.PoliceBlipTime seconds (default 120).