Checkpoint help
#1

When i enter first CP the next cp doesn't appear..
Mind telling me why..maybe i made mistake :/

PHP Code:
public OnPlayerEnterCheckpoint(playerid)
{
    if(
CPP[playerid] == 1// Drivers License Test
    
{
        if(
IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1
        
{
        
              
SetPlayerCheckpoint(playerid,-2498.0962,-45.2208,25.3028,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2498.0962,-45.2208,25.3028)) // Checkpoint 2
        
{
            
SetPlayerCheckpoint(playerid,-2708.8442,-57.1813,3.9125,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2708.8442,-57.1813,3.9125)) // Checkpoint 3
        
{
            
SetPlayerCheckpoint(playerid,-2790.4324,-213.4636,6.7723,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2790.4324,-213.4636,6.7723)) // Checkpoint 4
        
{
            
SetPlayerCheckpoint(playerid,-2263.2546,-90.4397,34.9045,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2263.2546,-90.4397,34.9045)) // Checkpoint 5
        
{
            
SetPlayerCheckpoint(playerid,-2152.2449,-73.2008,34.9064,5);
        }
        else if(
IsPlayerInRangeOfPoint(playerid,5,-2152.2449,-73.2008,34.9064)) // Checkpoint 6
        
{
            
SetPlayerCheckpoint(playerid,-2067.7107,-97.8147,34.9002,5);
        } 
Reply
#2

First, try to increase the range inside IsPlayerInRangeOfPoint (And check for the first coordinate whether it's right or not).
Reply
#3

the first checkpoint arrives..then
Nothing D:
Reply
#4

First off all, Do you make sure you exactly in the position in order to appear the other checkpoints?
Reply
#5

Yes i do..
The first Cp appears..but then no CP..
Reply
#6

Try disabling the CPs you passed

pawn Code:
if(CPP[playerid] == 1) // Drivers License Test
    {
        if(IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1
        {
              DisablePlayerCheckPoint(playerid);
              SetPlayerCheckpoint(playerid,-2498.0962,-45.2208,25.3028,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2498.0962,-45.2208,25.3028)) // Checkpoint 2
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2708.8442,-57.1813,3.9125,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2708.8442,-57.1813,3.9125)) // Checkpoint 3
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2790.4324,-213.4636,6.7723,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2790.4324,-213.4636,6.7723)) // Checkpoint 4
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2263.2546,-90.4397,34.9045,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2263.2546,-90.4397,34.9045)) // Checkpoint 5
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2152.2449,-73.2008,34.9064,5);
        }
        else if(IsPlayerInRangeOfPoint(playerid,5,-2152.2449,-73.2008,34.9064)) // Checkpoint 6
        {
            DisablePlayerCheckPoint(playerid);
            SetPlayerCheckpoint(playerid,-2067.7107,-97.8147,34.9002,5);
        }
Reply
#7

@L.Hudson - I don't see the point there :/
Coz the only point i can see is
PHP Code:
        if(IsPlayerInRangeOfPoint(playerid,5,-2047.0905,-78.3515,34.9040)) // Checkpoint 1 
Reply
#8

I also had this problem in the past... Try disabling the checkpoints... If you have already tried try making a value for each CheckPoints like new cp1[playerid]... etc
Reply
#9

Imma try
CP1 ..CP2 one
Reply
#10

DynamicCheckpoints would be easier because it handles checkpointids...
https://sampforum.blast.hk/showthread.php?tid=102865
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)