22.11.2007, 03:39
Maybe you should change your vehicle count function to this, it'd be more accurate.
In your VehicleModel function you should make a variable for the return value of VehicleCount and save it there instead of creating and then destroying 250 vehicles.
pawn Код:
stock VehicleCount( )
{
new iVehicleCnt;
for( new i = 1; i < MAX_VEHICLES; i++ ) // Loop vehicles.
if ( GetVehicleModel( i ) ) // If it's not a valid vehicleid then GetVehicleModel will return 0.
iVehicleCnt++; // Increase if the vehicle model is not 0.
return iVehicleCnt;
}