Help With My /Find command.
#2

Use timers
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;
}
That's a basic example, you'll still need to kill the timer accordingly.
Reply


Messages In This Thread
Help With My /Find command. - by Magic_Time - 27.12.2012, 18:44
Re: Help With My /Find command. - by ReneG - 27.12.2012, 18:57
Re: Help With My /Find command. - by RedCrossER - 27.12.2012, 20:16

Forum Jump:


Users browsing this thread: 1 Guest(s)