12.09.2013, 21:38
pawn Код:
stock VehicleLoadAll() // This function will load all of the system vehicles created and saved.
{
new index = 0; // We need this variable to keep track of the id or the index of the file. Start it with 0 as the id.
while(fexist(VehiclePath(index))) // If any system vehicle has been created before with that 0 id
{
LoadPVehicles(index, VehiclePath(index)); // Then load that vehicle.
index++; // And move on to another system vehicle id.
}
printf("Vehicles Loaded: %d", index); // Print out how many vehicles has been loaded.
}
pawn Код:
public OnGameModeInit()
{
VehicleLoadAll(); // Load all vehicles when the main script starts.
return 1;
}

