Rehab clinic
Rehab clinic
An addiction the player can pay to shake off gives the whole system somewhere to end. Config.Rehab places a clerk on the map — a ped with a blip — that a character checks into.
Checking in
Walk up to the clerk and target them (or press the key if you run no targeting resource). If the character is hooked, they pay the fee and a treatment bar runs for Config.Rehab.Duration. When it finishes, each addiction is cleared — unless it relapses, using the per-substance relapse chance you set in the editor, in which case it stays.
The fee
The cost is the highest rehabCost among the character's current addictions, falling back to Config.Rehab.Cost. It is taken through the framework from the bank, then cash. Set the cost to 0 to make rehab free.
Rehab only matters if death does not wipe addictions. Keep Config.Withdrawal.ClearOnDeath = false, or players will take the free way out instead of paying the clinic.
Locations
Config.Rehab = {
Enabled = true,
Duration = 45,
Cost = 5000,
Ped = 's_m_m_doctor_01',
Blip = { sprite = 51, colour = 25, scale = 0.75 },
Locations = {
{ coords = vec4(1839.7, 3672.9, 34.28, 210.0), label = 'Sandy Shores Rehab' },
{ coords = vec4(-679.4, 5834.3, 17.33, 45.0), label = 'Paleto Bay Rehab' },
},
}