SetPlayerPos [Rep +1]
#2

Save the player's position like this:
pawn Код:
new
    Float: gLastPos[MAX_PLAYERS][3];

//When you use the command:

CMD:port(playerid,params[])
{
    #pragma unused params

    GetPlayerPos(playerid, gLastPos[playerid][0], gLastPos[playerid][1], gLastPos[playerid][2]); // Save the coordinates of his position

    SetPlayerPos(playerid,2048.9729,-1908.4037,13.5469);
    return true;
}

// Return him back to his old location:
CMD:portback(playerid,params[])
{
    #pragma unused params
    //How do I return to the coordinates where it was when he type / port
    SetPlayerPos(playerid, gLastPos[playerid][0], gLastPos[playerid][1], gLastPos[playerid][2]);
    return true;
}
Reply


Messages In This Thread
SetPlayerPos [Rep +1] - by ZmaXy - 30.12.2011, 22:50
Re: SetPlayerPos [Rep +1] - by -Prodigy- - 30.12.2011, 22:54
Re: SetPlayerPos [Rep +1] - by ZmaXy - 30.12.2011, 23:18

Forum Jump:


Users browsing this thread: 3 Guest(s)