31.08.2011, 20:24
(
Последний раз редактировалось Luis-; 31.08.2011 в 21:44.
)
Right, I am making a new gamemode which will have a dini version and a mysql version which I am planning to release here but I am having a problem scripting the dini version, now I haven't used dini for a while but here's my code.
And here's the global variable for the cars.
Thanks in advance.
pawn Код:
forward LoadVehicles();
public LoadVehicles()
{
new file[128];
format(file, sizeof(file), "/Vehicles/%d.ini", cars);
if(!dini_Exists(file))
{
VehicleInfo[cars][vModel] = dini_Int(file, "Model");
VehicleInfo[cars][vPosX] = dini_Float(file, "X");
VehicleInfo[cars][vPosY] = dini_Float(file, "Y");
VehicleInfo[cars][vPosZ] = dini_Float(file, "Z");
VehicleInfo[cars][vPosA] = dini_Float(file, "A");
VehicleInfo[cars][vColor1] = dini_Int(file, "Color1");
VehicleInfo[cars][vColor2] = dini_Int(file, "Color2");
//CreateVehicle(VehicleInfo[cars][vModel], VehicleInfo[cars][vPosX], VehicleInfo[cars][vPosY], VehicleInfo[cars][vPosZ], VehicleInfo[cars][vPosA], VehicleInfo[cars][vColor1], VehicleInfo[cars][vColor1], false);
CreateVehicle(dini_Int(file, "Model"), dini_Float(file, "X"), dini_Float(file, "Y"), dini_Float(file, "Z"), dini_Float(file, "A"), dini_Int(file, "Color1"), dini_Int(file, "Color2"), false);
}
return 1;
}
pawn Код:
new cars = 0;