Jump to content

I know I came to you with this before, I think I forgot...

Pending 2.7.4

JustANoob
JustANoob

Posted

I think I forgot to remove the cars, again... Silly me!

I'll remove them and I will remember that cars will never work on my server.  😢 😢 😢 😢 😢 😢 😢 😢 sad!

I will remove them now and not use the cars.

Everything else is great, Yay!

Keep up the great work!

image.png

image.png

Adem

Posted

I don't know what you're talking about.

JustANoob

Posted

"Order of vehicles": [
        "sedan_hard",
        "modular_npc_long_hard",
        "modular_sniper_hard",
        "bradley_hard",
        "vendor_loot_hard",
        "vendor_samsite_hard",
        "bradley_hard",
        "modular_sniper_hard",
        "modular_npc_long_hard",
        "sedan_hard"
      ],
"Order of vehicles": [
        "sedan_hard",
        "bradley_hard",
        "vendor_loot_hard",
        "vendor_samsite_hard",
        "bradley_hard",
        "sedan_hard"
      ],

 

JustANoob

Posted

Remember your Convoy used to be pushed and not drove by your NPC's.

Now that they drive, the modular cars don't go sometimes or get stuck.

To get them to move again I either have to ENT KILL them or remove from the config file and then everything is o.k..

JustANoob

Posted (edited)

I think you gave me a modified version that fixed it, but when you published the new version, it didn't have the fix in the new CS.

I installed the new version and it broke the modular cars again.

Edited by JustANoob
JustANoob

Posted

"Order of vehicles": [
        "bradley_samsite_nightmare",
        "modular_npc_long_nightmare",
        "vendor_turret_nightmare",
        "vendor_samsite_nightmare",
        "bradley_samsite_nightmare",
        "sedan_nightmare",
        "sedan_nightmare",
        "bradley_samsite_nightmare",
        "vendor_samsite_nightmare",
        "vendor_turret_nightmare",
        "modular_npc_long_nightmare",
        "bradley_samsite_nightmare"
      ],
"Order of vehicles": [
        "bradley_samsite_nightmare",
        "vendor_turret_nightmare",
        "vendor_samsite_nightmare",
        "bradley_samsite_nightmare",
        "sedan_nightmare",
        "sedan_nightmare",
        "bradley_samsite_nightmare",
        "vendor_samsite_nightmare",
        "vendor_turret_nightmare",
        "bradley_samsite_nightmare"
      ],

 

JustANoob

Posted (edited)

It was either NoEngineParts.cs or SimpleNoVehicleFuel.cs that was doing it, but it is weird, sometimes they get stuck and sometimes they run just fine around the map.

It could be that NoEngineParts.cs was the one that was modified and when the new version came out it broke the Convoy.

Edited by JustANoob
JustANoob

Posted

        private void OnEntityMounted(ModularCarSeat seat)
        {
            bool isConvoyVehicle = Convoy != null && (bool)Convoy?.Call("IsConvoyVehicle", seat);

            var car = seat.associatedSeatingModule?.Vehicle as ModularCar;
            if (car == null)
                return;

            // Only refresh engine loadout if engine cannot be started, else handle in OnEngineStarted
            if (car.HasDriver() && !car.HasAnyWorkingEngines() && !isConvoyVehicle)
                RefreshCarEngineLoadouts(car);
        }

        private void OnEngineStarted(ModularCar car)
        {
            bool isConvoyVehicle = Convoy != null && (bool)Convoy?.Call("IsConvoyVehicle", car);

            if (!isConvoyVehicle)
            {
                RefreshCarEngineLoadouts(car);
            }
        }

 

Adem

Posted

2 minutes ago, JustANoob said:

It was either NoEngineParts.cs or SimpleNoVehicleFuel.cs that was doing it, but it is weird, sometimes they get stuck and sometimes they run just fine around the map.

Send your configs of these two plugins too

JustANoob

Posted

        private void OnServerInitialized()
        {
            Subscribe(nameof(OnEntitySpawned));

            foreach (var entity in BaseNetworkable.serverEntities)
            {
                if (entity is Catapult) return;

                if (entity is BaseVehicle vehicle)
                {
                    bool isConvoyVehicle = Convoy != null && (bool)Convoy?.Call("IsConvoyVehicle", vehicle);
                  
                    if (!isConvoyVehicle)
                    {
                        ModifyVehicle(vehicle);
                    }
                }
                else if (entity is HotAirBalloon balloon)
                {
                    ModifyBalloon(balloon);
                }
            }
        }

        private void Unload()
        {
            foreach (var entity in BaseNetworkable.serverEntities)
            {
                if (entity is BaseVehicle vehicle)
                {
                    bool isConvoyVehicle = Convoy != null && (bool?)Convoy.Call("IsConvoyVehicle", vehicle) == true;

                    if (!isConvoyVehicle)
                    {
                        ResetVehicle(vehicle);
                    }
                }
                else if (entity is HotAirBalloon balloon)
                {
                    ResetBalloon(balloon);
                }
            }
        }

        private void OnEntitySpawned(BaseVehicle vehicle)
        {
            if (vehicle is Catapult) return;

            NextTick(() =>
            {
                if (vehicle == null || !vehicle.IsValid())
                    return;

                bool isConvoyVehicle = Convoy != null && (bool?)Convoy.Call("IsConvoyVehicle", vehicle) == true;

                if (!isConvoyVehicle)
                {
                    ModifyVehicle(vehicle);
                }
            });
        }

 

JustANoob

Posted

I added two more plugins, maybe they are the problem?

Adem

Posted (edited)

.

Edited by Adem
Adem

Posted

I've installed all this for myself, but my convoy is moving without any problems. This is strange.

Adem

Posted

Text to me in the discord, we will try to solve this problem together on your server.

1.7m

Downloads

Total number of downloads.

8k

Customers

Total customers served.

121.1k

Files Sold

Total number of files sold.

2.5m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.