21.04.2012, 21:06
How would I load this using Y INI, its saves but Im unable to load it:
Tried everything I could think off.
pawn Код:
for(new v = 0; v < MAX_PLAYERVEHICLES; v++) // Doesnt load
{
new var[1240];
format(var, 32, "v%dPosX", v);
INI_Float(var,PlayerVehicleInfo[playerid][v][vPosX]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosX] = strval(value); } // Tried to see if that would work.. But it doesnt.
format(var, 32, "v%dPosY", v);
INI_Float(var,PlayerVehicleInfo[playerid][v][vPosY]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosY] = strval(value); }
format(var, 32, "v%dPosZ", v);
INI_Float(var,PlayerVehicleInfo[playerid][v][vPosZ]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosZ] = strval(value); }
format(var, 32, "v%dPosAngle", v);
INI_Float(var,PlayerVehicleInfo[playerid][v][vPosAngle]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vPosAngle] = strval(value); }
format(var, 32, "v%dModelId", v);
INI_Int(var,PlayerVehicleInfo[playerid][v][vModelId]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vModelId] = strval(value); }
format(var, 32, "v%dLock", v);
INI_Int(var,PlayerVehicleInfo[playerid][v][vLock]);
if(!strcmp(name, var)) { PlayerVehicleInfo[playerid][v][vLock] = strval(value); }
}
return 1;
}