SA-MP Forums Archive
Checkpoint timer - 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: Checkpoint timer (/showthread.php?tid=348043)



Checkpoint timer - TheDiscussionCafe - 03.06.2012

hello. here is my work checkpoint timer:

pawn Код:
COMMAND:work(playerid, cmdtext)
{
    if (!IsPlayerInRangeOfPoint(playerid, 7.0, -64.1551,-1120.6709,1.0781))
    {
        return SendClientMessage(playerid, COLOR_RED, "You're not in range of the job");
    }
    else
    {
        SendClientMessage(playerid, blue, "Welcome to work!");
        SendClientMessage(playerid, yellow, "Please drive to the checkpoint to recieve your reward.");
        new thevehicle = CreateVehicle(498, -79.2382, -1128.1711, 1.0781, 0.0, 0, 0, 5000);
        PutPlayerInVehicle(playerid, thevehicle, 0);
        SetPlayerCheckpoint(playerid,1827.8311,-1075.7113,23.9317,3.0);
    }
    return 1;
}
how i make so "SetPlayerCheckpoint(playerid,1827.8311,-1075.7113,23.9317,3.0);" checkpoint can refresh every 2 seconds?


Re: Checkpoint timer - iGetty - 04.06.2012

Why do you need it to refresh every 2 seconds? That will just make your server lag.


Re: Checkpoint timer - [NWA]Hannes - 04.06.2012

Quote:
Originally Posted by TheDiscussionCafe
Посмотреть сообщение
hello. here is my work checkpoint timer:

pawn Код:
code...
how i make so "SetPlayerCheckpoint(playerid,1827.8311,-1075.7113,23.9317,3.0);" checkpoint can refresh every 2 seconds?
Where are you setting the checkpoint?

Quote:
Originally Posted by iGetty
Посмотреть сообщение
Why do you need it to refresh every 2 seconds? That will just make your server lag.
It wont really lag from a two second interval.


Re: Checkpoint timer - MP2 - 04.06.2012

Why would you want to 'refresh' it? Just don't set another checkpoint for that player? If you're using Incognito's streamer use

pawn Код:
TogglePlayerAllDynamicCPs(playerid, false);
SetPlayerCheckpoint(...);
and only your set checkpoint will be set.