SA-MP Forums Archive
position 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: position saving (/showthread.php?tid=241395)



position saving - tanush - 17.03.2011

under onplayerdisconnect i put
pawn Код:
new Pos[3];
                GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
                dini_FloatSet(file, "PosX",Pos[0]);
                dini_FloatSet(file, "PosY",Pos[1]);
                dini_FloatSet(file, "PosZ",Pos[2]);
but i got some warning
pawn Код:
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(805) : warning 213: tag mismatch
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(805) : warning 213: tag mismatch
D:\Users\Tanush\Desktop\SA-MP\gamemodes\Server.pwn(805) : warning 213: tag mismatch
with line
pawn Код:
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
And when i reconnect my pos goes to 0
Код:
Adminlevel=4
Password=*************
Money=100000
Score=0
PosX=0.000000
PosY=0.000000
PosZ=0.000000



Re: position saving - Calgon - 17.03.2011

Change
pawn Код:
new Pos[3];
to
pawn Код:
new Float: Pos[3];
You need to use floats for player coordinates.


Re: position saving - tanush - 18.03.2011

still 0