27.12.2012, 18:57
Use timers
That's a basic example, you'll still need to kill the timer accordingly.
pawn Код:
CMD:find(playerid, params[])
{
new targetid; new Float:x, Float:y, Float:z;
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, -1, "Usage: /find (ID)");
GetPlayerPos(targetid, x, y, z);
SetPlayerCheckpoint(playerid, x, y, z, 3.0);
SetTimerEx("findPlayer", 1000, 1, "ii", targetid, playerid);
return 1;
}
forward findPlayer(playerid, forplayerid);
public findPlayer(playerid, forplayerid)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerCheckpoint(forplayerid, x, y, z, 3.0);
return 1;
}