Иконка ресурса

FREE HealthReward : 1.0.0 1.0.0

Нет прав для скачивания
C#:
using Oxide.Core;
using UnityEngine;

namespace Oxide.Plugins
{
    [Info("HealthReward", "YourName", "1.0.0")]
    [Description("Gives players health points upon killing other players")]

    public class HealthReward : RustPlugin
    {
        private const int HealthRewardAmount = 25;

        private void OnEntityDeath(BaseCombatEntity entity, HitInfo info)
        {
            if (info == null || info.InitiatorPlayer == null || info.damageTypes == null)
                return;

            var attacker = info.InitiatorPlayer;

            var victim = entity as BasePlayer;
            if (victim != null && attacker != victim)
            {
                attacker.health += HealthRewardAmount;
                attacker.SendConsoleCommand("chat.add", 0, "<color=#ffa500>You have gained 25 health points for killing " + victim.displayName + "</color>");
            }
        }
    }
}

Автор
15FPS
Скачиваний
0
Просмотры
1
Первый выпуск
Обновление
Оценка
0.00 звёзд 0 оценок

Другие ресурсы пользователя 15FPS

Сверху