Help me with my checkpoints i can't figure out my problem, Please.
#1

Ok, so i have these checkpoints, When i enter the checkpoint after my first load it just disapares and dosen't go to the next one. I can't figure it out can someone help me out?

pawn Код:
if(IsPickingUp[playerid] > 0)//Trucker Job
    {
        if(IsPickingUp[playerid] == 1)
        {
          IsPickingUp[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Now Pickup the trailer and go to the next checkpoint");
        TrailerOne = CreateVehicle(435,-520.6367,-499.6995,25.3137,0.7208,0,0,60000);
        SetPlayerCheckpoint(playerid, 1692.3230,-1921.4425,14.5012,8.0);
        IsHauling[playerid] = 1;
        }
        }
        if(IsHauling[playerid] > 0)
        {
            if(IsHauling[playerid] == 1)
            {
            new tid = GetPlayerVehicleID(playerid);
            if (IsTrailerAttachedToVehicle(tid))
      {
       
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Droped Off your First Load, Go to the Next one");
        IsHauling[playerid] = 2;
        SetPlayerCheckpoint(playerid,2200.4985,-1976.4784,14.5273, 8.0);
            }
            else if(IsHauling[playerid] == 2)
            {
       
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid, 1004.0070, -939.3102, 42.1797, 8.0);
              IsHauling[playerid] = 3;
            }
            else if(IsHauling[playerid] == 3)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,2599.1873,-2228.0984,14.3348, 8.0);
              IsHauling[playerid] = 4;
            }
            else if(IsHauling[playerid] == 4)
            {
             
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1619.1797,1622.4902,11.7940, 8.0);
              IsHauling[playerid] = 5;
            }
            else if(IsHauling[playerid] == 5)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1393.5294,1101.3350,11.7973, 8.0);
              IsHauling[playerid] = 6;
            }
            else if(IsHauling[playerid] == 6)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,980.7269,2131.6655,11.7729, 8.0);
              IsHauling[playerid] = 7;
            }
            else if(IsHauling[playerid] == 7)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1036.7595,2126.9785,11.7899, 8.0);
              IsHauling[playerid] = 8;
            }
            else if(IsHauling[playerid] == 9)
            {
             
                DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1092.1859,1868.2339,11.7945, 8.0);
              IsHauling[playerid] = 10;
            }
            else if(IsHauling[playerid] == 10)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1693.8087,721.8428,10.5231, 8.0);
              IsHauling[playerid] = 11;
            }
            else if(IsHauling[playerid] == 11)
            {
             
              DisablePlayerCheckpoint(playerid);
              SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,2827.2375,915.2798,11.7253, 8.0);
              IsHauling[playerid] = 12;
            }
            else if(IsHauling[playerid] == 12)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,2315.4253,2793.2842,11.7926, 8.0);
              IsHauling[playerid] = 13;
            }
            else if(IsHauling[playerid] == 13)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1711.4408,2335.6279,11.8102, 8.0);
              IsHauling[playerid] = 14;
            }
            else if(IsHauling[playerid] == 14)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,1689.8271,977.4867,10.9666, 8.0);
              IsHauling[playerid] = 15;
            }
            else if(IsHauling[playerid] == 15)
            {
             
              DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
              SetPlayerCheckpoint(playerid,262.6723,1417.0981,10.4712, 8.0);
              IsHauling[playerid] = 16;
            }
            else if(IsHauling[playerid] == 16)
            {
              //TruckTime[playerid] += 1;
              DisablePlayerCheckpoint(playerid);
                SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have Finshed Your Route, You will recive Payment on Payday");
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Go Pickup Another Trailer and start another Route");
        //    SetPlayerCheckpoint(playerid, -219.5716,-1473.8904,8.2506, 8.0);
              DestroyVehicle(TrailerOne);
              IsHauling[playerid] = 0;
              IsPickingUp[playerid] = 1;
            }
            }
            }
On the second checkpoint is where it disapares when i enter it, The first one works fine then it shows the second one and i enter it and nothing esle happens
Reply
#2

nothing?
Reply
#3

Reply
#4

No one sees any problems in this? I'm puzzled.
Reply
#5

No one has any idea how to fixed this?
Reply
#6

I noticed your other checkpoints are all set to about only 10-12 Z, but this one is set to 42, that might be your error...

pawn Код:
else if(IsHauling[playerid] == 2)
{
       
  DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
  SetPlayerCheckpoint(playerid, 1004.0070, -939.3102, 42.1797, 8.0);
  IsHauling[playerid] = 3;
}
Reply
#7

Quote:
Originally Posted by XGh0stz
I noticed your other checkpoints are all set to about only 10-12 Z, but this one is set to 42, that might be your error...

pawn Код:
else if(IsHauling[playerid] == 2)
{
       
 DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "Contiune to the next Checkpoint");
 SetPlayerCheckpoint(playerid, 1004.0070, -939.3102, 42.1797, 8.0);
 IsHauling[playerid] = 3;
}
Well i changed the checkpoint to another one it still disapares and dosen't briing me to the next
Reply
#8

pawn Код:
new tid = GetPlayerVehicleID(playerid);
if (IsTrailerAttachedToVehicle(tid))
      {
       
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Droped Off your First Load, Go to the Next one");
        IsHauling[playerid] = 2;
        SetPlayerCheckpoint(playerid,2200.4985,-1976.4784,14.5273, 8.0);
} // Try moving this bracket to the very end as shown below
pawn Код:
DestroyVehicle(TrailerOne);
  IsHauling[playerid] = 0;
  IsPickingUp[playerid] = 1;
}
}
}
} // The moved bracket is now here for example
Just move the bracket as instructed by the comments shown, try that
Reply
#9

Quote:
Originally Posted by XGh0stz
pawn Код:
new tid = GetPlayerVehicleID(playerid);
if (IsTrailerAttachedToVehicle(tid))
      {
       
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Droped Off your First Load, Go to the Next one");
        IsHauling[playerid] = 2;
        SetPlayerCheckpoint(playerid,2200.4985,-1976.4784,14.5273, 8.0);
} // Try moving this bracket to the very end as shown below
pawn Код:
DestroyVehicle(TrailerOne);
  IsHauling[playerid] = 0;
  IsPickingUp[playerid] = 1;
}
}
}
} // The moved bracket is now here for example
Just move the bracket as instructed by the comments shown, try that
didn't work
Reply
#10

Ah, my apologizies, try reserving that effect...

Take one of those bottom bracket from the bottom to the bracket I said to move before, example:

pawn Код:
new tid = GetPlayerVehicleID(playerid);
if (IsTrailerAttachedToVehicle(tid))
      {
       
        DisablePlayerCheckpoint(playerid);
        SendClientMessage(playerid, COLOR_LIGHTBLUE, "You Have Droped Off your First Load, Go to the Next one");
        IsHauling[playerid] = 2;
        SetPlayerCheckpoint(playerid,2200.4985,-1976.4784,14.5273, 8.0);
}
}
pawn Код:
DestroyVehicle(TrailerOne);
  IsHauling[playerid] = 0;
  IsPickingUp[playerid] = 1;
}
}
That should do it, the number 1 reason scripts refuse to work & are hard to spot problems: Brackets not in the right places :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)