31.08.2013, 21:34
The cars create on OnGameMode.
Is something wrong here, maybe? Looks ok?
Cars still don't load buddy. They don't create D:
Is something wrong here, maybe? Looks ok?
pawn Код:
public OnGameModeInit() // Do not add vehicles Above the next lines. - CuervO
{
LoadCar();
new string2[64];
for(new h = 0; h < sizeof(CarInfo); h++)
{
format(string2, sizeof(string2), "LARP/Vehicles/%d.ini",h);
new INI:gmcfile = INI_Open(string2);
if(fexist(string2))
{
ownedcar[h] = AddStaticVehicleEx(CarInfo[h][cModel],CarInfo[h][cLocationx],CarInfo[h][cLocationy],CarInfo[h][cLocationz]+1.0,CarInfo[h][cAngle],CarInfo[h][cColorOne],CarInfo[h][cColorTwo],60000);
if(CarInfo[h][cLock] == 1)
{
new e,l,a,d,b,bo,o;
GetVehicleParamsEx(h,e,l,a,d,b,bo,o);
SetVehicleParamsEx(h,e,l,a,1,b,bo,o);
}
if(CarInfo[h][cPaintjob] != 999)
{
ChangeVehiclePaintjob(h, CarInfo[h][cPaintjob]);
}
SetVehicleModifications(h);
new lights, alarm, doors, bonnet, boot, objective;
SetVehicleParamsEx(h, 0, lights, alarm, doors, bonnet, boot, objective);
engineOn[h] = false;
}
INI_Close(gmcfile); // Closes the file
}
pawn Код:
INI_ParseFile(carfile, "LoadCar_Data", .bExtra = true, .extra = idx);