OnRaidableBaseCompleted

Hey,

Trying to integrate the OnRaidableBaseCompleted hook to trigger updates, but I never seem to get it to fire. I'm very much a noob when it comes to plugins so likely there's something I'm missing. For sake of ease, I've trimmed the code to a console message of the players that were raiding, but nothing shows up.

 

    class Test : RustPlugin
    {
        [PluginReference]
        private Plugin RaidableBases


        private void OnRaidableBaseCompleted(List<BasePlayer> raiders)
        {
            foreach (BasePlayer player in raiders)
            {
                Puts(player.displayName);
            }
        }
}
using System.Collections.Generic;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("MyTest", "nivex", "0.1.0")]
    [Description("MyTest")]
    class MyTest : RustPlugin
    {
        // premium version hook:

        private void OnRaidableBaseCompleted(Vector3 raidPos, float despawnTime, int mode, ulong ownerId, List<BasePlayer> raiders, bool allowPVP, string ID, float spawnTime, float loadTime, BasePlayer owner, List<BaseEntity> entities)
        {
            foreach (BasePlayer player in raiders)
            {
                Puts(player.displayName);
            }
        }


        // free version hook:

        private void OnRaidableBaseComplete(Vector3 raidPos, float despawnTime, int mode, ulong ownerId, List<BasePlayer> raiders)
        {
            foreach (BasePlayer player in raiders)
            {
                Puts(player.displayName);
            }
        }
    }
}

hi, this should work for both free and paid versions. looks like I need to update the hooks in the free version still.

save as MyTest.cs

Works a charm on the latest paid version, thanks a lot!

no problem