API
For advanced users and developers who wish to integrate the script with an interaction system not listed in the default configuration, you can edit client/open_api.lua
These file act as a bridge or an API layer between this resource and other scripts.
AddPickupInteraction
- Description: Creates a pickup interaction point in the world for a dropped item. This function's behavior is dynamically determined by the
Config.pickupType
value defined inconfig.lua
, calling the appropriate export for the selected targeting system. - Parameters:
identifier
(string): The drop identifier.coords
(vector3): The world coordinates where the interaction should be created.name
(string): The unique name of the item (e.g., "phone").slot
(integer): The slot of the item (e.g., 1).count
(integer): The quantity of the item (e.g., 3).label
(string): The display name of the item (e.g., "Phone").
- Returns:
- (
any
ornil
): Returns the zone/interaction ID created by the target script, which can be used later to remove it. Returnsnil
if theConfig.pickupType
is not handled by this function (e.g.,ox_inventory_drop
).
- (
RemovePickupInteraction
- Description: Removes a previously created pickup interaction from the world. This function's behavior is also determined by
Config.pickupType
. - Parameters:
identifier
(any): The unique identifier of the interaction to remove, which was previously returned byAddPickupInteraction
.