Exports
Here is a list of all the exports that can be used
#Client
· GetNeeds: Returns a table with the current needs values.
Example
local needs = exports.bm_human_needs:GetNeeds()
print(json.encode(needs, { indent = true}))
--returns: { sleep = value, pee = value, poo = value, dirt = value }· SetNeeds: Set the table of needs values to those entered.
Example
local needs = exports.bm_human_needs:GetNeeds()
needs.poo = 50
exports.bm_human_needs:SetNeeds(needs) --Take needs table as argument· UpdateNeed: Set value of specific need to entered one
Example
exports.bm_human_needs:UpdateNeed('pee', 50) --Set pee value to 50· StartPee: Starts peeing action
Example
exports.bm_human_needs:StartPee() --Ped starts peeing, it will check pee level first· TogglePoop: Toggles pooping action
Example
· IncreaseNeedOverTime: Increases the value of a need every second for a certain time
Example
· DecreaseNeedOverTime: Decreases the value of a need every second for a certain time
Example
· IsNeedsMenuOpen: Returns if needs menu is open
Example
· IsResting: Returns if player is sleeping
Last updated