Checkpoint reward
#2

You'll need to look at checkpoints and OnPlayerEnterCheckpoint, the others listed are also relevant.

https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint

OnPlayerLeaveCheckpoint: Called when a player leaves a checkpoint.
OnPlayerEnterRaceCheckpoint: Called when a player enters a race checkpoint.
OnPlayerLeaveRaceCheckpoint: Called when a player leaves a race checkpoint.

Obviously I don't know how your script looks but it'd be something like this:

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(StartedRace[playerid] && RaceStep[playerid] == 6) // say 6 is the final step, idk
    {
         // Code here (SetPlayerScore etc..)
        }
}
Reply


Messages In This Thread
Checkpoint reward - by kkurex1 - 02.07.2018, 13:01
Re: Checkpoint reward - by Jing_Chan - 02.07.2018, 13:19
Re: Checkpoint reward - by CaptainBoi - 02.07.2018, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)