public OnVehicleSpawn(vehicleid)
{
motors[vehicleid] = 0;
if(vehicleid > 215 && vehicleid < 240)
{
new Float:X, Float:Y, Float:Z;
new string[256];
format(string, sizeof(string), "%dx", vehicleid);
X = dini_Float("Autohaus2.ini", string);
format(string, sizeof(string), "%dy", vehicleid);
Y = dini_Float("Autohaus2.ini", string);
format(string, sizeof(string), "%dz", vehicleid);
Z = dini_Float("Autohaus2.ini", string);
if(X == 999 && Y == 999 && Z == 999)
{
} else {
SetVehiclePos(vehicleid, X, Y, Z);
}
}
return 1;
}
|
Important note: This function ONLY works if someone has been in the vehicle since it spawn. |
public OnVehicleSpawn(vehicleid) // OnVehicleSpawn
{
Spawning[vehicleid] += 2;
return 1;
} //----------
public SecondTimer() // SecondTimer
{
for(new c=1; c<=CarCount; c++)
{
if(Spawning[c] > 0)
{
new tmpowner = CarsOwner[c];
SetVehiclePos(c, PlayerCar[tmpowner][x], PlayerCar[tmpowner][y], PlayerCar[tmpowner][z]);
SetVehicleZAngle(c, PlayerCar[tmpowner][ang]);
Spawning[c]--;
}
}
return 1;
}