Second Checkpoint does not remove itself and does not call the third one
#8

Quote:
Originally Posted by Matess
Посмотреть сообщение
Try:

pawn Код:
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
    new Float: sX, Float: sY, Float: sZ;
    if(checkpointid == dmvcp1)
    {
        DestroyDynamicCP(dmvcp1);
        dmvcp2 = CreateDynamicCP(1606.9996, -2319.3191, -2.8516, 5, 0, 0, playerid, 2000);
    }
    else if(checkpointid == dmvcp2)
    {
        DestroyDynamicCP(dmvcp2);
        dmvcp3 = CreateDynamicCP(1575.9720, -2296.1660, -2.9355, 5, 0, 0, playerid, 2000);
    }
    else if(checkpointid == dmvcp3)
    {
        DestroyDynamicCP(dmvcp3);
        GivePlayerCash(playerid, -2500);
        GameTextForPlayer(playerid, "~g~ Passed!", 1500, 0);
        GetPlayerPos(playerid, sX, sY, sZ);
        SetPlayerPos(playerid, sX, sY, sZ+2);
        DestroyVehicle(dmvcar[0]);
    }
    return 0;
}
Same issue.
The first checkpoint gets destroys and it calls the second checkpoint but the second checkpoint refreshes itself and does not get destroyed.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)