SA-MP Forums Archive
Dynamic Checkpoint not destroying. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dynamic Checkpoint not destroying. (/showthread.php?tid=509251)



Dynamic Checkpoint not destroying. - rangerxxll - 26.04.2014

Would anyone know why this Dynamic Checkpoint wont destroy? It's on a timer that repeats every 2 seconds to update its location.



pawn Код:
CMD:spawnwantedcar(playerid, params[])
{
    if(pInfo[playerid][pAdmin] >=3)
    {
        if(RandomVehicleIsSpawned == false)
        {
            new string[128];
            format(string,sizeof(string), "%s %s has spawned the Most Wanted Vehicle.", GetAdminLevelName(playerid), GetName(playerid));
            SCMA(COLOR_GREEN, string);
            RandomVehicleIsSpawned = true;
            SpawnWantedVehicle();
        }
        else if(RandomVehicleIsSpawned == true)
        {
            new string[128];
            format(string,sizeof(string), "%s %s has de-spawned the Most Wanted Vehicle.", GetAdminLevelName(playerid), GetName(playerid));
            SCMA(COLOR_GREEN, string);
            RandomVehicleIsSpawned = false;
            DestroyDynamicCP(cp_wantedvehicle); //Right here.
            KillTimer(TIMER_MWVEHICLE);
            DestroyVehicle(RandomVehicle);
        }

    }
    else SCM(playerid, COLOR_GREY, ERROR);
    return 1;
}


//This is the timer.
public MWCheckpoint(playerid)
{
    new Float:x, Float:y, Float:z;
    GetVehiclePos(RandomVehicle, x, y, z);
    //SetPlayerCheckpoint(playerid, x, y, z, 5.0);
    cp_wantedvehicle = CreateDynamicCP(x, y, z, 3.0 ,-1,  -1,  -1,  20000); //brb.
}



Re: Dynamic Checkpoint not destroying. - rangerxxll - 26.04.2014

Bump. The issue still persists and I'm clueless as to what's causing the checkpoint to not destroy.