Exports & Events
All exports and events available to integrate this resource into others.
Client Exports
Is Current Empty
Returns if the current item you are holding is empty or not. Will also return false if you are not holding any item. Example:
Has Item Equipped
Returns if you currently have an item. Example:
Is Occupied
Returns if you are currently occupied with any action within our script. Placement, consuming, grabbing item etc. If you are using the script and not idling it, you are most likely labeled as occupied. If you are ever struggling with this, you can enable debug mode and it will explicitly tell you what is making you occupied. Example:
Get Equipped Item Metadata
Returns the cached metadata for the item you have equipped. You can find guaranteed values in
zyke_consumables/types.lua
, along with all of the metadata that already existed on the item before you equipped it. Example:
Force Item Unequip
Forcefully unequips your item into your inventory if you have one equipped. Still performs the interaction animations & delays. This does wait for all of the interactions to finish before before you can proceed. This will skip the check for the setting
autoPourDrinkOnGround
and automatically do it if needed. Example:
Client Events
Personal Setting Changed
When you change any of your personal settings, this is triggered. Example:
World Item Created
When someone places an item, this is triggered. It does not track if you are in render, this will trigger for all world items on creation. Example:
World Item Removed
When someone removes an item, this is triggered. It does not track if you are in render, this will trigger for all world items on removal. Example:
Server Exports
Is Current Empty
Returns if the current item you are holding is empty or not. Will also return false if you are not holding any item. Example:
Has Item Equipped
Returns if you currently have an item. Example:
Is Occupied
Returns if you are currently occupied with any action within our script. Placement, consuming, grabbing item etc. If you are using the script and not idling it, you are most likely labeled as occupied. If you are ever struggling with this, you can enable debug mode and it will explicitly tell you what is making you occupied. Example:
Get Equipped Item Metadata
Returns the cached metadata for the item you have equipped. You can find guaranteed values in
zyke_consumables/types.lua
, along with all of the metadata that already existed on the item before. Example:
Force Item Unequip
Forcefully unequips your item into your inventory if you have one equipped. Still performs the interaction animations & delays. This does wait for all of the interactions to finish before before you can proceed. This will skip the check for the setting
autoPourDrinkOnGround
and automatically do it if needed. Example:
Add To Current Item
Add amount to the current item of the target. This is limited to direct consumption-reward items. Example:
Give Ingredient
Gives an ingredient, and allows you to configure the metadata easily in one go. Example:
Add Item
Gives a consumable item. This export will be replaced with specifics for consumption-reward-based & ingredient-based. Example:
Craft Item
Crafts an ingredient-based consumable item. Do keep in mind that the ingredients you input will be added on top of the base ingredient configuration. Example:
Last updated
Was this helpful?