Click or drag to resize

WorldServiceCreateStaticVehicle Method

Creates a static vehicle in the world.

Namespace:  SampSharp.Entities.SAMP
Assembly:  SampSharp.Entities (in SampSharp.Entities.dll) Version: 0.0.0-localbuild+05637d43e9f34d872e453289d4e240c843e43b09
Syntax
C#
public Vehicle CreateStaticVehicle(
	VehicleModelType type,
	Vector3 position,
	float rotation,
	int color1,
	int color2,
	int respawnDelay = -1,
	bool addSiren = false,
	EntityId parent = default
)

Parameters

type
Type: SampSharp.Entities.SAMPVehicleModelType
The model for the vehicle.
position
Type: SampSharp.Entities.SAMPVector3
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.
addSiren (Optional)
Type: SystemBoolean
If true, enables the vehicle to have a siren, providing the vehicle has a horn.
parent (Optional)
Type: SampSharp.EntitiesEntityId
The parent of the entity to be created.

Return Value

Type: Vehicle
The created vehicle.

Implements

IWorldServiceCreateStaticVehicle(VehicleModelType, Vector3, Single, Int32, Int32, Int32, Boolean, EntityId)
See Also