Jump to content

Not working

Pending 1.0.0

jayinwww
jayinwww

Posted

Not sure why but this plugin stopped working. I do have another plugin that disables the chinook locked crate at Train Yard and Power Plant shown below: Not sure if that is causing the issue or not. If I reload the plugin one monument starts but another one doesn't.

using System;
using System.Collections.Generic;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("ChinookCrate", "Ryuk", "1.0.0")]
    [Description("Remove hackable crate when the chinook drops it.")]
    public class ChinookCrate : RustPlugin
    {
        void OnCrateDropped(HackableLockedCrate crate)
        {
            NextTick(() =>
            {
                if (crate != null && !crate.IsDestroyed)
                {
                    if (IsChinookNearby(crate.transform.position, 20f))
                    {
                        crate.Kill();
                    }
                }
            });
        }

        private bool IsChinookNearby(Vector3 position, float radius)
        {
            var entities = new List<BaseEntity>();
            Vis.Entities(position, radius, entities, Rust.Layers.Mask.Vehicle_World);

            foreach (var entity in entities)
            {
                if (entity is CH47Helicopter)
                {
                    return true;
                }
            }
            return false;
        }
    }
}

Iftebinjan

Posted

On 7/22/2024 at 4:37 PM, jayinwww said:

Not sure why but this plugin stopped working. I do have another plugin that disables the chinook locked crate at Train Yard and Power Plant shown below: Not sure if that is causing the issue or not. If I reload the plugin one monument starts but another one doesn't.

using System;
using System.Collections.Generic;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("ChinookCrate", "Ryuk", "1.0.0")]
    [Description("Remove hackable crate when the chinook drops it.")]
    public class ChinookCrate : RustPlugin
    {
        void OnCrateDropped(HackableLockedCrate crate)
        {
            NextTick(() =>
            {
                if (crate != null && !crate.IsDestroyed)
                {
                    if (IsChinookNearby(crate.transform.position, 20f))
                    {
                        crate.Kill();
                    }
                }
            });
        }

        private bool IsChinookNearby(Vector3 position, float radius)
        {
            var entities = new List<BaseEntity>();
            Vis.Entities(position, radius, entities, Rust.Layers.Mask.Vehicle_World);

            foreach (var entity in entities)
            {
                if (entity is CH47Helicopter)
                {
                    return true;
                }
            }
            return false;
        }
    }
}

This plugin removeing thr chinkook thats why its not ending the event or stuck

jayinwww

Posted

8 hours ago, Iftebinjan said:

This plugin removeing thr chinkook thats why its not ending the event or stuck

I removed that plugin, I figured that might be what it was. Is there a way this plugin can add a few NPCs to protect the chinook dropped crates that the game regularly drops or somehow to disable it? I like the way your plugin adds some PVE to getting a crate and not just getting a free crate for nothing. People were doing your even plugin but when the free crate drops, then people don't bother with your monument plugin they just go for the free crate then complain they are bored hehe

Iftebinjan

Posted

I can disable this free crated from my plugin. Soon there will be a update

  • Like 1
jayinwww

Posted

33 minutes ago, Iftebinjan said:

I can disable this free crated from my plugin. Soon there will be a update

Thank you so much, do you have a discord or something? I'd love to discuss your Raid Sim plugin with you on some ideas I have.

1.4m

Downloads

Total number of downloads.

6.9k

Customers

Total customers served.

102.2k

Files Sold

Total number of files sold.

2m

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.