spawnVehicle_camo_dest 146
Spawn a vehicle with a specified camo and give it a destination. For Auto-Transport vehicles, this is where units will be deployed. Vehicle Ids can be acquired in the Script Settings menu -> Id tables section
Return value
| Return Type | Description |
|---|---|
| Vehicle | Reference to the vehicle |
Parameters
| Parameter | Type | Description |
|---|---|---|
| 1 | string | Id of the vehicle to spawn |
| 2 | vec3 | Location where to spawn the vehicle |
| 3 | vec3 | Euler rotation for the vehicle |
| 4 | integer | Index of the camo to assign. Set 0 for random camo |
| 5 | vec3 | Destination where to send the Auto-Transport vehicle |
Examples
Spawn a vehicle with a custom camo and give it a destination
-- Spawn a vehicle with camo and destination
local vehicle1 = spawnVehicle_camo("JeepWillys", vec3(0, 1.5, 0), vec3(0, 90, 0), 1, vec3(50, 0, 50))
if vehicle1 then
print("Basic vehicle spawned!", 3)
end