CreateDynamicCP issue :/
#1

Hello everybody, I've tried to play around with Dynamic Checkpoints but I've got a problem. When I create a new checkpoint it is not called by OnPlayerEnterDynamicCP callback. If I try to create a new checkpoint doesn't show anything but....if I go back to the checkpoint previously created it works. Same thing if I create more checkpoints....In simple words the new checkpoint is not called.

pawn Код:
#define MAX_COUNTER 10

new Iterator: CheckCounter<MAX_COUNTER>, miID, miCheckpoint;

stock CreateMyCheck(Float: X, Float: Y, Float: Z)
{
    MyCheck[miID][mID] = miID;
    MyCheck[miID][mX] = X;
    MyCheck[miID][mY] = Y;
    MyCheck[miID][mZ] = Z;
    Iter_Add(CheckCounter, miID);
    miCheckpoint = CreateDynamicCP(X,Y,Z, 1.5);
    ++ miID;
    miCheckpoint ++;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    foreach(CheckCounter, x)
    {
        if(checkpointid == x)
        {
            SendClientFormatMessage(playerid, -1, "checkpoint %d", x);
            break;
        }
    }
    return 1;
}
Am I doing something wrong?
Reply
#2

Bump?
Reply
#3

Sorry if I reply so fast again but i just want to say that i solved the problem.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)