Exports
Client exports that show status icons, set the blood and temperature bars, and hide the HUD.
These exports are client-side. Call them from your other client scripts, for example your medical or weather script.
Status icons
Pass true to show an icon and false to hide it.
| Export | Icon |
|---|---|
setWetness | Wet |
setBleeding | Bleeding |
setDigestion | Digesting |
setDisease | Disease |
setIllness | Illness |
setBrokenbone | Broken bone |
setOverweight | Overweight |
Lua
exports["SAG-survival-hud"]:setBleeding(true) -- show the bleeding icon
exports["SAG-survival-hud"]:setBleeding(false) -- hide it again
Bars
Pass a number from 0 to 100.
| Export | Bar |
|---|---|
setTempature | Temperature |
setBlood | Blood |
Lua
exports["SAG-survival-hud"]:setTempature(50)
exports["SAG-survival-hud"]:setBlood(50)
setTempature is spelled that way in the script. Use it exactly as written.
Show or hide the HUD
Lua
exports["SAG-survival-hud"]:hudVisibility(false) -- hide the HUD and minimap
exports["SAG-survival-hud"]:hudVisibility(true) -- show them
Good to know
- Nothing is saved. After a player reconnects, every icon is off and both bars are back at 80 until your script sets them again.
- Exports are called by the folder name. Keep the folder named
SAG-survival-hud: the script calls its own exports by that name too.
