Checkpoint help
#1

Hey guys,

I'm kinda lost with checkpoints.

When you enter a checkpoint, im trying to make to destroy that checkpoint, and make another checkpoint appear at a different place. But now i dont know how to do that, im using Incognito's streamer. Can anyone give me a hand just how to make this?

Thanks!
~Wesley
Reply
#2

Read: https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint
Reply
#3

That doesnt really help..

When i enter a checkpoint, that checkpoint needs to dissapear, and then a new checkpoint have to appear. Then when you enter that checkpoint, you get cash or something.
Reply
#4

You can't have more than 1 checkpoint, you will have to use a streamer. or if you meant race checkpoints, use them.
Reply
#5

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
But now i dont know how to do that, im using Incognito's streamer.
I know i need a streamer.. I just dont know how to use it; thats why i ask in here
Reply
#6

Quote:
Originally Posted by Kush
Посмотреть сообщение
Not really helping to his question...
Reply
#7

Quote:
Originally Posted by sim_sima
Посмотреть сообщение
Not really helping to his question...
Thats what i said aswell... Anyone could give me a little help with this?
Reply
#8

You will only have 1 checkpoint visible?

ie:
pawn Код:
public OnPlayerSpawn(playerid) //Example
{
     SetPlayerCheckpoint(...); //First checkpoint
}

public OnPlayerEnterCheckpoint(playerid)
{
    DisablePlayerCheckpoint(playerid); //Disable the first checkpoint
    SetPlayerCheckpoint(...); //Second checkpoint
}
Reply
#9

Then if you would go in the first, it destroys that one and let a new one appear; then if you enter the new one, it destroys and create a new checkpoint at the same position?

EDIT:
I've tried this:
pawn Код:
TCP[1] = CreateDynamicCP(1,2,3,5,-1,-1,playerid,1000);
            TogglePlayerDynamicCP(playerid, TCP[1], 1);
But that didnt show a checkpoint at all

EDIT of EDIT:
I've changed the range now, and it does display now.. (dumb me :S)
But now, when i go to the first checkpoint (TCP[1]), and enter it with vehicle, or outside a vehicle; it doesnt show up the next checkpoint

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == TCP[1])
    {
        TCP[2] = CreateDynamicCP(2562.2910,-2412.1013,13.6345,5,-1,-1,playerid,10000);
        TogglePlayerDynamicCP(playerid, TCP[2], 1);
        DestroyDynamicCP(TCP[1]);
        SendClientMessage(playerid, COLOR_GREEN,"You entered the checkpoint!!");
        return 1;
    }
   
    if(checkpointid == TCP[2])
    {
   
        SendClientMessage(playerid, COLOR_GREEN,"You delivered your goods, and got $5000!");
        GivePlayerMoney(playerid, 5000);
        return 1;
    }
    return 1;
}
Another edit... lol

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == TCP[1])
    {
        TCP[2] = CreateDynamicCP(2562.2910,-2412.1013,13.6345,5,-1,-1,playerid,10000);
        TogglePlayerDynamicCP(playerid, TCP[1], 0);
        TogglePlayerDynamicCP(playerid, TCP[2], 1);
        SendClientMessage(playerid, COLOR_GREEN,"You entered the checkpoint!!");
        return 1;
    }
   
    if(checkpointid == TCP[2])
    {
   
        SendClientMessage(playerid, COLOR_GREEN,"You delivered your goods, and got $5000!");
        GivePlayerMoney(playerid, 5000);
        TogglePlayerDynamicCP(playerid, TCP[1], 0);
        TogglePlayerDynamicCP(playerid, TCP[2], 0);
        return 1;
    }
    return 1;
}
I've made it like this now, and when im alone, i can enter the first checkpoint and then the second will appear. But now when im with 2 players, and we both do the same 'mission', then he can enter the checkpoint & let the other one appear, but when i go in it; the other one DOESNT appear..

He enter checkpoint > CP1 dissapears, CP2 appears
Me enter checkpoint > CP1 doesnt dissapear, CP2 doesnt appear

What to do? :$
Reply
#10

Quote:
Originally Posted by Wesley221
Посмотреть сообщение
Then if you would go in the first, it destroys that one and let a new one appear; then if you enter the new one, it destroys and create a new checkpoint at the same position?

EDIT:
I've tried this:
pawn Код:
TCP[1] = CreateDynamicCP(1,2,3,5,-1,-1,playerid,1000);
            TogglePlayerDynamicCP(playerid, TCP[1], 1);
But that didnt show a checkpoint at all

EDIT of EDIT:
I've changed the range now, and it does display now.. (dumb me :S)
But now, when i go to the first checkpoint (TCP[1]), and enter it with vehicle, or outside a vehicle; it doesnt show up the next checkpoint

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == TCP[1])
    {
        TCP[2] = CreateDynamicCP(2562.2910,-2412.1013,13.6345,5,-1,-1,playerid,10000);
        TogglePlayerDynamicCP(playerid, TCP[2], 1);
        DestroyDynamicCP(TCP[1]);
        SendClientMessage(playerid, COLOR_GREEN,"You entered the checkpoint!!");
        return 1;
    }
   
    if(checkpointid == TCP[2])
    {
   
        SendClientMessage(playerid, COLOR_GREEN,"You delivered your goods, and got $5000!");
        GivePlayerMoney(playerid, 5000);
        return 1;
    }
    return 1;
}
Another edit... lol

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(checkpointid == TCP[1])
    {
        TCP[2] = CreateDynamicCP(2562.2910,-2412.1013,13.6345,5,-1,-1,playerid,10000);
        TogglePlayerDynamicCP(playerid, TCP[1], 0);
        TogglePlayerDynamicCP(playerid, TCP[2], 1);
        SendClientMessage(playerid, COLOR_GREEN,"You entered the checkpoint!!");
        return 1;
    }
   
    if(checkpointid == TCP[2])
    {
   
        SendClientMessage(playerid, COLOR_GREEN,"You delivered your goods, and got $5000!");
        GivePlayerMoney(playerid, 5000);
        TogglePlayerDynamicCP(playerid, TCP[1], 0);
        TogglePlayerDynamicCP(playerid, TCP[2], 0);
        return 1;
    }
    return 1;
}
I've made it like this now, and when im alone, i can enter the first checkpoint and then the second will appear. But now when im with 2 players, and we both do the same 'mission', then he can enter the checkpoint & let the other one appear, but when i go in it; the other one DOESNT appear..

He enter checkpoint > CP1 dissapears, CP2 appears
Me enter checkpoint > CP1 doesnt dissapear, CP2 doesnt appear

What to do? :$
Still no-one knows what's wrong here?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)