SA-MP Forums Archive
Convert data - 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: Convert data (/showthread.php?tid=605133)



Convert data - itachi - 14.04.2016

Please how to convert this to dini save

----- Save Data ------
format(str,200,"%d\r\n",GetPVarInt(playerid,"JB")) ;
fwrite(file,str);
format(str,200,"%d\r\n",GetPVarInt(playerid,"Skin" ));
fwrite(file,str);

---- Load Data -----
fread(file,str); SetPVarInt(playerid,"Job",strval(str));
fread(file,str); SetPVarInt(playerid,"Skin",strval(str));