five-on-it / packages/sim/src/vehicle / spawnVehicle
Function: spawnVehicle()
spawnVehicle(
sim,spawn,cls?,ownerClientId?):number
Defined in: packages/sim/src/vehicle.ts:461
Creates a vehicle of a class at a spawn point and returns its entity id. The body is created with the class' mass properties and a lowered centre of mass. It is nobody's, unlocked and in its own colour; ownerClientId is the player who drives it (the snapshot's owner), not who owns it (locks.ts).
Parameters
sim
spawn
cls?
number = 0
ownerClientId?
number = 0
Returns
number