Chat commands
| Command | Who | What it does |
|---|
/drugscreator | Admins | Opens the creator panel. |
/selldrugs | Players | Toggles street selling mode. |
/cornersell | Players | Toggles corner selling mode. |
/trapphone | Players | Opens the trap phone (also opened by using the trap_phone item). |
/pocketcraft | Players | Opens the pocket crafting menu. |
Where the names come from:
/drugscreator — Config.Command in config.lua.
/pocketcraft — Config.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).