Save coordinates when player disconnects
#3

Quote:
Originally Posted by MattTucker
Посмотреть сообщение
Can you post the loading and saving system codes for positions?
Well, it's quite simple.

Loading:
pawn Код:
//Under the login dialog
pInfo[playerid][posX] = dini_Float(path,"posX");
pInfo[playerid][posY] = dini_Float(path,"posY");
pInfo[playerid][posZ] = dini_Float(path,"posZ");
pInfo[playerid][Interior] = dini_Int(path,"Interior");
pInfo[playerid][VirtualWorld] = dini_Int(path,"VirtualWorld");
Saving:
pawn Код:
//Under OnPlayerDisconnect
new Float:ppX,Float:ppY,Float:ppZ;
GetPlayerPos(playerid,ppX,ppY,ppZ);
dini_FloatSet(path, "posX", ppX);
dini_FloatSet(path, "posY", ppY);
dini_FloatSet(path, "posZ", ppZ);
dini_IntSet(path, "Interior", GetPlayerInterior(playerid));
dini_IntSet(path, "VirtualWorld", GetPlayerVirtualWorld(playerid));
Reply


Messages In This Thread
Save coordinates when player disconnects - by Vlad64 - 20.02.2014, 19:22
Re: Save coordinates when player disconnects - by MattTucker - 20.02.2014, 19:36
Re: Save coordinates when player disconnects - by Vlad64 - 20.02.2014, 20:07
Re: Save coordinates when player disconnects - by Abagail - 20.02.2014, 20:23
Re: Save coordinates when player disconnects - by MattTucker - 20.02.2014, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)