Exports
HUD Visibility
Control HUD visibility via client-sde :
local UI = exports['cdev_needs']:getUI()
UI.setVisibility(false)
UI.setCompassVisibility(false)Stats Manipulation (Client-Side)
local Needs = exports['cdev_needs'].getNeeds()
Needs.get(stat)
Needs.set(stat, newValue)
Needs.add(stat, increaseAmount)
Needs.sub(stat, decreaseAmount)Stats Manipulation (Server-Side)
local Needs = exports['cdev_needs'].getNeeds()
Needs.get(source, stat)
Needs.set(source, stat, newValue)
Needs.add(source, stat, increaseAmount)
Needs.sub(source, stat, decreaseAmount)Stat Change Events (Client-Side Only)
Register a callback for when a stat changes:
Actions menu (client-side)
Opens the same menu as the O key (pee, poop, shower, sleep, etc.). Useful for custom menus (ESX, ox_lib, radial menus, etc.).
Example (custom menu button):
Example (another resource):
Action lock (client-side)
Prevents the player from starting needs actions (useful during cutscenes, minigames, etc.).
Last updated