New samp missions
#4

from here: http://forum.sa-mp.com/showpost.php?...34&postcount=7

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.

If you would have read further then post #1 of the thread you would have known this.
Reply


Messages In This Thread
New samp missions - by Private200 - 12.07.2012, 14:53
Re : New samp missions - by 'seraphin - 12.07.2012, 23:40
Re: New samp missions - by Private200 - 13.07.2012, 11:11
Re: New samp missions - by Sinner - 13.07.2012, 11:15
Re: New samp missions - by Private200 - 14.07.2012, 20:00
Re: New samp missions - by Private200 - 15.07.2012, 10:52
Re: New samp missions - by Private200 - 15.07.2012, 11:08
Re: New samp missions - by Private200 - 16.07.2012, 13:33
Re: New samp missions - by Private200 - 21.07.2012, 07:43
Re: New samp missions - by Rudy_ - 21.07.2012, 07:52

Forum Jump:


Users browsing this thread: 2 Guest(s)