Paid Resources🚓 filo_police
Exports
Mugshot and test exports for other scripts.
Mugshots (server)
exports.filo_police:GetMugshots(citizenid) -- every saved mugshot
exports.filo_police:GetLatestMugshot(citizenid) -- the newest oneTest readings (server)
exports.filo_police:GetDrunkLevel(source) -- 0-100, the highest of all sources
exports.filo_police:GetBAC(source) -- BAC %
exports.filo_police:GetDrugs(source) -- list of drug names foundAdding drink and drug scripts (server)
Register a function from the other script's server code:
-- drunk level 0-100 (the highest of all sources counts)
exports.filo_police:RegisterDrunkSource(function(source)
local alcohol = Player(source).state.alcohol -- e.g. a 0-1 value
return alcohol and alcohol * 100
end)
-- a drug name, a list of names, or nil
exports.filo_police:RegisterDrugSource(function(source)
return Player(source).state.onCocaine and 'Cocaine' or nil
end)Registered functions are dropped when their resource stops, so register them on start, after
filo_police. Client-side values can't be read from the server: put them in a replicated player state
or metadata, or add them to Config.tests.sources instead.