Skip to content
NivoDocs

Search documentation

Laboratory Creator

Exports & events

Exports, events and commands of nv_laboratorycreator for other resources (police MDTs, admin menus, inventories).

Preview: the script is not released yet. Names can still change; this page is updated with every release.

Server exports

GetHeat

Police heat of every lab, for an MDT or intel app.

local labs = exports.nv_laboratorycreator:GetHeat()
-- { { id = 3, label = 'Sandy Shores Barn', heat = 6, need = 8, sealedLeft = 0 }, ... }
FieldMeaning
heatcurrent heat 0–10
needheat needed before the police can seal the lab
sealedLeftseconds until a police seal expires, 0 when not sealed

AdminLabs

Every lab with owner and balance, for admin menus.

local labs = exports.nv_laboratorycreator:AdminLabs()
-- { { id, label, heat, need, balance, owner, sealed, x, y, z }, ... } sorted by label

AdminSetHeat

exports.nv_laboratorycreator:AdminSetHeat(labId, 0) -- 0–10, returns true / false

AdminAddBalance

Adds (or with a negative amount removes) money from a lab treasury. Returns false when the balance would go below zero.

exports.nv_laboratorycreator:AdminAddBalance(labId, 5000)

AdminRequest

Posts a supply request for a lab without reserving money from its treasury.

exports.nv_laboratorycreator:AdminRequest(labId, 'meth_crystal', 20, 450) -- item, quantity, price per piece

Client exports

useDrug

Plays the use animation and the drug effect. Usable drugs call it automatically; use it when your inventory needs a client export for item use.

exports.nv_laboratorycreator:useDrug({ name = 'meth_crystal' })

Events

EventSideUse
nv_labs:useclientTriggerClientEvent('nv_labs:use', src, 'meth_crystal') plays a drug effect

Commands

CommandWhoWhat it does
/labsadmin grouplab admin panel; /labs edit opens the editor of the lab you stand in
/labreset <entrance>admin grouptakes a lab back to the state
/nvfx, /nvpropadmin groupparticle and prop tuning tools

Optional

bob74_ipl loads the lab interiors. Without it the script runs, prints a warning and some interiors may not load.