C#:
using System;
using System.Collections.Generic;
using Oxide.Core;
using Oxide.Core.Plugins;
using UnityEngine;
using Rust;
namespace Oxide.Plugins
{
[Info("HC", "Sergioklv", "1.0.0")]
[Description("Clear your inventory with command and heal with /heal.")]
public class HC : RustPlugin
{
[ChatCommand("clear")]
private void ClearInventoryCommand(BasePlayer player, string command, string[] args)
{
if (player == null) return;
if (player.IsAdmin)
{
player.inventory.Strip();
}
}
[ChatCommand("heal")]
private void HealCommand(BasePlayer player, string command, string[] args)
{
if (player.IsAdmin)
{
if (player == null)
return;
if (player.IsWounded())
{
player.health = 120;
player.StopWounded();
player.metabolism.hydration.SetValue(9999);
player.metabolism.calories.SetValue(9999);
player.metabolism.bleeding.SetValue(0);
}
player.health = 120;
player.metabolism.hydration.SetValue(9999);
player.metabolism.calories.SetValue(9999);
player.metabolism.bleeding.SetValue(0);
}
}
}
}