CreateDynamicCP not showing
#1

Any reason why this doesn't show the Checkpoint on the Map?
pawn Код:
CMD:loadtruck(playerid, params[]) {
    if(IsPlayerInRangeOfPoint(playerid, 25, 2778.4797,-2457.9482,13.6359)) { // Checks if you are close enough to the loading point.
    if(IsATruck(GetPlayerVehicleID(playerid))){ // Checks if you are inside a truck.
    LoadTruck(playerid); // calls the script to LoadTruck
    } else return SendClientMessage(playerid, GREY, "You are not in an Ocean Dock truck.");
    } else return SendClientMessage(playerid, GREY, "To load the truck, go to the loading garage in Ocean Docks, then /loadtruck.");
    return 1;
    }
    public LoadTruck(playerid) {
        new rand = random(sizeof(Destinations)); // defines the rand variable.
        CreateDynamicCP(Destinations[rand][0], Destinations[rand][1], Destinations[rand][2],150,-1,-1,-1, 3.0); // sets a checkpoint.
        SendClientMessage(playerid, YELLOW, "Truck loaded - Go to the checkpoint to collect your payment.");
        truckloaded = 1;
        return 1;
    }
Reply
#2

streamdistance 3.0 too small
size 150 probably too big

PHP код:
CreateDynamicCP(Float:xFloat:yFloat:zFloat:sizeworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_CP_SD); 
Reply
#3

Quote:
Originally Posted by AbyssMorgan
Посмотреть сообщение
streamdistance 3.0 too small
size 150 probably too big

PHP код:
CreateDynamicCP(Float:xFloat:yFloat:zFloat:sizeworldid = -1interiorid = -1playerid = -1Float:streamdistance STREAMER_CP_SD); 
Changed the float size to 50 and the STREAMER to 50, 100 & 2000 and it still doesn't work.

Thanks for trying
Reply
#4

This will only work with normal checkpoints due to the way the streamer works. It is built to always show the closest checkpoint, which likely isn't the one that was just created. You can use a map icon to make it visible on the map. Use map icon 0 with color red to emulate the checkpoint or choose another color of your liking.
Reply
#5

DynamicCP only displays in minimap when you get close enough.
Reply
#6

So set the Map Icon when getting the job and remove it after?
Thanks for the help guys

EDIT: Also how would that work as I'm randomising the Checkpoint, would I have to check what it's randomised to, to set the map icon?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)