Retrieving saved text from an array? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Retrieving saved text from an array? (
/showthread.php?tid=414781)
Retrieving saved text from an array? -
Hyperfire - 10.02.2013
Hey guys, I'm having trouble getting text from data I saved to a file using y_ini. What I did was getting a car's name and then saving it to a file, now I need to use that car's name in a format but everything I try fails. The car's name changes regularly so I need to format it to use It in a list dialog.
Код:
LSDealerInfo[playerid][TempCarID] = TempCarID;
LSDealerInfo[playerid][LSDCarName] = GetVehicleNameByModelId(TempCarID);
Save_LSDInfo(playerid);
Please note saving and loading the data is not the problem, I don't know how to format the array to return the car's name like this...
Код:
format(LSDCarsInfo, sizeof(LSDCarsInfo),"%s\n%s\n%s", LSDealerInfo[playerid][LSDCarName1], LSDealerInfo[playerid][LSDCarName2], LSDealerInfo[playerid][LSDCarName3]);
Can anyone help me on thisone please?