Click or drag to resize

IVehicleFactoryCreate Method

Creates a BaseVehicle in the world.

Namespace:  SampSharp.GameMode.Factories
Assembly:  SampSharp.GameMode (in SampSharp.GameMode.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
BaseVehicle Create(
	VehicleModelType vehicletype,
	Vector3 position,
	float rotation,
	int color1,
	int color2,
	int respawnDelay = -1,
	bool addAlarm = false
)

Parameters

vehicletype
Type: SampSharp.GameMode.DefinitionsVehicleModelType
The model for the vehicle.
position
Type: SampSharp.GameModeVector3
The coordinates for the vehicle.
rotation
Type: SystemSingle
The facing angle for the vehicle.
color1
Type: SystemInt32
The primary color ID.
color2
Type: SystemInt32
The secondary color ID.
respawnDelay (Optional)
Type: SystemInt32
The delay until the car is respawned without a driver in seconds. Using -1 will prevent the vehicle from respawning.
addAlarm (Optional)
Type: SystemBoolean
If true, enables the vehicle to have a siren, providing the vehicle has a horn.

Return Value

Type: BaseVehicle
The BaseVehicle created.
See Also