small checkpoint glitch help
#1

good mornings all and nights. i need some help with this checkpoints it is fucked up i think is something about ranges, i have a house system with checkpoints always active but only shows when on range of 5.0 and a vehicle checkpoint with a range of 10.0 when the two are too close they switch each one sizes .

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    if(playerCKID[playerid] == checkpointid)
    {
        if(playerCK[playerid] == 1)
        {
            GameTextForPlayer(playerid, "You have found it!", 1000, 1);
            DestroyDynamicCP(playerCKID[playerid]);
            playerCK[playerid] = 0;
        }
    }
    else if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        for(new e; e < MAX_HOUSES; e++)
        {
            if(checkpointid == housecp[e])
            {
                if(housedb[e][Owned] == 0)
                {
                    SendClientMessage(playerid, COLOR_YELLOW2,"This house is for sale!");
                }
                else
                {
                    new str[150];
                    format(str, sizeof(str),"You are standing on %s house.",housedb[e][Owner]);
                    SendClientMessage(playerid, COLOR_YELLOW2, str);
                }
            }
        }
    }
}
Who can help me solve this will get a rep point and thank you
Reply
#2

You will have to destroy the current checkpoint before creating a new one. This has been a scripting bug for a while, you can see it https://sampforum.blast.hk/showthread.php?tid=59486 in that topic.

Quote:

- If a checkpoint is already set it will use the size of that checkpoint instead of the new one.

Reply
#3

oh i see i will just create a script solution to avoid the bug . thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)