28.01.2013, 22:06
Anyone know how I can set the ID of vehicles (using a variable too). Bellow is what I though it was, but it doesn't work since I changed the maximum ammount of possible owned cars in my gamemode.
Thanks in advance!
What I have Onder OnGameModeInt (Maybe I need to change somthing in the code or elsewhere/use somthing else):
Thanks in advance!
What I have Onder OnGameModeInt (Maybe I need to change somthing in the code or elsewhere/use somthing else):
pawn Код:
LoadCar();
new string2[64];
for(new h = 1; h < sizeof(CarInfo); h++)
{
format(string2, sizeof(string2), "LARP/Vehicles/%d.ini",h);
if(dini_Exists(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][cPaintjob] != 999)
{
ChangeVehiclePaintjob(h, CarInfo[h][cPaintjob]);
}
SetVehicleVirtualWorld(h, CarInfo[h][cVirWorld]);
SetVehicleModifications(h);
}
}