/back cmd
#2

You would need a timer that is called every second and updates the marker. For example, in /backup you could put:

Код:
//This goes at the top of the script somewhere
new BackupTimer[MAX_PLAYERS];

BackupTimer[playerid] = SetTimerEx("BackupTimer", 1000, true, "i", playerid);
And then the timer would be:

Код:
forward BackupTimer(playerid);
public BackupTimer(playerid)
{
	new Float:pPos[3];
	GetPlayerPos(playerid, pPos[0], pPos[1], pPos[2]);
	foreach(Player, i)
	{
		if(gTeam[i] == 2 || IsACop(i))
		{
			SetPlayerCheckpoint(i, pPos[0], pPos[1], pPos[2], 5.0);
		}
	}
}
And wherever you cancel the backup or however it gets ended you can put:

Код:
KillTimer(BackupTimer[playerid]);
Reply


Messages In This Thread
/back cmd - by matthew1211 - 20.01.2014, 00:02
Re: /back cmd - by Chenko - 20.01.2014, 00:07

Forum Jump:


Users browsing this thread: 1 Guest(s)