Commands#
Every command Drugs Creator registers. The names of the lab menu, decoration and furniture creator commands can be changed in config/main.lua.
Command | Who | Description |
|---|---|---|
| Admin | Opens the creator: farms, laboratories and dealers. |
| Admin | Opens the furniture creator. |
| Admin | Sets a lab's level. Without a lab name, it sets the lab you are standing in. |
| Owner and key holders | Opens the lab menu, inside the lab or next to its entry. |
| Owner and key holders | Opens decoration mode inside the lab. |
| Everyone | Starts or stops street corner selling. Defined in |
| Everyone, only with | Spawns a prop at your feet, for testing models. Turn debug off on a live server. |
Client Exports#
For HUDs, phones and other scripts that need to know where the player is.
EnteredLab
Returns the name of the lab the player is in (a shell or an MLO zone), or nil outside.
local lab = exports['qs-drugs-creator']:EnteredLab()
if lab then
print('Inside lab: ' .. lab)
endinDecorate
Returns true while the player is in decoration mode. Useful to block a phone, a radial menu or an inventory key while decorating.
if exports['qs-drugs-creator']:inDecorate() then
return -- do not open while decorating
endServer Exports#
AddExpToLab
Gives a lab experience, for example as a quest reward. At 100 EXP the lab goes up a level. The change is saved and sent to every player.
-- labName: the lab's id, as shown in the creator
-- exp: the amount to add
exports['qs-drugs-creator']:AddExpToLab('my_lab', 25)Events#
Start corner selling
Client event. The same as typing /selldrug, for a radial menu or a phone app.
TriggerEvent('drugs:cornerselling')Play drug effects
Client event. Plays an animation and effects on a player, from any item or script. The duration is in seconds. The types and effects are listed in Usage → Drug Effects.
-- server side
TriggerClientEvent('drugs:drugEffects', source, 'needle', { 'green_visual', 'armor50' }, 30)Show a notification
Client event. Shows a message with the script's notifications. Types: info, success, error.
TriggerClientEvent('drugs:notification', source, 'Your lab is ready', 'success')Entering and leaving a lab
Local client events fired by the script when the player enters or leaves a lab. Listen to them to hide a HUD or change a radio.
AddEventHandler('weed:handleEnterZone', function(labName)
print('Entered ' .. labName)
end)
AddEventHandler('weed:handleExitZone', function()
print('Left the lab')
end)Phone charger placed
Server event fired when an owner places a phone charger with Locate Charge. qs-smartphone-pro listens to it.
RegisterNetEvent('phone:CreateChargeLocation', function(lab, coords) end)


