07.01.2012, 17:04
**Written on the forum**
This is just an example to get you going. If the player does not enter the vehicle it will not respawn and not be deleted. To fix this, put them in the vehicle as it is spawned and if they leave within the first 5 seconds, just destroy the vehicle then.
pawn Код:
// Top of your script.
new bool:g_IsSpawnedVehicle[ MAX_VEHICLES char ];
// In spawning command.
new vehicleid = AddStaticVehicleEx( 552, 0.0000, 0.0000, 0.0000, 0.0000, -1, -1, 60 );
g_IsSpawnedVehicle{ vehicleid } = true;
// under OnVehicleSpawn
if ( g_IsSpawnedVehicle{ vehicleid } )
{
DestroyVehicle( vehicleid );
g_IsSpawnedVehicle{ vehicleid } = false;
}