📋Exports & Events

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

Types & Classes

All types & classes can be found in shared/unlocked/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.

Client Sided Exports

Transfer Item

This export will find the closest player, and transfer the smokeable you currently have equipped to that player if it is within range. Example:

exports["zyke_smoking"]:TransferItem()

Switch Placement

Switches placement of your smokeable, if possible. Toggles between your hand and mouth. Example:

exports["zyke_smoking"]:SwitchItemPlacement()

Is High

Returns if you currently have any effect running from our resource. Example:

---@return boolean
exports["zyke_smoking"]:IsHigh()

Has Walk Effect

Returns if you currently have any walking effect because of your high. Example:

---@return boolean
exports["zyke_smoking"]:HasWalkEffect()

Has Screen Effect

Returns if you currently have any screen effect because of your high. Example:

---@return boolean
exports["zyke_smoking"]:HasScreenEffect()

Get Amount In Smokeable

Returns the amount you have left for your smokeable. Example:

---@return number | 0
exports["zyke_smoking"]:GetAmount()

Get Battery In Vape

Returns the battery level for your vape. Example:

---@return number | 0
exports["zyke_smoking"]:GetAmount()

Get Water In Bong

Returns the water level for your bong. Example:

---@return number | 0
exports["zyke_smoking"]:GetWater()

Server Sided Events

Transfer Item

Additional to the client sided export, you can trigger the transfer item event directly and transfer your smokeable. Example:

---@param targetId integer @Server id
TriggerServerEvent("zyke_smoking:TransferItem", targetId)

Last updated