SA-MP Forums Archive
So I need help with saving log out coords. - 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: So I need help with saving log out coords. (/showthread.php?tid=442355)



So I need help with saving log out coords. - Scrillex - 07.06.2013

Hello dear forumers. I need your help


I have taken this code from tutorial but still got the errors...

pawn Код:
error 028: invalid subscript (not an array or too many subscripts): "PosX"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
pawn Код:
GetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
    GetPlayerFacingAngle(playerid,Angle[playerid]);



Respuesta: So I need help with saving log out coords. - Parka - 07.06.2013

pawn Код:
new PosX[MAX_PLAYERS], PosY[MAX_PLAYERS], PosZ[MAX_PLAYERS], Angle[MAX_PLAYERS];

//function
GetPlayerPos(playerid,PosX[playerid],PosY[playerid],PosZ[playerid]);
GetPlayerFacingAngle(playerid,Angle[playerid]);



Re: So I need help with saving log out coords. - Scrillex - 07.06.2013

Yeah fixed it now it aint working at all..... it's just madness
pawn Код:
GetPlayerPos(playerid,pInfo[playerid][PosX],pInfo[playerid][PosY],pInfo[playerid][PosZ]);
GetPlayerFacingAngle(playerid,pInfo[playerid][Angle]);
pawn Код:
INI_WriteFloat(file,"PositionX",pInfo[playerid][PosX]);
    INI_WriteFloat(file,"PositionY",pInfo[playerid][PosY]);
    INI_WriteFloat(file,"PositionZ",pInfo[playerid][PosZ]);
    INI_WriteFloat(file,"Angle",pInfo[playerid][Angle]);
    INI_WriteInt(file,"Interior",GetPlayerInterior(playerid));
    INI_WriteInt(file,"VirtualWorld",GetPlayerVirtualWorld(playerid));
And thats what it saves

pawn Код:
AdminLevel = 0
VIPLevel = 0
Money = 0
Scores = 0
Kills = 0
Deaths = 0