[GameMode] PPC_Trucking V1
#7

This was my first post on this thread (05/12/2010!). I am using this post for this so it is on the first page.

PPC_Questions
Here are some very frequently asked questions with their answers. Some of you may first be asking why I'm posting this rather than PowerPC603 himself. I'm doing this because if I were in his position, I'd be getting very annoyed at many of you right now. He clearly stated that this gamemode was not for new/less experienced scripters, and he has also made editing things very simple, and yet some of you just fail to use your eyes.

Disclaimer: I do not use this gamemode, nor have I been following this thread since page one - however I have skimmed through the script while writing this post, so you will have to excuse me if I make some minor errors.

I will begin.
How do I change the server's name?
PowerPC603 has answered this many times.
Open pawno.exe with administrator privileges (right click "pawno.exe", choose "properties", choose "Compatibility", then check the "run this as administrator").
Then open "gamemodes\PPC_Trucking.pwn".

This is the main gamemode-file.

On line 10, you'll find this:
pawn Code:
#define GameModeName                "PowerPC603's Trucking Server"
Change that into:
pawn Code:
#define GameModeName                "YOUR_NEW_SERVER_NAME"
Then press F5 to compile the gamemode again.
Now you've changed the name of your server.

Upload the new PPC_Trucking.amx file to your host and restart the server for changes to take effect.

How do I change *this* in my gamemode?
Edit the include called PPC_ServerSettings.inc in pawno/includes/*.inc.
Don't rename any variables though, doing so will result in (probably multiple) errors.

How can I disable a certain class?
In the main gamemode file (PPC_Trucking.pwn) you'll find the function
public OnPlayerRequestSpawn(playerid)

This function executes code when you choose to spawn as a member of a specific class.
You'll find this code in there:
pawn Code:
case ClassCourier:
        {
            Index = random(sizeof(ASpawnLocationsCourier));
            x = ASpawnLocationsCourier[Index][SpawnX]; // Get the X-position for the spawnlocation
            y = ASpawnLocationsCourier[Index][SpawnY]; // Get the Y-position for the spawnlocation
            z = ASpawnLocationsCourier[Index][SpawnZ]; // Get the Z-position for the spawnlocation
            Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
            format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Courier class", Name);
        }
You can change it to this:
pawn Code:
case ClassCourier:
        {
            Index = random(sizeof(ASpawnLocationsCourier));
            x = ASpawnLocationsCourier[Index][SpawnX]; // Get the X-position for the spawnlocation
            y = ASpawnLocationsCourier[Index][SpawnY]; // Get the Y-position for the spawnlocation
            z = ASpawnLocationsCourier[Index][SpawnZ]; // Get the Z-position for the spawnlocation
            Angle = ASpawnLocationsCourier[Index][SpawnAngle]; // Get the rotation-angle for the spawnlocation
//          format(Msg, 128, "{00FF00}Player {FFFF00}%s{00FF00} joined {FFFF00}Courier class", Name);

            // Let the player know he cannot choose courier class as the admin disabled this class
            GameTextForPlayer(playerid, "Courier-class has been disabled by the server-admin", 5000, 4);
            SendClientMessage(playerid, 0xFFFFFFFF, "{FF0000}Courier-class has been disabled by the server-admin");
            return 0; // Don't allow the player to spawn as courier player
        }
This will prevent anyone to choose the courier-class as it has been disabled by the "return 0;".
This blocks the function to spawn the player as the chosen class.
Also the player will be informed that this class has been disabled.

You can use the same setup to disable any other class.

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.

I will be adding more to this post as I see them.
Reply


Messages In This Thread
PPC_Trucking V1 - by PowerPC603 - 05.12.2010, 18:17
Re: My own trucking server (still in development) - by universe - 05.12.2010, 18:27
Re: My own trucking server (still in development) - by SamyRomafia - 05.12.2010, 19:02
Re: My own trucking server (still in development) - by Steven82 - 05.12.2010, 19:08
Re: My own trucking server (still in development) - by Ruffles. - 05.12.2010, 19:16
Re: My own trucking server (still in development) - by PowerPC603 - 05.12.2010, 21:23
Re: My own trucking server (still in development) - by Ash. - 05.12.2010, 21:26
Re: My own trucking server (still in development) - by PowerPC603 - 05.12.2010, 21:29
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 10:33
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 06.12.2010, 18:41
Re: My own trucking server (still in development) - by HostiGame - 06.12.2010, 18:54
Re: My own trucking server (still in development) - by Conroy - 06.12.2010, 19:07
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 19:19
Re: My own trucking server (still in development) - by Miralem - 06.12.2010, 20:37
Re: My own trucking server (still in development) - by PowerPC603 - 06.12.2010, 22:33
Re: My own trucking server (still in development) - by <Jones> - 07.12.2010, 00:22
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 07.12.2010, 05:56
Re: My own trucking server (still in development) - by PowerPC603 - 07.12.2010, 12:20
Re: My own trucking server (still in development) - by iRana - 07.12.2010, 16:58
Re: My own trucking server (still in development) - by PowerPC603 - 07.12.2010, 21:22
Re: My own trucking server (still in development) - by Stefan_Toretto - 23.12.2010, 19:07
Re: My own trucking server (still in development) - by PowerPC603 - 23.12.2010, 19:44
Re: My own trucking server (still in development) - by PowerPC603 - 25.12.2010, 13:50
Re: My own trucking server (still in development) - by marmigs - 26.12.2010, 10:46
Re: My own trucking server (still in development) - by PowerPC603 - 26.12.2010, 11:40
Re: My own trucking server (still in development) - by PowerPC603 - 26.12.2010, 15:58
Re: My own trucking server (still in development) - by marmigs - 26.12.2010, 16:31
Re: My own trucking server (still in development) - by Pintinhas - 26.12.2010, 19:21
Re: My own trucking server (still in development) - by Jerret - 27.12.2010, 00:30
Re: My own trucking server (still in development) - by marmigs - 27.12.2010, 08:24
Re: My own trucking server (still in development) - by Pintinhas - 27.12.2010, 10:20
Re: My own trucking server (still in development) - by marmigs - 27.12.2010, 13:52
Re: My own trucking server (still in development) - by PsyShotter - 28.12.2010, 12:44
Re: My own trucking server (still in development) - by speedON - 02.01.2011, 16:49
Re: My own trucking server (still in development) - by PowerPC603 - 02.01.2011, 17:11
Re: My own trucking server (still in development) - by Cristiano[TW[ - 23.01.2011, 15:38
Re: My own trucking server (still in development) - by Lookin - 20.02.2011, 23:50
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 00:58
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 01:02
Re: My own trucking server (still in development) - by Lookin - 21.02.2011, 03:19
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 04:04
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 21.02.2011, 13:59
Re: My own trucking server (still in development) - by PowerPC603 - 21.02.2011, 14:19
Re: My own trucking server (still in development) - by PowerPC603 - 21.02.2011, 14:21
Re: My own trucking server (still in development) - by [HUN]Poldzsiii - 21.02.2011, 16:36
Re: My own trucking server (still in development) - by Maftaca - 21.02.2011, 18:52
Re: My own trucking server (still in development) - by Ligeti Ferenc - 27.02.2011, 10:11
Re: My own trucking server (still in development) - by 12kelvin12 - 09.03.2011, 18:02
Re: My own trucking server (still in development) - by sherlock - 09.03.2011, 19:06
Re: AW: My own trucking server (still in development) - by scuess - 20.05.2011, 14:07
Re: AW: My own trucking server (still in development) - by PowerPC603 - 20.05.2011, 15:30
Re: My own trucking server (still in development) - by [IG] - 20.05.2011, 21:41
Re: My own trucking server (still in development) - by Bring Me The Horizon - 23.05.2011, 21:47
Re: My own trucking server (still in development) - by Bring Me The Horizon - 23.05.2011, 21:52
Re: My own trucking server (still in development) - by Miralem - 02.06.2011, 12:40
Re: My own trucking server (still in development) - by sherlock - 05.06.2011, 15:00
Re: My own trucking server (still in development) - by PowerPC603 - 06.06.2011, 21:47
Re: My own trucking server (still in development) - by chrisB463 - 13.06.2011, 14:34
Re: My own trucking server (still in development) - by PowerPC603 - 15.06.2011, 11:54
Re: My own trucking server (still in development) - by morlox330 - 20.06.2011, 16:30
Re : My own trucking server (still in development) - by Ligeti Ferenc - 20.06.2011, 16:33
Re: Re : My own trucking server (still in development) - by Seba. - 21.06.2011, 11:05
Re : My own trucking server (still in development) - by Ligeti Ferenc - 22.06.2011, 17:33
Re: My own trucking server (still in development) - by Seba. - 22.06.2011, 20:45
Re : My own trucking server (still in development) - by Ligeti Ferenc - 24.06.2011, 07:25
Re: My own trucking server (still in development) - by Rysoku - 24.06.2011, 07:38
Re : My own trucking server (still in development) - by Ligeti Ferenc - 24.06.2011, 08:00
Re: Re : My own trucking server (still in development) - by Seba. - 24.06.2011, 09:57
Re: My own trucking server (still in development) - by [BP]Tony - 24.06.2011, 10:35
Re: My own trucking server (still in development) - by BMB1 - 05.07.2011, 09:42
Re : My own trucking server (still in development) - by Ligeti Ferenc - 05.07.2011, 12:12
Re: My own trucking server (still in development) - by Pintinhas - 06.07.2011, 17:03
Re: My own trucking server (still in development) - by ZachZ - 06.07.2011, 17:38
Re: Re : My own trucking server (still in development) - by PowerPC603 - 06.07.2011, 21:47
Re: My own trucking server (still in development) - by ZachZ - 06.07.2011, 22:06
Re: My own trucking server (still in development) - by PowerPC603 - 07.07.2011, 06:40
Re: My own trucking server (still in development) - by !!--Ryder_RO--!! - 07.07.2011, 06:43
Re : My own trucking server (still in development) - by Ligeti Ferenc - 07.07.2011, 09:28
Re: My own trucking server (still in development) - by Thesmallport - 22.09.2011, 05:23
Re: My own trucking server (still in development) - by ninjahippie - 22.09.2011, 10:23
Re: My own trucking server (still in development) - by Warren - 24.09.2011, 16:29
Re: My own trucking server (still in development) - by Trucker[UK] - 24.09.2011, 16:32
Re: My own trucking server (still in development) - by BlackHaze - 24.09.2011, 16:36
Re: My own trucking server (still in development) - by Brendon_Pawn - 24.09.2011, 17:12
Re: My own trucking server (still in development) - by Warren - 24.09.2011, 19:11
Re: My own trucking server (still in development) - by Richard12254 - 24.09.2011, 19:24
Re: My own trucking server (still in development) - by PowerPC603 - 24.09.2011, 19:41
Re: My own trucking server (still in development) - by cruteX_modshop - 24.09.2011, 20:04
Re: My own trucking server (still in development) - by Trucker[UK] - 30.10.2011, 16:44
Re: My own trucking server (still in development) - by NAPSTER21 - 30.10.2011, 17:09
Re: My own trucking server (still in development) - by PowerPC603 - 30.10.2011, 20:24
Re: My own trucking server (still in development) - by Lookin - 30.10.2011, 22:51
Respuesta: My own trucking server (still in development) - by Nikk123 - 31.10.2011, 16:42
Re: My own trucking server (still in development) - by ZAM - 31.10.2011, 16:49
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 13:00
Re: My own trucking server (still in development) - by NAPSTER21 - 14.11.2011, 17:29
Re: My own trucking server (still in development) - by Michael@Belgium - 14.11.2011, 20:41
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 20:46
Re: My own trucking server (still in development) - by ninjahippie - 14.11.2011, 20:52
Respuesta: My own trucking server (still in development) - by Nikk123 - 14.11.2011, 21:25
Re: My own trucking server (still in development) - by (ETR)Geto244 - 15.11.2011, 16:44
Re: Respuesta: My own trucking server (still in development) - by PowerPC603 - 15.11.2011, 19:41
Re: My own trucking server (still in development) - by warlordkil - 15.11.2011, 19:59
Re: My own trucking server (still in development) - by ninjahippie - 15.11.2011, 21:47
Re: My own trucking server (still in development) - by thimo - 05.03.2012, 19:35
Respuesta: My own trucking server (still in development) - by (F)urbii - 05.03.2012, 21:03
Respuesta: My own trucking server (still in development) - by (F)urbii - 05.03.2012, 22:16
Respuesta: My own trucking server (still in development) - by (F)urbii - 06.03.2012, 05:52
Re: My own trucking server (still in development) - by tyler12 - 06.03.2012, 07:40
Re: My own trucking server (still in development) - by (F)urbii - 07.03.2012, 01:44
Re: My own trucking server (still in development) - by (ETR)Geto244 - 07.03.2012, 08:58
Re: My own trucking server (still in development) - by (ETR)Geto244 - 07.03.2012, 09:01
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 15:48
Re: PPC_Trucking V1 - by BGTrucker - 13.03.2014, 16:45
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 17:08
Respuesta: PPC_Trucking V1 - by Mestre - 13.03.2014, 17:36
Re: PPC_Trucking V1 - by DDR3 - 13.03.2014, 18:22
Re: PPC_Trucking V1 - by Simou - 13.03.2014, 19:00
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 21:31
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 22:11
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2014, 22:33
Re: PPC_Trucking V1 - by d0nTtoucH - 13.03.2014, 22:53
Re: AW: Re: PPC_Trucking V1 - by BGTrucker - 17.05.2014, 19:48
Re: PPC_Trucking V1 - by Naresh - 19.05.2014, 01:38
Re: PPC_Trucking V1 - by d0nTtoucH - 19.05.2014, 06:10
Re: PPC_Trucking V1 - by Naresh - 19.05.2014, 06:45
Re: PPC_Trucking V1 - by Bubulis - 19.05.2014, 12:09
Re: PPC_Trucking V1 - by ReyGutierrez - 19.05.2014, 12:22
AW: Re: PPC_Trucking V1 - by malaka - 19.05.2014, 12:34
Bubulis - by d0nTtoucH - 19.05.2014, 12:58
Re: AW: Re: PPC_Trucking V1 - by Bubulis - 19.05.2014, 14:54
AW: PPC_Trucking V1 - by malaka - 19.05.2014, 15:59
Re: PPC_Trucking V1 - by kokoshkata - 04.07.2014, 15:10
Re: PPC_Trucking V1 - by Darxeve - 04.07.2014, 18:31
AW: PPC_Trucking V1 - by malaka - 04.07.2014, 18:32
Re: PPC_Trucking V1 - by AntonioCroatia - 04.07.2014, 19:54
Re: PPC_Trucking V1 - by BGTrucker - 04.07.2014, 21:31
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 00:05
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 07:02
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 07:35
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 11:30
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 12:05
Re: PPC_Trucking V1 - by d0nTtoucH - 05.07.2014, 12:48
Re: PPC_Trucking V1 - by Naresh - 05.07.2014, 13:29
Re: PPC_Trucking V1 - by iOxide - 08.08.2014, 07:28
Re: PPC_Trucking V1 - by Nasim - 08.08.2014, 07:47
Re: PPC_Trucking V1 - by Nasim - 08.08.2014, 08:41
Re: PPC_Trucking V1 - by Naresh - 08.08.2014, 08:48
Re: PPC_Trucking V1 - by Meow22 - 08.08.2014, 09:10
Re: PPC_Trucking V1 - by TLN - 08.08.2014, 10:03
Re: PPC_Trucking V1 - by Naresh - 08.08.2014, 10:19
Re: PPC_Trucking V1 - by CombatFire - 09.08.2014, 11:46
Re: PPC_Trucking V1 - by Naresh - 09.08.2014, 14:43
Re: PPC_Trucking V1 - by BGTrucker - 09.08.2014, 15:17
Re: PPC_Trucking V1 - by Naresh - 10.08.2014, 01:29
Re: PPC_Trucking V1 - by Tuntun - 10.08.2014, 19:24
Re: PPC_Trucking V1 - by Nasim - 11.08.2014, 06:38
Re: PPC_Trucking V1 - by Naresh - 11.08.2014, 09:54
Re: PPC_Trucking V1 - by 0x123456789 - 11.08.2014, 12:01
Re: PPC_Trucking V1 - by Naresh - 11.08.2014, 13:46
Re: PPC_Trucking V1 - by BGTrucker - 23.08.2014, 14:05
Re: PPC_Trucking V1 - by TLN - 23.08.2014, 21:43
Re: PPC_Trucking V1 - by ArchLord - 24.08.2014, 06:21
Re: PPC_Trucking V1 - by ArchLord - 25.08.2014, 11:15
Re: PPC_Trucking V1 - by VenomMancer - 25.08.2014, 12:54
Re: PPC_Trucking V1 - by BGTrucker - 25.08.2014, 14:59
Re: PPC_Trucking V1 - by StoNe- - 25.08.2014, 21:44
Re: PPC_Trucking V1 - by d0nTtoucH - 27.08.2014, 22:28
Re: PPC_Trucking V1 - by BGTrucker - 28.08.2014, 00:54
Respuesta: Re: PPC_Trucking V1 - by hensr - 28.08.2014, 06:39
AW: Re: PPC_Trucking V1 - by malaka - 02.02.2015, 20:47
Re: PPC_Trucking V1 - by PowerPC603 - 02.02.2015, 21:08
Re: PPC_Trucking V1 - by PowerPC603 - 03.02.2015, 20:02
AW: PPC_Trucking V1 - by malaka - 04.02.2015, 10:58
Re: PPC_Trucking V1 - by [HM]Nicky - 04.02.2015, 15:15
Re: AW: PPC_Trucking V1 - by PowerPC603 - 04.02.2015, 17:44
Re: PPC_Trucking V1 - by GameOver153 - 05.02.2015, 15:00
Re: PPC_Trucking V1 - by Locky_ - 05.02.2015, 15:03
Re: PPC_Trucking V1 - by PowerPC603 - 05.02.2015, 15:24
Re: PPC_Trucking V1 - by wahyumahadir - 05.02.2015, 16:32
Re: PPC_Trucking V1 - by [ND]xXZeusXx. - 19.11.2015, 10:39
Re: PPC_Trucking V1 - by BGTrucker - 19.11.2015, 15:51
Re: PPC_Trucking V1 - by PowerPC603 - 08.03.2016, 21:39
Re: PPC_Trucking V1 - by Ducati - 08.03.2016, 23:00
Re: PPC_Trucking V1 - by Darkwood17 - 12.03.2016, 20:01
Re: PPC_Trucking V1 - by PowerPC603 - 13.03.2016, 00:19
Re: PPC_Trucking V1 - by Delete_ - 15.03.2016, 02:41
Re: PPC_Trucking V1 - by PowerPC603 - 17.03.2016, 20:25
Re: PPC_Trucking V1 - by DemME - 20.03.2016, 11:20
Re: PPC_Trucking V1 - by Saifullah - 20.03.2016, 13:38
Re: PPC_Trucking V1 - by PowerPC603 - 20.03.2016, 17:42
Re: PPC_Trucking V1 - by luancalixto - 22.03.2016, 01:50
Re: PPC_Trucking V1 - by PowerPC603 - 24.03.2016, 11:27
Re: PPC_Trucking V1 - by Honey - 31.03.2016, 13:19
Re: PPC_Trucking V1 - by PowerPC603 - 31.03.2016, 20:31
Re: PPC_Trucking V1 - by feheristi97 - 31.03.2016, 21:53
Re: PPC_Trucking V1 - by PowerPC603 - 01.04.2016, 09:32
Re: PPC_Trucking V1 - by PowerPC603 - 07.04.2016, 12:56
Re: PPC_Trucking V1 - by Darkwood17 - 08.04.2016, 20:27
Re: PPC_Trucking V1 - by PowerPC603 - 08.04.2016, 21:09
Re: PPC_Trucking V1 - by MariusTitulescu - 06.07.2017, 08:42
Re: PPC_Trucking V1 - by Tass007 - 08.07.2017, 07:48
Re: PPC_Trucking V1 - by Barnwell - 14.07.2017, 02:44
Re: PPC_Trucking V1 - by Wazowski - 14.07.2017, 15:43
Re: PPC_Trucking V1 - by feheristi97 - 15.07.2017, 05:22
Re: PPC_Trucking V1 - by DonaldDuck - 15.07.2017, 16:47
Re: PPC_Trucking V1 - by Banditul18 - 06.08.2017, 19:58
Re: PPC_Trucking V1 - by Honey - 01.09.2017, 18:40
Re: PPC_Trucking V1 - by Quantella - 01.09.2017, 20:36
Re: PPC_Trucking V1 - by TheBlackstone - 01.09.2017, 21:02
Re: PPC_Trucking V1 - by Erwin. - 21.05.2020, 08:54

Forum Jump:


Users browsing this thread: 1 Guest(s)