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

Get Item Data

Returns all of the active item data in the cache. This will be empty if you don't have an item out at the time. Example:

---@return CigaretteData | CigaretteData | BongData | VapeData | nil
exports["zyke_smoking"]:GetItemData()

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:

Is High

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

Has Walk Effect

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

Has Screen Effect

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

Get Amount In Smokeable

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

Get Battery In Vape

Returns the battery level for your vape. Example:

Get Water In Bong

Returns the water level for your bong. Example:

Is Occupied

Check if a player is currently occupied with any smokeable. Example:

Refill Bong Water

Refill the bong water, you can tie this export with an inventory like ox_inventory, and avoid having to use a separate water item since usability is already occupied. Example:

Server Sided Exports

Is Occupied

Check if a player is currently occupied with any smokeable. Example:

Client Sided Events

Sync Item Data (Catch)

Gives you a table of the latest item data for your current item. Example:

Stop Using Item (Catch)

Triggered when you stop using an item. Example:

Start Inhaling (Catch)

Triggered when you start inhaling. Example:

Stop Inhaling (Catch)

Triggered when you stop inhaling. Example:

Server Sided Events

Transfer Item (Send)

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

Last updated

Was this helpful?