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



Checkpoint problems - NathNathii - 12.04.2013

One Checkpoint is supposed to appear at LVPD and one at Las Venturas Airport.
There's only 1 checkpoint that appears at LVPD and not at Las Venturas Airport.
And when I am far away from LVPD it still shows the checkpoint at the mini-map.

pawn Код:
public OnPlayerSpawn(playerid)
{
    SetPlayerCheckpoint(playerid, 1319.2881, 1262.9365, 10.8203, 1.0);
    SetPlayerCheckpoint(playerid,2295.2839,2475.7974,3.2734, 1.0);
    return 1;
}
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    GivePlayerWeapon(playerid, 3, 1);
    GivePlayerWeapon(playerid, 22, 1000);
    GivePlayerWeapon(playerid, 31, 2500);
    GivePlayerWeapon(playerid, 29, 1500);
    GivePlayerWeapon(playerid, 34, 100);
    SetPlayerArmour(playerid, 100.0);
    SetPlayerHealth(playerid, 100.0);
    SendClientMessage(playerid, COLOR_RED, "You have received Armour and Weapons");
    return 1;
}
LVPD

Las Venturas Airport (Nothing)

Mini-map (Read dot still appear from LVPD)



Re: Checkpoint problems - zDivine - 12.04.2013

That's because you can only set one checkpoint at a time, and the checkpoint is marked on your mini-map at all times, wherever you are.


Re: Checkpoint problems - NathNathii - 12.04.2013

How can I remove the checkpoint marked on my mini-map everytime and add more checkpoints?


Re: Checkpoint problems - zDivine - 12.04.2013

Quote:
Originally Posted by NathNathii
Посмотреть сообщение
How can I remove the checkpoint marked on my mini-map everytime and add more checkpoints?
pawn Код:
DisablePlayerCheckpoint(playerid);
SetPlayerCheckpoint();



Re: Checkpoint problems - NathNathii - 12.04.2013

Where to put that?


Re: Checkpoint problems - zDivine - 12.04.2013

Quote:
Originally Posted by NathNathii
Посмотреть сообщение
Where to put that?
pawn Код:
new bool: pCP[MAX_PLAYERS] = false;
pawn Код:
SetPlayerCheckpoint(playerid, Float: x, Float: y, Float: z, Float: size);
pCP[playerid] = true;
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(pCP[playerid] == true)
    {
        // Do something here.
        pCP[playerid] = false;
    }
    return 1;
}