CreateDynamicCP not showing - 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: CreateDynamicCP not showing (
/showthread.php?tid=597918)
CreateDynamicCP not showing -
dillo1000 - 06.01.2016
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;
}
Re: CreateDynamicCP not showing -
AbyssMorgan - 06.01.2016
streamdistance 3.0 too small
size 150 probably too big
PHP код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_CP_SD);
Re: CreateDynamicCP not showing -
dillo1000 - 06.01.2016
Quote:
Originally Posted by AbyssMorgan
streamdistance 3.0 too small
size 150 probably too big
PHP код:
CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float: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
Re: CreateDynamicCP not showing -
Vince - 06.01.2016
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.
Re: CreateDynamicCP not showing -
saffierr - 06.01.2016
DynamicCP only displays in minimap when you get close enough.
Re: CreateDynamicCP not showing -
dillo1000 - 06.01.2016
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?