The issue you described has something to do with the map itself, and not any scripts. There might be a spawnpoint that is glitched. Another thing to look for is the StopSign and NightSounds scripts because those run all throughout the duration of gameplay, unlike the volunteer script which only runs when called. I'd recommend also looking into those.
What breaks do you mean? What have you changed exactly. Your help is very appreciated and I would like to thank you for helping out in the development process.
I like this mod and because I want to play for more than 5 minutes, I have spent sometime looking through issues reported here and try and fix.
if(ChildID == 0)
{
if(p.HasName(NAME_PERSON01))
{
VehicleList vl1(NAME_CAR01);
for(int j=0; j < vl1.GetNumVehicles(); j++)
{
car = vl1.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON02))
{
VehicleList vl2(NAME_CAR02);
for(int j=0; j < vl2.GetNumVehicles(); j++)
{
car = vl2.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON03))
{
VehicleList vl3(NAME_CAR03);
for(int j=0; j < vl3.GetNumVehicles(); j++)
{
car = vl3.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON04))
{
VehicleList vl4(NAME_CAR04);
for(int j=0; j < vl4.GetNumVehicles(); j++)
{
car = vl4.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON05))
{
VehicleList vl5(NAME_CAR05);
for(int j=0; j < vl5.GetNumVehicles(); j++)
{
car = vl5.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON06))
{
VehicleList vl6(NAME_CAR06);
for(int j=0; j < vl6.GetNumVehicles(); j++)
{
car = vl6.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON07))
{
VehicleList vl7(NAME_CAR07);
for(int j=0; j < vl7.GetNumVehicles(); j++)
{
car = vl7.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON08))
{
VehicleList vl8(NAME_CAR08);
for(int j=0; j < vl8.GetNumVehicles(); j++)
{
car = vl8.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON09))
{
VehicleList vl9(NAME_CAR09);
for(int j=0; j < vl9.GetNumVehicles(); j++)
{
car = vl9.GetVehicle(j);
break;
}
}
else if(p.HasName(NAME_PERSON10))
{
VehicleList vl10(NAME_CAR10);
for(int j=0; j < vl10.GetNumVehicles(); j++)
{
car = vl10.GetVehicle(j);
break;
}
}
When it loops through the number of vehicles, it never stopped. It would continue to cycle through eating at the memory a little bit, so adding the simplistic breaks where applicable, it saved a little bit on the memory. I am going to rewrite this to be more efficient on the memory, as making it cycle through the number of vehicles every time it declares a new vehicle seems a little weird.