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
...
}

 

2.2m

Downloads

Total number of downloads.

10.2k

Customers

Total customers served.

147.8k

Files Sold

Total number of files sold.

3.1m

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.