Dynamic Checkpoint not destroying.
#1

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.
}
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)