Addiction

Addiction and physical tolerance lifecycle mechanics, withdrawal stages, and medical treatments.

Addiction and Tolerance Mechanics

  • Addiction increases dependence; withdrawal occurs if drug intake stops.
  • Tolerance reduces negative side effects during drug consumption.
  • Values range from 0 to 100, stored in the database.

Withdrawal Stages

Withdrawal stages apply when an addicted player is not under drug influence.

Tier Addiction Level Grace Period Health Drain Passout & Vomit Chance Warning Alert
Low > 30 15 minutes -5 HP every 30s 10% Passout / 30% Vomit addiction_low
Mid > 50 10 minutes -5 HP every 15s 20% Passout / 50% Vomit addiction_mid
High > 75 Immediate -5 HP every 3s 30% Passout / 70% Vomit addiction_high

Withdrawal Symptoms

When health loss begins, the player experiences physical withdrawal symptoms:

  • Visual screen shader distortion via Drug_gas_huffin.
  • Camera shaking using DRUNK_SHAKE profile.
  • Motion blur on camera movements.
  • Forced impaired drunk walking style.
  • Blackout screen fades and ragdoll passout animations.
  • Vomiting animations on foot or from vehicle doors.

Prescription Detox Items

Configured in configs/usable.lua under Config.AntiAddiction:

Item ID Item Label Type Effect
acamprosate Acamprosate Usable Pill Reduces addiction by 20 points and tolerance by 6 points.
lofexidine Lofexidine Usable Pill Reduces addiction by 50 points and tolerance by 16 points.

Passive Body Recovery

  • Addiction naturally decreases by 2 points every 3 minutes.
  • Tolerance naturally decreases by 2 points every 6 minutes.

Exports

ReduceAddiction

Reduces player active addiction levels across all drugs by the specified amount.

exports['ak47_drugmanagerv3']:ReduceAddiction(amount)
Parameter Type Required Description
amount number Yes Addiction reduction point amount
  • Returns: void

Admin Commands

Command Arguments Permission Description
/removeaddiction [player_id] Admin / Console Clears drug addiction and tolerance values.
/cleardrugs [player_id] Admin / Console Clears all drug addictions, overdoses, and effects.