SA-MP Forums Archive
Normal Checkpoints help - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Normal Checkpoints help (/showthread.php?tid=191840)



Normal Checkpoints help - FerrariII - 20.11.2010

why when i try to add more than 1 Checkpoint one disappears?


Re: Normal Checkpoints help - gr56 - 20.11.2010

SAMP allow only 1 checkpoint at the moment, use streamer


Re: Normal Checkpoints help - FerrariII - 20.11.2010

which streamer?

Names: and i'll search them


Re: Normal Checkpoints help - iggy1 - 20.11.2010

You can only have one active at a time you need to check if the player is in range of the checkpoint inside onplayerentercheckpoint then disable the current checkpoint ie,
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, CP_SIZE, BurnFarmCpsA[0][0],BurnFarmCpsA[0][1],BurnFarmCpsA[0][2]))
    {
        DisablePlayerRaceCheckpoint(playerid);
        PlayerPlaySound(playerid, 1058, 0.0,0.0,0.0);
        SetPlayerRaceCheckpoint(playerid, 0, BurnFarmCpsA[1][0], BurnFarmCpsA[1][1],BurnFarmCpsA[1][2], BurnFarmCpsA[2][0], BurnFarmCpsA[2][1],BurnFarmCpsA[2][2],CP_SIZE);
        return 1;
    }
    return 1;
}
That race checkpoint but its the same for normal ones too.

EDIT: I personally dont use streamers for racecheckpoints they stream on the minimap from a longer distance if you don't use one.


Re: Normal Checkpoints help - FerrariII - 20.11.2010

Quote:
Originally Posted by iggy1
Посмотреть сообщение
You can only have one active at a time you need to check if the player is in range of the checkpoint inside onplayerentercheckpoint then disable the current checkpoint ie,
pawn Код:
public OnPlayerEnterRaceCheckpoint(playerid)
{
    if(IsPlayerInRangeOfPoint(playerid, CP_SIZE, BurnFarmCpsA[0][0],BurnFarmCpsA[0][1],BurnFarmCpsA[0][2]))
    {
        DisablePlayerRaceCheckpoint(playerid);
        PlayerPlaySound(playerid, 1058, 0.0,0.0,0.0);
        SetPlayerRaceCheckpoint(playerid, 0, BurnFarmCpsA[1][0], BurnFarmCpsA[1][1],BurnFarmCpsA[1][2], BurnFarmCpsA[2][0], BurnFarmCpsA[2][1],BurnFarmCpsA[2][2],CP_SIZE);
        return 1;
    }
    return 1;
}
That race checkpoint but its the same for normal ones too.

EDIT: I personally dont use streamers for racecheckpoints they stream on the minimap from a longer distance if you don't use one.
public OnPlayerEnterRaceCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, etc....))
{
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint(playerid, etc.....);
return 1;
}
return 1;
}

and do multiple ones if i want ?


Re: Normal Checkpoints help - iggy1 - 20.11.2010

As many times as you want.... One at a time though - per player.