06.03.2011, 20:07
hmm try this, not sure if it works
Under OnPlayerSpawn
Under OnPlayerDisconnect
And this, outside of any callbacks(recommended at the buttom of your script)
It should write the coordinates in to a player file and then load it. But im not sure, you can try it
Under OnPlayerSpawn
pawn Код:
SetPlayerPosition(playerid, dini_Int(file, "PositionX"));
SetPlayerPosition(playerid, dini_Int(file, "PositionY"));
SetPlayerPosition(playerid, dini_Int(file, "PositionZ"));
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);
pawn Код:
new position[MAX_PLAYERS];
stock GetPlayerPosition(playerid)
{
return position[playerid];
}
stock SetPlayerPosition(playerid, pos)
{
position[playerid] = position[playerid] + pos;
return position[playerid];
}

