dini help...
#7

hmm try this, not sure if it works

Under OnPlayerSpawn
pawn Код:
SetPlayerPosition(playerid, dini_Int(file, "PositionX"));
    SetPlayerPosition(playerid, dini_Int(file, "PositionY"));
    SetPlayerPosition(playerid, dini_Int(file, "PositionZ"));
Under OnPlayerDisconnect
pawn Код:
new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    dini_FloatSet(file, "PositionX", x);
    dini_FloatSet(file, "PositionY", y);
    dini_FloatSet(file, "PositionZ", z);
And this, outside of any callbacks(recommended at the buttom of your script)

pawn Код:
new position[MAX_PLAYERS];
stock GetPlayerPosition(playerid)
{
   return position[playerid];
}


stock SetPlayerPosition(playerid, pos)
{
    position[playerid] = position[playerid] + pos;
    return position[playerid];
}
It should write the coordinates in to a player file and then load it. But im not sure, you can try it
Reply


Messages In This Thread
dini help... - by tanush - 06.03.2011, 18:03
Re: dini help... - by tanush - 06.03.2011, 18:55
Re: dini help... - by xir - 06.03.2011, 19:02
Re: dini help... - by tanush - 06.03.2011, 19:06
Re: dini help... - by Stigg - 06.03.2011, 19:27
Re: dini help... - by tanush - 06.03.2011, 19:39
Re: dini help... - by xir - 06.03.2011, 20:07

Forum Jump:


Users browsing this thread: 1 Guest(s)