06.01.2016, 15:49
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;
}