SA-MP Forums Archive
Checkpoints problem - 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 problem (/showthread.php?tid=338624)



Checkpoints problem - danielhertz - 30.04.2012

Hello i've made some 3 check points and, i see only 1 check point and the other NO.
Well this is the code:

pawn Код:
public OnPlayerSpawn(playerid)
{
    // CreateDynamicCP(506.6999511719,-1152.1999511719,23.10000038147, 3, 1, 1, -1, 100.0);
    //CP to enter the roof:
    Checkpoint[0] = CreateDynamicCP(506.6999511719,-1152.1999511719,27.10000038147, 3, -1, -1, -1, 100.0);
    //CP to exit the roof:
    Checkpoint[1] = CreateDynamicCP(1548.8000488281,-1118,134.80000305176, 3, -1, -1, -1, 100.0);
    ///Checkpoint on the stage to play tracks:
    Checkpoint[2] = CreateDynamicCP(1503.8000488281,-1132.6999511719,138.80000305176, 3, -1, -1, -1, 100.0);
    return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint[0]) //It will check the check point id which means you have currently only 1 CP.
    {
        SetPlayerPos(playerid, 1503.8000488281, -1132.6999511719, 138.80000305176);
    }
    if(checkpointid == Checkpoint[1])
    {
        SetPlayerPos(playerid, 1506.6999511719, -1155.1999511719, 23.700000762939);
    }
    if(checkpointid == Checkpoint[2])
    {
        GameTextForPlayer(playerid,"~r~Type /track to start play your DJ tracks!",3000,3);
    }
    return 1;
}

public OnPlayerLeaveDynamicCP(playerid)
{
    GameTextForPlayer(playerid,"You failed the show!",500,1);
    return 1;
}
Well, what i did wrong?


Re: Checkpoints problem - Kitten - 30.04.2012

Check your checkpoint coordinates.