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?