addserver function to set inventory show
This commit is contained in:
@@ -477,5 +477,17 @@ namespace ReallifeGamemode.Server.Extensions
|
||||
if (player.GetUser().Wanteds > 0)
|
||||
PositionManager.cuffPoints.Add(player);
|
||||
}
|
||||
|
||||
public static void ToggleInventory(this Player player, InventoryToggleOption option = InventoryToggleOption.TOGGLE)
|
||||
{
|
||||
if(option == InventoryToggleOption.TOGGLE)
|
||||
{
|
||||
player.TriggerEvent("inventoryShow");
|
||||
}
|
||||
else
|
||||
{
|
||||
player.TriggerEvent("inventoryShow", option == InventoryToggleOption.SHOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user