SA-MP Forums Archive
How to save all cars on a .txt file? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to save all cars on a .txt file? (/showthread.php?tid=190232)



How to save all cars on a .txt file? - blackwave - 14.11.2010

Like every car on scriptifiles, on a .txt or .ini file, and when loads gamemode, it loads all cars on the F1Le.


Re: How to save all cars on a .txt file? - Mike_Peterson - 14.11.2010

use djson or dini.. or fwrite


Re: How to save all cars on a .txt file? - rs.pect - 14.11.2010

Use sscanf and format.

For saving:
pawn Код:
format(string, "%d|%f|%f|%f|%f|other params", model, X, Y, Z, A);
For loading:
pawn Код:
sscanf(string, "p<|>dffff", X, Y, Z, A);