mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-10-18 04:47:04 +02:00
1.3.0f
- Fixed `css_kick` - Fixed gag/mute/silence on connect - Additional check in immunity
This commit is contained in:
parent
42849c231f
commit
6a182fff9d
6 changed files with 31 additions and 58 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue