Objects
Used to register and remove object spawning, from peds to vehicles.
lib.objects.register
Create a new object
lib.objects.register(name, new_data)
Parameter
Type
Required
Description
name
String
Unique reference for object
lib.objects.get
Get information regarding an object
local obj = lib.objects.get(name)
Parameter
Type
Required
Description
id
String
Unique reference for the object
lib.objects.destroy
Completely remove an object
lib.object.destroy(id)
Parameter
Type
Required
Description
id
String
Unique reference for the object
Data Structure
This is the data structure of an object and the valid options
{
type = "ped", -- This can be: ped, vehicle or object
model = `a_f_m_bevhills_01`, -- Model to be spawned, must be the model hash
pos = vector4(0, 0, 0, 0), -- Position of the object
-- This also can be a polyzone for a set render area
renderDist = 50, -- When to render the object
}
Last updated