Saving Skin/Position
#4

Hmm, I can't realy understand why the Skin won't save, as I'm using the same method - and that works 100%.

For the Position - I use this:

In you Playerinfo enum:
Code:
Float:pPosX,
Float:pPosY,
Float:pPosZ,
Under your Login Function
Code:
pInfo[playerid][pPosX] = dini_Float(File, "PosX");
pInfo[playerid][pPosY] = dini_Float(File, "PosY");
pInfo[playerid][pPosZ] = dini_Float(File, "PosZ");

SetSpawnInfo(playerid, 0, pInfo[playerid][pSkin],pInfo[playerid][pPosX],pInfo[playerid][pPosY],pInfo[playerid][pPosZ],0,0,0,0,0,0,0);
SpawnPlayer(playerid);
Under your Data Save Function
Code:
GetPlayerPos(playerid, pInfo[playerid][pPosX], pInfo[playerid][pPosY], pInfo[playerid][pPosZ]);

dini_FloatSet(File, "PosX", pInfo[playerid][pPosX]);
dini_FloatSet(File, "PosY", pInfo[playerid][pPosY]);
dini_FloatSet(File, "PosZ", pInfo[playerid][pPosZ]);
Tell me if that works.
Reply


Messages In This Thread
Saving Skin/Position - by TKZ227 - 05.07.2010, 22:09
Re: Saving Skin/Position - by Miikkel - 05.07.2010, 22:39
Re: Saving Skin/Position - by TKZ227 - 05.07.2010, 22:43
Re: Saving Skin/Position - by Miikkel - 05.07.2010, 22:54
Re: Saving Skin/Position - by TKZ227 - 06.07.2010, 02:18
Re: Saving Skin/Position - by Miikkel - 06.07.2010, 07:11
Re: Saving Skin/Position - by TheKingOfSamp - 06.07.2010, 14:00

Forum Jump:


Users browsing this thread: 2 Guest(s)