SimVehicle
General game-vehicle, properties & functions are derived from SimObject.
Properties:
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
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
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
index
integer
(0 to [SeatCount - 1])
Returns SimCharacter object if there is passenger occupant in current vehicle otherwise null.
Color Functions:
This is modification implement inside Script Modification that is hooked around Illusion BlockState Engine render and using it might be unstable and it will not work on all vehicles.
.GetPrimaryColor
SimVehicle.GetPrimaryColor()
: Color
Returns Primary Color of vehicle.
.SetPrimaryColor
SimVehicle.SetPrimaryColor(color: Color)
color
Color
Color object
Sets new Primary Color of vehicle.
.GetSecondaryColor
SimVehicle.GetSecondaryColor()
: Color
Returns Secondary Color of vehicle.
.SetSecondaryColor
SimVehicle.SetSecondaryColor(color: Color)
color
Color
Color object
Sets new Secondary Color of Vehicle.
.GetShaderValue
SimVehicle.GetShaderValue(index: integer)
: float
index
integer
(0 to 5)
Returns Value of shader.
.SetShaderValue
SimVehicle.SetShaderValue(index: integer, value: float)
index
integer
(0 to 5)
value
float
-
Sets new Shader value.
Last updated