09.05.2012, 21:40
Do GetPlayerPos and save the X,Y,Z to the user file. Then load them back when you want the player to be set to their last position.
I don't really use Y-Ini, but you get the idea.
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new Float:pos[3];
GetPlayerPos(playerid,pos[0],pos[1],pos[3]);
// Save these to the file
return 1;
}
public OnPlayerSpawn(playerid)
{
new Float:pos[3];
//load these from the file
SetPlayerPos(playerid,pos[0],pos[1],pos[3]);
return 1;
}