Jump to content

How to call IsPlayerVanished of Vanish Module

Pending 2.0.223

ToliburtiX
ToliburtiX

Posted

Hello Folks,

what would be the best/efficient way to call IsPlayerVanished of the vanish module from an other plugin? I tried it this way, but get always false.

Thanks for your time.

using System;
using System.Collections.Generic;
using Oxide.Core.Plugins;

#if CARBON
using Carbon.Modules;
using Carbon.Base;
#endif


namespace Oxide.Plugins
{
...
#if CARBON
        private bool canBypass(BasePlayer looter)
        {
            var vanishMod = Carbon.Base.BaseModule.GetModule<VanishModule>();
            return null != vanishMod ? vanishMod.IsPlayerVanished(looter.userID) : looter.isInvisible || looter.limitNetworking;
        }
#else
        private bool canBypass(BasePlayer looter) => looter.isInvisible || looter.limitNetworking;
#endif
...
}

 

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.5m
Total downloads
Customers
11k
Customers served
Files Sold
157.9k
Marketplace sales
Payments
3.4m
Processed total
×
×
  • 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.