[REQUEST]Loading player last pos?
#3

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.

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;
}
I don't really use Y-Ini, but you get the idea.
Reply


Messages In This Thread
[REQUEST]Loading player last pos? - by BleverCastard - 09.05.2012, 21:30
Re: [REQUEST]Loading player last pos? - by Kudoz - 09.05.2012, 21:38
Re: [REQUEST]Loading player last pos? - by Yuryfury - 09.05.2012, 21:40
Re: [REQUEST]Loading player last pos? - by Face9000 - 09.05.2012, 22:09

Forum Jump:


Users browsing this thread: 2 Guest(s)