SA-MP Forums Archive
Y_ini player pos saving - 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: Y_ini player pos saving (/showthread.php?tid=260667)



Y_ini player pos saving - Gintas - 10.06.2011

Hi, how to save and load player positions with Y_ini ?
I succesfuly made that players position gets saved, but how do i load it when player connects?
This is how i saved it.
Код:
		new Float:X, Float:Y, Float:Z;
 		GetPlayerPos(playerid, X, Y, Z);
 		INI_WriteFloat(PlayerAcc, "SpawnX", X);
 		INI_WriteFloat(PlayerAcc, "SpawnY", Y);
 		INI_WriteFloat(PlayerAcc, "SpawnZ", Z);
The same problem is with interiors. I know how to save it but i cant understand how to load it


Re: Y_ini player pos saving - PGTips - 10.06.2011

Try using this on on player disconect vefore the saving

GetPlayerPos(playerid, rx, ry, rz);

then you want to save them so what you then do is save it also i dontknow what your using so i dont know if you have rx ry rz defined under a seperate public statement


Re: Y_ini player pos saving - Gintas - 10.06.2011

no man i just showed what code i use to save. It works perfect.
Just i dont know how to load it when player logs in.
Im using https://sampforum.blast.hk/showthread.php?tid=210277


Re: Y_ini player pos saving - Gintas - 10.06.2011

bump


Re: Y_ini player pos saving - Gintas - 11.06.2011

help?


Re: Y_ini player pos saving - Gintas - 12.06.2011

bump


Re: Y_ini player pos saving - randomkid88 - 12.06.2011

Use INI_ParseFile from that topic, it explains how to load user files. Also, read the forum rules and don't bump posts more than once every 48 hours.