Retrieves the class of the specified vehicle as a string.
--- Retreive vehiclelocal vehicle =GetVehiclePedIsIn(PlayerPedId(), false)--- Utils objectlocal class = utils.vehicles.get_vehicle_class(vehicle)print("Vehicle Class:", class)--- Direct exportlocal class = exports.boii_utils:get_vehicle_class(vehicle)
get_vehicle_class_details
Retrieves detailed class information of the specified vehicle.
--- Retreive vehiclelocal vehicle =GetVehiclePedIsIn(PlayerPedId(), false)--- Utils objectlocal class_details = utils.vehicles.get_vehicle_class_details(vehicle)print("Vehicle Class Details:", json.encode(class_details))--- Direct exportlocal class_details = exports.boii_utils:get_vehicle_class_details(vehicle)
get_vehicle_details
Retrieves detailed information about a vehicle, optionally the one the player is currently in.
--- Toggle if players vehicle should be used.--- If false the closest vehicle will be used.local use_players_vehicle =true--- Utils objectlocal vehicle_details = utils.vehicles.get_vehicle_details(use_players_vehicle)print("Vehicle Details:", json.encode(vehicle_details))--- Direct exportlocal vehicle_details = exports.boii_utils:get_vehicle_details(use_players_vehicle)
spawn_vehicle
Spawns a vehicle with specified properties and modifications.
--- Define vehicle datalocal vehicle_data = { model ="adder", coords =vector4(0.0, 0.0, 75.0, 0.0), is_network =false, net_mission_entity =true, custom_plate ="SPAWNED", lock_doors =true, invincible =true, maintenance = { fuel =80.0, engine =900.0, }, mods = { max_performance =true, custom_paint = { primary = { r =255, g =0, b =0 }, secondary = { r =0, g =0, b =255 }, }, },}--- Utils objectlocal vehicle = utils.vehicles.spawn_vehicle(vehicle_data)print("Spawned Vehicle:", vehicle)--- Direct exportlocal vehicle = exports.boii_utils:spawn_vehicle(vehicle_data)