13.01.2014, 14:21
Hello sa-mp forum.
I have a problem and i dont know how to resolve it. My private player vehicle saves successfully, but not loading..
My loading script:
OnPlayerConnect
Under connect
and the function
Maybe(i dont find) in function INI_ParseFile is a double extra parameter? In my case it should be:
Thanks for any help. REP+ if helped.
I have a problem and i dont know how to resolve it. My private player vehicle saves successfully, but not loading..
My loading script:
OnPlayerConnect
pawn Код:
function SystemConnect_Vehicles(id)
{
for(new i; i < MAX_PLAYER_CARS; i++)
{
LoadPlayerVehicle(id, i);
}
return 1;
}
pawn Код:
stock LoadPlayerVehicle(id, SlotID)
{
new s[75];
format(s, sizeof(s), "kVehicles/%s_slot_%d.ini", Name(id), SlotID);
if(fexist(s))
{
INI_ParseFile(s, "LoadVehicles_%s", .bExtra = true, .extra = id); //This is the line - Idk
}
return 1;
}
pawn Код:
forward LoadVehicles_data(id, SlotID, name[], value[]);
public LoadVehicles_data(id, SlotID, name[], value[])
{
INI_Int("ModelID", PlayerCar[id][SlotID][CarID]);
INI_Float("X", PlayerCar[id][SlotID][X]);
INI_Float("Y", PlayerCar[id][SlotID][Y]);
INI_Float("Z", PlayerCar[id][SlotID][Z]);
return 1;
}
pawn Код:
INI_ParseFile(s, "LoadVehicles_%s", .bExtra = true, .extra = id, .extra = SlotID); //Dont work