mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-02-18 18:49:23 +00:00
1.3.0f
- Fixed `css_kick` - Fixed gag/mute/silence on connect - Additional check in immunity
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using System.Text;
|
||||
@@ -24,7 +25,9 @@ public static class PlayerUtils
|
||||
public static bool CanTarget(this CCSPlayerController controller, CCSPlayerController target)
|
||||
{
|
||||
if (target.IsBot) return true;
|
||||
return AdminManager.CanPlayerTarget(controller, target);
|
||||
if (controller is null) return true;
|
||||
|
||||
return AdminManager.CanPlayerTarget(controller, target) || AdminManager.CanPlayerTarget(new SteamID(controller.SteamID), new SteamID(target.SteamID));
|
||||
}
|
||||
|
||||
public static void SetSpeed(this CCSPlayerController controller, float speed)
|
||||
|
||||
Reference in New Issue
Block a user