Dynamic Checkpoint
#1

Hey guys, I started to create a Dynamic Entrance System, with checkpoints. And this is my code:
pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    Loop(i, MAX_ENTRANCES)
    {
        if(checkpointid == Entrance[i][EnterCP])
        {
            Ent[playerid] = i;
            SetPlayerPosEx(playerid, Entrance[i][Exit][0], Entrance[i][Exit][1], Entrance[i][Exit][2], Entrance[i][Interior], i);
            break;
        }
        else if(checkpointid == Entrance[i][ExitCP])
        {
            Ent[playerid] = 0;
            SetPlayerPosEx(playerid, Entrance[i][Enter][0], Entrance[i][Enter][1], Entrance[i][Enter][2], 0, 0);
            break;
        }
    }
    return 1;
}
The problem is, if I enter an entrance, it will be automatically do enter-exit loop.
Does anyone know whats wrong with my code ?
Reply


Messages In This Thread
Dynamic Checkpoint - by Genmetal - 18.11.2014, 08:36
Re: Dynamic Checkpoint - by OsteeN - 18.11.2014, 10:05
Re: Dynamic Checkpoint - by M4D - 18.11.2014, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)