13.07.2012, 11:15
from here: http://forum.sa-mp.com/showpost.php?...34&postcount=7
If you would have read further then post #1 of the thread you would have known this.
Quote:
How can I add more missions to the trucking class? Lets say you want to add a new destination for the product "Wheat" when using an ore-trailer. In the file "PPC_DefLoads.inc", you'll see this line: pawn Code: {"Wheat", false, 1.00, PCV_TruckerOreTrailer, {21, 22}, {18, 23, 24}}, // LoadID 10 This means: - productname = Wheat - this is a load that's not wanted by the mafia, as it says "false" - productprice per meter: $1.00 (used to calculate your payment by calculating the distance between loading and unloading point, multiplied by this value) - type of class and vehicle: Trucker class with ore trailer - pickup-locations: 21 and 22 (resp: "EasterBoard Farm" and "SF Hill Farm"), these are the location-id's where you load the product - destination locations: 18, 23, 24 (resp: "LV Freight Depot", "Pecker's Feed & Seed", "San Fierro Port"), these are the location-id's where you must unload the product To add a new destination, we check which location where we wanna bring the wheat. Let's say you want to deliver it to "LS Ocean Docks" too (we check the file PPC_DefLocations.inc and we find location-ID 38 for "LS Ocean Docks"). So you add it like this: pawn Code: {"Wheat", false, 1.00, PCV_TruckerOreTrailer, {21, 22}, {18, 23, 24, 38}}, // LoadID 10 That's it. After saving the file, you only need to recompile and restart the server. You can add up to 30 pickup-locations and 30 delivery locations per product, that's 900 routes for each product, because you can pickup the load at any defined pickup-location and deliver it to any of the delivery-locations. |