Client
Every value is 0 to 100 for the local player. Needs are set from the server only.
GetPlayerStatus
Parameters
namestring— such ashunger,thirst, orstress
Returns
number|nil — nil when the needs script has no status with that name.
Example
local thirst = Bridge.GetPlayerStatus('thirst')
if thirst and thirst < 10 then
print('drink something')
endGetPlayerHealth
Parameters
None.
Returns
number — 0 means dead or dying.
Example
print(Bridge.GetPlayerHealth())SetPlayerHealth
This does not revive a dead player.
Parameters
valuenumber—0to100.0kills the player.
Returns
boolean
Example
Bridge.SetPlayerHealth(50)GetPlayerArmor
Parameters
None.
Returns
number
Example
print(Bridge.GetPlayerArmor())SetPlayerArmor
Parameters
valuenumber—0to100
Returns
boolean
Example
Bridge.SetPlayerArmor(100)