- Documentation
- Server functions
- setVehicleVariant
Function
setVehicleVariant
Chooses the appearance variants of a vehicle model, i.e. the game's factory extras: roof rack, a different pickup bed, cargo, covers. Every model has its own number of variants (many have none). Without arguments a variant is picked at random. The change is visible to every player.
Syntax
bool setVehicleVariant(vehicle vehicle [, int v1 = losowy, int v2 = 255])Arguments
vehiclevehicle- The vehicle.
v1int, optional = losowy- First variant: 0 to the model's variant count minus 1, or 255 = none.
v2int, optional = 255- Second variant, same values.
Returns
true on success, false when the model has no such variant.
Example
local pickup = createVehicle(422, 2000, -1690, 13.5)
setVehicleVariant(pickup, 0, 255)