Jump to content

Im use Vanilla position and have problem

Pending 1.1.3

Shadow_
Shadow_

Posted

Im use vanilla position and when pickup collectable item or gathering this actions status me show in me this plugin custom status,

Here code of this plugin:
private int GetStatusCount(BasePlayer basePlayer)
        {
            if (!IsUsingVanillaPosition) { return 0; }
            try
            {
                var count = 0;
                if (basePlayer.metabolism.bleeding.value >= 1)
                {
                    count++; // bleeding
                }
                if (basePlayer.metabolism.temperature.value < 5)
                {
                    count++; // toocold
                }
                if (basePlayer.metabolism.temperature.value > 40)
                {
                    count++; // toohot
                }
                if (basePlayer.currentComfort > 0)
                {
                    count++; // comfort
                }
                if (basePlayer.metabolism.calories.value < 40)
                {
                    count++; // starving
                }
                if (basePlayer.metabolism.hydration.value < 35)
                {
                    count++; // dehydrated
                }
                if (basePlayer.metabolism.radiation_poison.value > 0)
                {
                    count++; // radiation
                }
                if (basePlayer.metabolism.wetness.value >= 0.02)
                {
                    count++; // wet
                }
                if (basePlayer.metabolism.oxygen.value < 1f)
                {
                    count++; // drowning
                }
                if (basePlayer.currentCraftLevel > 0)
                {
                    count++; // workbench
                }
                if (basePlayer.inventory.crafting.queue.Count > 0)
                {
                    count++; // crafting
                }
                if (basePlayer.modifiers.ActiveModifierCoount > 0)
                {
                    count++; // modifiers
                }
                var priv = basePlayer.GetBuildingPrivilege();
                if (priv != null && priv.IsAuthed(basePlayer))
                {
                    count++; // buildpriv
                    count++; // upkeep
                }
                else if (priv != null && !priv.IsAuthed(basePlayer) && basePlayer.GetActiveItem()?.info.shortname == "hammer")
                {
                    count++; // buildpriv
                }
                for (int i = 0; i < PlayerItemChangeNotificationCount(basePlayer); i++)
                {
                    count++; // itemchange
                }
                if (basePlayer.HasPlayerFlag(BasePlayer.PlayerFlags.SafeZone))
                {
                    count++; // safezone
                }
                if (basePlayer.isMounted && (basePlayer.GetMountedVehicle() != null || basePlayer.GetMounted() is RidableHorse))
                {
                    count++; // mounted
                }
                return count;
            }
            catch (NullReferenceException) { }
            return 0;

Maybe creator have solution to fix this problem?

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
3.1m
Total downloads
Customers
12.1k
Customers served
Files Sold
171.4k
Total sales
Payments
3.7m
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.