SA-MP Forums Archive
OnCheckpointEXIT - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnCheckpointEXIT (/showthread.php?tid=636806)



OnCheckpointEXIT - Cyboorg - 04.07.2017

This code is not working anymore,with what can i replace or how to make a choice for this


PHP код:
public OnCheckpointEXIT(playeridcheckpointid)
{
    switch(
checkpointid)
    {
        case 
NV_UNI_CP3:
        {
            if(
IsRobbingUNI{playerid} == true)
            {
                
KillTimer(unitimer{playerid});
                
IsRobbingUNI{playerid} = false;
                
GameTextForPlayer(playerid,"~r~Robbery Failed"30005);
                
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"30005);
                
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"30005);
                
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?


Re: OnCheckpointEXIT - Mijata - 04.07.2017

Try to use:
Код:
forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
public OnPlayerLeaveDynamicCP(playerid, checkpointid)



Re: OnCheckpointEXIT - Cyboorg - 04.07.2017

But it is not created by createdynamiccp ...i'm using checkpointmanager.

Quote:

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