mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-03-09 16:18:49 +00:00
Updated API
This commit is contained in:
@@ -9,7 +9,8 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.328" />
|
<PackageReference Include="CounterStrikeSharp.API" Version="1.0.340" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.4-beta1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public interface ICS2_SimpleAdminApi
|
|||||||
public event Action<PlayerInfo, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltied;
|
public event Action<PlayerInfo, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltied;
|
||||||
public event Action<SteamID, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltiedAdded;
|
public event Action<SteamID, PlayerInfo?, PenaltyType, string, int, int?, int?>? OnPlayerPenaltiedAdded;
|
||||||
public event Action<string, string?, bool, object>? OnAdminShowActivity;
|
public event Action<string, string?, bool, object>? OnAdminShowActivity;
|
||||||
|
public event Action<int, bool>? OnAdminToggleSilent;
|
||||||
|
|
||||||
public void IssuePenalty(CCSPlayerController player, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
public void IssuePenalty(CCSPlayerController player, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
||||||
public void IssuePenalty(SteamID steamid, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
public void IssuePenalty(SteamID steamid, CCSPlayerController? admin, PenaltyType penaltyType, string reason, int duration = -1);
|
||||||
@@ -28,4 +29,5 @@ public interface ICS2_SimpleAdminApi
|
|||||||
public void ShowAdminActivity(string messageKey, string? callerName = null, bool dontPublish = false, params object[] messageArgs);
|
public void ShowAdminActivity(string messageKey, string? callerName = null, bool dontPublish = false, params object[] messageArgs);
|
||||||
|
|
||||||
public bool IsAdminSilent(CCSPlayerController player);
|
public bool IsAdminSilent(CCSPlayerController player);
|
||||||
|
public HashSet<int> ListSilentAdminsSlots();
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Numerics;
|
||||||
using CounterStrikeSharp.API.Modules.Entities;
|
using CounterStrikeSharp.API.Modules.Entities;
|
||||||
|
|
||||||
namespace CS2_SimpleAdminApi;
|
namespace CS2_SimpleAdminApi;
|
||||||
@@ -27,12 +28,13 @@ public class PlayerInfo(
|
|||||||
public bool WaitingForKick { get; set; } = false;
|
public bool WaitingForKick { get; set; } = false;
|
||||||
public List<(ulong SteamId, string PlayerName)> AccountsAssociated { get; set; } = [];
|
public List<(ulong SteamId, string PlayerName)> AccountsAssociated { get; set; } = [];
|
||||||
public DiePosition? DiePosition { get; set; }
|
public DiePosition? DiePosition { get; set; }
|
||||||
|
public bool IsLoaded { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DiePosition(Vector_t position, QAngle_t angle)
|
public class DiePosition(Vector3 position, Vector3 angle)
|
||||||
{
|
{
|
||||||
public Vector_t Position { get; } = position;
|
public Vector3 Position { get; } = position;
|
||||||
public QAngle_t Angle { get; } = angle;
|
public Vector3 Angle { get; } = angle;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user