note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
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
Name | Description |
---|---|
vehicleid | The ID of the vehicle. |
modelid | Vehicle model id to set. |
Float:spawnX | The X coordinate to set. |
Float:spawnY | The Y coordinate to set. |
Float:spawnZ | The Z coordinate to set. |
Float:angle | The angle to set. |
colour1 | The vehicle colour 1 to set. |
colour2 | The vehicle colour 2 to set. |
respawnDelay = -2 | The vehicle respawn delay to set. |
interior = -2 | The 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;
}
Related Functions
- GetVehicleSpawnInfo: Gets the vehicle spawn location and colours.