PrescriptionsExports
Client exports
Client exports for Prescriptions.
In-development version. These docs cover the testing build of Prescriptions. The official release is still documented on the GitBook linked in its README.
Call them as exports.MrNewbPrescriptions:Name(...) from a client script.
| Export | Returns | Notes |
|---|---|---|
RegisterPrescription(id, prescription) | boolean | Same as the server one, for the local catalog |
RegisterEffect(id, label, handler?) | boolean | Registers the effect handler locally. Refuses a premade id, stop and overdose |
RunEffect(name, durationSec, strength) | Plays a premade or custom effect id on the local player. An unknown id shows an error notice | |
StartOverdose() / StopOverdose() | Starts the overdose sequence, or stops every running effect, locally | |
DrugTaken() | Counts one dose toward the local overdose threshold. It stops counting after 30 minutes |
exports.MrNewbPrescriptions:RunEffect('smokey', 20, 1)RegisterPrescription and RegisterEffect need to run on both sides. Put them in a shared script so you only make the call once. Details: Medications and effects.
Server exports: Server exports.
