SA-MP Forums Archive
Checkpoints. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Checkpoints. (/showthread.php?tid=546381)



Checkpoints. - HY - 15.11.2014

pawn Код:
new VCheck;

public OnFilterScriptInit()
{
    VCheck = CreateDynamicCP(1498.7206,-1580.5266,13.5498,2.6653,0,0,0,0);
    return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == AdminBuilding)
    {
        GangZoneFlashForAll(VGang, COLOR_RED);
    }
    return 1;
}
How to check if a player it's staying in Checkpoint, for 30 seconds?


Re: Checkpoints. - DavidBilla - 15.11.2014

Create a timer in onplayerenterdynamic cp
If you have any callback to check if player leaves the checkpoint, kill the timer there. Within these gap if he stayed in the checkpoint for 30 seconds which you check in the timer, continue your functions