gta.createVehicle

From GTA Connected
Jump to navigation Jump to search

Function Server and Client All Games Online and Offline

Server 1.0.0, Client 1.0.0

Server:
Vehicle gta.createVehicle(int model, Vec3 position)
Client:
Vehicle gta.createVehicle(int model, [ Vec3 position ])

Description

The gta.createVehicle function is used to add a vehicle, use the addToWorld function afterwards to add the vehicle to the players games.

Parameters

Type Name Presence Default Value Description
int
model
required n/a The vehicle model ID.
Vec3
position
optional
Vec3(0.0,0.0,0.0)
The position for the vehicle.

Returns

Success Returns

Type Description
Vehicle
The vehicle handle.

Failure Returns

Type Value
null
n/a

Notes

Examples

There aren't any examples for this function.

Compatibility

  • This function was previously named game.createVehicle in version 1.0.71.

Related

Server Related

gta.createVehicle

vehicle.children
vehicle.colour1
vehicle.colour2
vehicle.colour3
vehicle.colour4
vehicle.dimension
vehicle.engine
vehicle.fix
vehicle.getData
vehicle.getRotation
vehicle.heading
vehicle.id
vehicle.interior
vehicle.isType
vehicle.locked
vehicle.matrix
vehicle.modelIndex
vehicle.name
vehicle.onAllDimensions
vehicle.parent
vehicle.position
vehicle.randomiseColours
vehicle.removeAllData
vehicle.removeData
vehicle.resource
vehicle.setColours
vehicle.setData
vehicle.setRGBColours
vehicle.setRotation
vehicle.setSyncer
vehicle.strongGrip
vehicle.syncer
vehicle.type


Client Related

getVehicles
gta.createVehicle

vehicle.addUpgrade
vehicle.alarm
vehicle.alpha
vehicle.blow
vehicle.boundingCentre
vehicle.boundingMax
vehicle.boundingMin
vehicle.boundingRadius
vehicle.carWanderRandomly
vehicle.centerOfMass
vehicle.children
vehicle.collisionPower
vehicle.collisionsEnabled
vehicle.colour1
vehicle.colour2
vehicle.colour3
vehicle.colour4
vehicle.dimension
vehicle.dirtLevel
vehicle.distanceFromCentreOfMassToBaseOfModel
vehicle.driveTo
vehicle.drowned
vehicle.enableGPS
vehicle.engine
vehicle.engineHealth
vehicle.fix
vehicle.flipped
vehicle.flyTo
vehicle.gear
vehicle.getData
vehicle.getDoorStatus
vehicle.getLightStatus
vehicle.getOccupant
vehicle.getPanelStatus
vehicle.getRotation
vehicle.getSuspensionHeight
vehicle.getWheelStatus
vehicle.handlingIndex
vehicle.heading
vehicle.health
vehicle.health
vehicle.horn
vehicle.id
vehicle.interior
vehicle.isLocal
vehicle.isOnScreen
vehicle.isSyncer
vehicle.isType
vehicle.lights
vehicle.livery
vehicle.locked
vehicle.markAsNoLongerNeeded
vehicle.mass
vehicle.matrix
vehicle.modelIndex
vehicle.name
vehicle.openTrunk
vehicle.parent
vehicle.petrolTankHealth
vehicle.position
vehicle.radioStation
vehicle.removeAllData
vehicle.removeData
vehicle.removeUpgrade
vehicle.setCarCruiseSpeed
vehicle.setCarMission
vehicle.setColours
vehicle.setData
vehicle.setDoorStatus
vehicle.setDrivingStyle
vehicle.setHazardLights
vehicle.setLights
vehicle.setLightStatus
vehicle.setPaintJob
vehicle.setPanelStatus
vehicle.setProofs
vehicle.setRGBColours
vehicle.setRotation
vehicle.setSuspensionHeight
vehicle.setWheelStatus
vehicle.siren
vehicle.status
vehicle.subType
vehicle.syncer
vehicle.taxiLight
vehicle.turnVelocity
vehicle.type
vehicle.velocity