PDA

View Full Version : OnCheckpointEXIT


Cyboorg
04/07/2017, 09:32 AM
This code is not working anymore,with what can i replace or how to make a choice for this ???


public OnCheckpointEXIT(playerid, checkpointid)
{
switch(checkpointid)
{
case NV_UNI_CP3:
{
if(IsRobbingUNI{playerid} == true)
{
KillTimer(unitimer{playerid});
IsRobbingUNI{playerid} = false;
GameTextForPlayer(playerid,"~r~Robbery Failed", 3000, 5);
SendClientMessage(playerid,RED,"You have left the checkpoint and failed the robbery.");
}
else
{
IsRobbingUNI{playerid} = false;
}
}
case FBI_ROB:
{
if(IsRobbingFBI{playerid} == true)
{
KillTimer(fbitimer{playerid});
IsRobbingFBI{playerid} = false;
GameTextForPlayer(playerid,"~r~Robbery Failed", 3000, 5);
SendClientMessage(playerid,RED,"You have left the checkpoint and failed the robbery.");
}
else
{
IsRobbingFBI{playerid} = false;
}
}

case CIA_CP3:
{
if(IsRobbingCIA{playerid} == true)
{
KillTimer(ciatimer{playerid});
IsRobbingCIA{playerid} = false;
GameTextForPlayer(playerid,"~r~Robbery Failed", 3000, 5);
SendClientMessage(playerid,RED,"You have left the checkpoint and failed the robbery.");
}
else
{
IsRobbingCIA{playerid} = false;
}
}
}
}
return 1;
}

Do i need any include to make this work or what?

Mijata
04/07/2017, 01:30 PM
Try to use:
forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
public OnPlayerLeaveDynamicCP(playerid, checkpointid)

Cyboorg
04/07/2017, 01:37 PM
But it is not created by createdynamiccp ...i'm using checkpointmanager.

CreateCheckpoint(GLOBAL_OWNER_ID, CALG_CP, 2196.9570,1677.1637,12.3672);
SetCheckpointInterior(CALG_CP, 0);