๐Ÿš˜SimVehicle

General game-vehicle, properties & functions are derived from SimObject.

Properties:

Name
Type
Description

EngineDamage

float

(0.0 to 1.0)

DoorsLocked

boolean

-

SeatCount

integer (Read Only)

-

Static Functions:

.Create

SimVehicle.Create(model: Hash, coords: Vector3, rotation: Vector3): SimVehicle

Argument
Type
Description

model

Hash

coords

Vector3

Position of new Vehicle

rotation

Vector3

Rotation of new Vehicle

Returns SimVehicle object when successfully created. Note: by default vehicle doors are locked!

.Get

SimVehicle.Get(object: SimObject): SimVehicle

Argument
Type
Description

object

SimObject

Valid SimObject

This will cast SimObject to SimVehicle use this only if you know what you're doing!

Occupant Functions:

.GetDriver

SimVehicle.GetDriver(): SimCharacter

Returns SimCharacter object if there is driver occupant in current vehicle otherwise null.

.GetPassenger

SimVehicle.GetPassenger(index: integer): SimCharacter

Argument
Type
Description

index

integer

(0 to [SeatCount - 1])

Returns SimCharacter object if there is passenger occupant in current vehicle otherwise null.

Color Functions:

.GetPrimaryColor

SimVehicle.GetPrimaryColor(): Color

Returns Primary Color of vehicle.

.SetPrimaryColor

SimVehicle.SetPrimaryColor(color: Color)

Argument
Type
Description

color

Color

Color object

Sets new Primary Color of vehicle.

.GetSecondaryColor

SimVehicle.GetSecondaryColor(): Color

Returns Secondary Color of vehicle.

.SetSecondaryColor

SimVehicle.SetSecondaryColor(color: Color)

Argument
Type
Description

color

Color

Color object

Sets new Secondary Color of Vehicle.

.GetShaderValue

SimVehicle.GetShaderValue(index: integer): float

Argument
Type
Description

index

integer

(0 to 5)

Returns Value of shader.

.SetShaderValue

SimVehicle.SetShaderValue(index: integer, value: float)

Argument
Type
Description

index

integer

(0 to 5)

value

float

-

Sets new Shader value.

Last updated

Was this helpful?