-
Notifications
You must be signed in to change notification settings - Fork 3
Vehicle Component
FYP edited this page Aug 9, 2017
·
1 revision
VehicleComponent component = get_vehicle_component(Vehicle handle, string component_name)
Gets vehicle component by its name and returns vehicle_component
object.
Returns nil
on failure.
table<VehicleComponent> components = get_vehicle_components(Vehicle handle)
Gets all root vehicle components and returns them within a lua table.
table<VehicleComponent> components = get_all_vehicle_components(Vehicle handle)
Gets all vehicle components and returns them within a lua table.
VehicleComponent component = vehicle_component.from_memory(uint vehicle_ptr, uint rwframe_ptr)
uint ptr = component:get_pointer()
string name = component.name
Matrix matrix = component.matrix
Matrix matrix = component.modeling_matrix
component:set_visibility(int visibility_state)
component:set_alpha(int alpha)
VehicleComponent component = component.child
Returns nil
on failure.
VehicleComponent component = component.parent
Returns nil
on failure.
VehicleComponent component = component.next
Returns nil
on failure.
table<VehicleAtomic> objects = component:get_objects()
table<VehicleComponent> components = component:get_child_components()
VehicleAtomic object = vehicle_atomic_object.from_memory(uint vehicle_ptr, uint rpatomic_ptr)
uint ptr = object:get_pointer()
object:hide(bool hide)
bool value = object:get_atomic_flag(uint flag)
object:set_atomic_flag(uint flag, bool value)
table<VehicleMaterial> materials = object:get_materials()
VehicleMaterial material = vehicle_object_material.from_memory(uint vehicle_ptr, uint rpmaterial_ptr, uint rpgeometry_ptr)
uint ptr = material:get_pointer()
material:set_color(int r, int g, int b, int a)
int r, int g, int b, int a = material:get_color()
material:reset_color()
material:set_texture(Texture texture)
Texture texture = material:get_texture()
Returns nil
on failure.
material:reset_texture()
DISABLED
ENABLED
DAMAGED