Checkpoint not disabling?
#1

For some reason, the checkpoints in my mission system are not disabling. The one under the mInfo[playerid][CID] == 1 disables and reassigns fine, but under the mInfo[playerid][CID] == 2 it calls everything there but doesnt disable the checkpoint.

pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
    if(mInfo[playerid][CID] == 1)
    {
        if(!CheckOriginalVehicles(playerid)) return 0;
        DisablePlayerCheckpoint(mInfo[playerid][Checkpoint]);
        new String[200];
        format(String,sizeof(String),"Deliver the %s to %s",mInfo[playerid][Load],mInfo[playerid][LName]);
        SendClientMessage(playerid,COLOR_YELLOW,String);
        mInfo[playerid][Checkpoint] = SetPlayerCheckpoint(playerid,mInfo[playerid][Lx],mInfo[playerid][Ly],mInfo[playerid][Lz], 7.0); mInfo[playerid][CID] = 2;
    }
    else if(mInfo[playerid][CID] == 2)
    {
        if(!CheckOriginalVehicles(playerid)) return 0;
        DisablePlayerCheckpoint(mInfo[playerid][Checkpoint]);
        new String[200];
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(String,sizeof(String),"%s delivered %s From %s To %s",name,mInfo[playerid][Load],mInfo[playerid][FName],mInfo[playerid][LName]);
        SendClientMessageToAll(COLOR_GREEN,String);
        format(String,sizeof(String),"You have earned %d for working!",mInfo[playerid][Pay]);
        SendClientMessage(playerid,COLOR_GREEN,String);
        AddPlayerMoney(playerid,mInfo[playerid][Pay]);
        AddPlayerScore(playerid,1);
        mInfo[playerid][CID] = 0;
    }
    return 1;
}
Reply
#2

Try deleting DisableCheckpoints, because I belive that checkpoint gets removed when you enter it.
I mean it worked for me
Reply
#3

Try changin this
pawn Код:
DisablePlayerCheckpoint(mInfo[playerid][Checkpoint]);
To
pawn Код:
DisablePlayerCheckpoint(playerid);
On both those disables
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)