Exports & Events

All exports and events available to integrate this resource into others.

Types & Classes

All types & classes can be found in types.lua.

Suggestions?

If you wish to have any exports and or events added, please head over to our Discord and create a suggestion post. We are happy to allow for easier integration within other resources.

Status Names

Client Sided Exports

Get All Statuses

If you want to grab all initialized & cached statuses straight from our cache, you can use this export. Example:

---@return table<StatusName, PlayerStatuses> | nil @nil when unloaded
local statuses = exports["zyke_status"]:GetAllRawStatuses()

Shorthands (Hunger, thirst, stress & drunk)

We have created a set of shorthands for common statuses. These are very basic to implement and always returns a number value, 0.0 if not initialized to avoid errors. Example:

local hunger = exports["zyke_status"]:GetHunger()
local thirst = exports["zyke_status"]:GetThirst()
local stress = exports["zyke_status"]:GetStress()
local drunk = exports["zyke_status"]:GetDrunk()

Get Raw Status

This export allows you to grab any status, even non-initialized ones in a error-handled environment. It always return a table with a value, 0.0 if not initialized. The second return value indicates if the status you grabbed was initialized or not. Example:

Server Sided Exports

Add To Status

Adds an amount to a status. Example:

Remove From Status

Removes an amount from a status. Example:

Auto To Status

Automatically choose add/remove based on amount Example:

Freeze Status For Player

Freezes the status for a player to avoid drain and effects. Example:

Unfreeze Status For Player

Unfreezes the status for a player to avoid drain and effects. Reset for Freeze Status For Player. Example:

Get Frozen Players

If you want a list of all frozen players, this export will do just that. Example:

Is Player Statuses Frozen

Return if a player has their statuses frozen or not. Example:

Last updated

Was this helpful?