How do I disable a checkpoint?
#1

How do I remove a checkpoint in Incognito's plugin.
I did it like that:
PHP код:
DestroyDynamicCP(CurrentCP[playerid]); 
But for some reason the red is still there.
Reply
#2

on ur create checkpoint


CurrentCP[playerid] = CreateDynamicCP(...
Reply
#3

Still not working for some reason...
Reply
#4

Would help if we could see the code.
Reply
#5

Top of the script:
PHP код:
#define     CP_LOADB            7 
Inside a callback:
PHP код:
CreateDynamicCP(1608.5857,-1497.2982,13.2395,10.0,-1,-1,playerid,100.0);
CurrentCP[playerid] = CP_LOADB
Inside a timer which starts there ^
PHP код:
DestroyDynamicCP(CP_LOADB); 
Reply
#6

Do it like CrazyBlob said. In your code, you can never be sure that the CP created will be ID 7, as these checkpoints are randomly created amongst all players and so they will all have a different ID.
Reply
#7

^^ that's right Vince.

CurrentCP of playerid will be 7 but DestroyDynamicCP requires checkpointid, which is supposed to be an number of the checkpoint that you've create using CreateDynamicCP.

using
pawn Код:
CurrentCP[playerid] = CreateDynamicCP(1608.5857,-1497.2982,13.2395,10.0,-1,-1,playerid,100.0);
and then
pawn Код:
DestroyDynamicCP(CurrentCP[playerid]);
it may work.
Reply
#8

pawn Код:
new cpoint;
cpoint = CreateDynamic.......

DestroyDynamicCheckpoint(cpoint....);
Reply
#9

I did what Amit_B and Vince told me to, but now:
PHP код:
public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
    if(
CurrentCP[playerid] == CP_LOADB && IsPlayerInAnyVehicle(playerid) && GetVehicleModel(GetPlayerVehicleID(playerid)) == 414)
    { 
How do I check if the person is in this exact checkpoint then?
Reply
#10

Help, anybody?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)