Przejdź do głównej zawartości

SetVehicleSpawnInfo

warning

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Adjusts vehicle model, spawn location, colours, respawn delay and interior.

Parameters

NameDescription
vehicleidThe ID of the vehicle.
modelidVehicle model id to set.
Float:spawnXThe X coordinate to set.
Float:spawnYThe Y coordinate to set.
Float:spawnZThe Z coordinate to set.
Float:angleThe angle to set.
colour1The vehicle colour 1 to set.
colour2The vehicle colour 2 to set.
respawnDelay = -2The vehicle respawn delay to set.
interior = -2The interior id to set.

Examples

public OnGameModeInit()
{
new vehicleid = CreateVehicle(560, 2096.1917, -1328.5150, 25.1059, 0.0000, 6, 0, 100);

SetVehicleSpawnInfo(vehicleid, 522, 2096.0417, -1314.1062, 24.0078, 0.0000, 1, 7);
return 1;
}