Player doesn't spawn to the last position he was at.
#1

I use dini. Saves like this:

pawn Код:
dini_FloatSet(string, "PX", X);
dini_FloatSet(string, "PY", Y);
dini_FloatSet(string, "PZ", Z);
and I use it in SetSpawnInfo when they login.

pawn Код:
SetSpawnInfo(playerid, 0, Account[playerid][Skin], Account[playerid][PX],Account[playerid][PY],Account[playerid][PZ],0.0,0,0,0,0,0,0);
Any suggestions?
Reply
#2

And how do you load the stored position?
Reply
#3

omg, i just saw that i read false. I wrote you something to load the pos where he died.
Sorry...
Reply
#4

pawn Код:
Account[playerid][PX] = dini_Float(string, "X");
Account[playerid][PY] = dini_Float(string, "Y");
Account[playerid][PZ] = dini_Float(string, "Z");
Reply
#5

Quote:
Originally Posted by {Awaran};
pawn Код:
Account[playerid][PX] = dini_Float(string, "X");
Account[playerid][PY] = dini_Float(string, "Y");
Account[playerid][PZ] = dini_Float(string, "Z");
Of course it doesn't work, just check the saving code:
Quote:
Originally Posted by {Awaran};
pawn Код:
dini_FloatSet(string, "PX", X);
dini_FloatSet(string, "PY", Y);
dini_FloatSet(string, "PZ", Z);
You saved it as "PX", "PY" and "PZ", so you should load it like this:
pawn Код:
Account[playerid][PX] = dini_Float(string, "PX");
Account[playerid][PY] = dini_Float(string, "PY");
Account[playerid][PZ] = dini_Float(string, "PZ");
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)