using System; using UnityEngine; namespace Oxide.Plugins { [Info("Flashlessbang", "Death", "1.0.0")] class Flashlessbang : RustPlugin { const string perm = "flashlessbang.canbang"; void Init() { permission.RegisterPermission(perm, this); } void OnExplosiveThrown(BasePlayer player, Flashbang bang) { if (permission.UserHasPermission(player.UserIDString, perm)) { return; } bang.CancelInvoke(bang.Explode); ServerMgr.Instance.Invoke(() => { bang.ClientRPCPlayer(null, player, "Client_DoFlash", bang.transform.position); bang.Explode(bang.PivotPoint()); }, bang.GetRandomTimerTime()); } void OnExplosiveDropped(BasePlayer player, Flashbang bang) { OnExplosiveThrown(player, bang); } } }