Dialog Problem and loading last pos!
#4

Make a variable like FirstSpawn[playerid], on connect its set to 0. When player spawn for the first time, do timer like this:
pawn Код:
if(FirstSpawn[playerid] == 0) SetTimerEx("RestorePos", 500, false, "i", playerid);
It will call for a public function called RestorePos:

pawn Код:
forward RestorePos(playerid);
public RestorePos(playerid)
{
    SetPlayerPos(playerid, LAST X, LAST Y,LAST Z);
    FirstSpawn[playerid] = 1; // setting this to 1 so it wont send player back on every spawn
    GameTextForPlayer(playerid,"~y~Restored to last known pos",3000,1);
    return 1;
}
Reply


Messages In This Thread
Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 11:29
Re: Dialog Problem and loading last pos! - by Richie© - 21.04.2012, 11:31
Re: Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 11:31
Re: Dialog Problem and loading last pos! - by Richie© - 21.04.2012, 11:37
Re: Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 11:38
Re: Dialog Problem and loading last pos! - by Richie© - 21.04.2012, 11:40
Re: Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 11:50
Re: Dialog Problem and loading last pos! - by Richie© - 21.04.2012, 11:54
Re: Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 11:58
Re: Dialog Problem and loading last pos! - by HazardGaming - 21.04.2012, 12:27

Forum Jump:


Users browsing this thread: 3 Guest(s)