Server Exports
When using the exports of Dex Addictions, don't forget to start the resource before the actual one that is using the exports.
GetAddictionState
GetAddictionState exports['Dex_Addictions']:GetAddictionState(source)
-- Example:
local state = exports['Dex_Addictions']:GetAddictionState(source)
if state.alcohol and state.alcohol.addicted then
print("Player is addicted to alcohol")
endSetAddictionState
SetAddictionState -- Single Addiction:
exports['Dex_Addictions']:SetAddictionState(source, "alcohol", 50, true)
-- Multiple Addictions:
exports['Dex_Addictions']:SetAddictionState(source, {
alcohol = 0,
opium = 20
}, true)AddAddictionPoints
AddAddictionPointsClearAddictions
ClearAddictionsLast updated