`Checkpoints have no effect
#1

EDIT: NEW PROBLEM.

When I drive through checkpoint[0] it's not going away. It's only going away when I drive trough the 3rd checkpoint. How can that be fixed?

pawn Код:
COMMAND:takejob(playerid,params[])
{
    Checkpoint[0] = CreateDynamicCP(1208.5221,-2052.6050,69.0006, 4, -1, -1, -1, 100);

    return 1;
}
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == Checkpoint[0])
        {
            Checkpoint[1] = CreateDynamicCP(1155.5801,-2019.4644,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[1])
        {
            Checkpoint[2] = CreateDynamicCP(1142.6647,-2043.7427,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[2])
        {
            Checkpoint[3] = CreateDynamicCP(1159.4103,-2051.8723,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[3])
        {
            Checkpoint[4] = CreateDynamicCP(1165.7371,-2074.7285,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[4])
        {
            Checkpoint[5] = CreateDynamicCP(1195.9248,-2023.1500,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[5])
        {
            Checkpoint[6] = CreateDynamicCP(1195.9453,-2050.0513,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[6])
        {
            Checkpoint[7] = CreateDynamicCP(1178.0551,-1997.4802,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[7])
        {
            Checkpoint[8] = CreateDynamicCP(1153.1676,-2018.5255,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[8])
        {
            Checkpoint[9] = CreateDynamicCP(1152.2745,-2054.3188,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[9])
        {
            Checkpoint[10] = CreateDynamicCP(1208.5221,-2052.6050,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[10])
        {
            Checkpoint[11] = CreateDynamicCP(1155.5801,-2019.4644,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[11])
        {
            Checkpoint[12] = CreateDynamicCP(1142.6647,-2043.7427,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[12])
        {
            Checkpoint[13] = CreateDynamicCP(1159.4103,-2051.8723,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[13])
        {
            Checkpoint[14] = CreateDynamicCP(1165.7371,-2074.7285,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[14])
        {
            Checkpoint[15] = CreateDynamicCP(1195.9248,-2023.1500,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[15])
        {
            Checkpoint[16] = CreateDynamicCP(1195.9453,-2050.0513,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[16])
        {
            Checkpoint[17] = CreateDynamicCP(1178.0551,-1997.4802,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[17])
        {
            Checkpoint[18] = CreateDynamicCP(1153.1676,-2018.5255,69.0078, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[18])
        {
            Checkpoint[19] = CreateDynamicCP(1152.2745,-2054.3188,69.0006, 4, -1, -1, -1, 100);
        }
    if(checkpointid == Checkpoint[19])
        {

        }

    return 1;
}
Reply
#2

EDIT: Not fixed yet .
Reply
#3

Can somebody please help me with the problem? I have to go to bed within have an hour and I always feel like I've failed badly if I don't have something working before I'm sleeping.
Reply
#4

You put 100 of distance, that's because you can't.
Reply
#5

Quote:
Originally Posted by GantaIgarashi
Посмотреть сообщение
You put 100 of distance, that's because you can't.
What should it be?
Reply
#6

maybe try this
PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
checkpointid == Checkpoint[0])
        {
            
Checkpoint[1] = CreateDynamicCP(1155.5801,-2019.4644,69.00064, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[1])
        {
            
Checkpoint[2] = CreateDynamicCP(1142.6647,-2043.7427,69.00064, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[2])
        {
            
Checkpoint[3] = CreateDynamicCP(1159.4103,-2051.8723,69.00064, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[3])
        {
            
Checkpoint[4] = CreateDynamicCP(1165.7371,-2074.7285,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[4])
        {
            
Checkpoint[5] = CreateDynamicCP(1195.9248,-2023.1500,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[5])
        {
            
Checkpoint[6] = CreateDynamicCP(1195.9453,-2050.0513,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[6])
        {
            
Checkpoint[7] = CreateDynamicCP(1178.0551,-1997.4802,69.00784, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[7])
        {
            
Checkpoint[8] = CreateDynamicCP(1153.1676,-2018.5255,69.00784, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[8])
        {
            
Checkpoint[9] = CreateDynamicCP(1152.2745,-2054.3188,69.00064, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[9])
        {
            
Checkpoint[10] = CreateDynamicCP(1208.5221,-2052.6050,69.00064, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[10])
        {
            
Checkpoint[11] = CreateDynamicCP(1155.5801,-2019.4644,69.00064, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[11])
        {
            
Checkpoint[12] = CreateDynamicCP(1142.6647,-2043.7427,69.00064, -1, -1, -1100);
        }
    else if(
checkpointid == Checkpoint[12])
        {
            
Checkpoint[13] = CreateDynamicCP(1159.4103,-2051.8723,69.00064, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[13])
        {
            
Checkpoint[14] = CreateDynamicCP(1165.7371,-2074.7285,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[14])
        {
            
Checkpoint[15] = CreateDynamicCP(1195.9248,-2023.1500,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[15])
        {
            
Checkpoint[16] = CreateDynamicCP(1195.9453,-2050.0513,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[16])
        {
            
Checkpoint[17] = CreateDynamicCP(1178.0551,-1997.4802,69.00784, -1, -1, -1100);
        }
   else  if(
checkpointid == Checkpoint[17])
        {
            
Checkpoint[18] = CreateDynamicCP(1153.1676,-2018.5255,69.00784, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[18])
        {
            
Checkpoint[19] = CreateDynamicCP(1152.2745,-2054.3188,69.00064, -1, -1, -1100);
        }
   else if(
checkpointid == Checkpoint[19])
        {
        }
    return 
1;

Reply
#7

Always use else_if or case for checkpts btw dont feel like u have failed... Its just a game
Also I not prefer using icognitos streamer for cps... Use setplayercheckpoin in combination wih variables
Reply
#8

Quote:
Originally Posted by knackworst
Посмотреть сообщение
Always use else_if or case for checkpts btw dont feel like u have failed... Its just a game
Also I not prefer using icognitos streamer for cps... Use setplayercheckpoin in combination wih variables
Still doesn't work. How would you do it with variables? Can you try that for me please?
Reply
#9

May be try this tutorial by Wesley221?
Reply
#10

Quote:
Originally Posted by [RaZ]Hal_Moore
Посмотреть сообщение
May be try this tutorial by Wesley221?
I've followed it :P He doesn't seem to know the problem either.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)