position saving
#1

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
Reply
#2

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

still 0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)