ESP_Players_GoldKingZ.Shared 1.0.4

dotnet add package ESP_Players_GoldKingZ.Shared --version 1.0.4
                    
NuGet\Install-Package ESP_Players_GoldKingZ.Shared -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ESP_Players_GoldKingZ.Shared" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ESP_Players_GoldKingZ.Shared" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="ESP_Players_GoldKingZ.Shared" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ESP_Players_GoldKingZ.Shared --version 1.0.4
                    
#r "nuget: ESP_Players_GoldKingZ.Shared, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ESP_Players_GoldKingZ.Shared@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ESP_Players_GoldKingZ.Shared&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=ESP_Players_GoldKingZ.Shared&version=1.0.4
                    
Install as a Cake Tool

🚀 Quick Start

1. Get the API

using ESP_Players_GoldKingZ.Shared;
 
private IESPPlayersApi? _esp;
 
public override void OnAllPluginsLoaded(bool hotReload)
{
    _esp = ESPPlayersApi.Get();
    if (_esp == null)
    {
        Logger.LogError("[MyPlugin] Missing cs2-ESP-Players-GoldKingZ API !");
        return;
    }
 
    _esp.Hook(OnESPChanged);
}
 
public override void Unload(bool hotReload)
{
    _esp?.Unhook(OnESPChanged);
}

2. Use it

if (_esp == null) return;
 
if (!_esp.IsESPActive(player))
    _esp.SetESP(player, true);

3. Listen for changes

private void OnESPChanged(CCSPlayerController player, bool state)
{
    Server.PrintToChatAll($"{player.PlayerName} ESP -> {state}");
}

That's it.

Note: call Get() in OnAllPluginsLoaded, not Load — the capability is not registered yet. Always null-check so your plugin keeps working without the core plugin.


📖 API Methods

State

Method Description
IsESPActive(player) / (slot) true if ESP is active — own toggle OR admin-given
IsESPActive(..., personalToggleOnly: true) true only if the player toggled it on themselves

Granted ESP is an OR on top of the player's own toggle, not a gate.

Permissions

Method Description
HasPermission(player, permissionsString) / (slot, ...) true if the player matches the rule
HasPermission(..., SteamIDs:, Flags:, Groups:) Match by named segments — full string wins if both are given

Control

Method Description
SetESP(player, state) / (slot, state) Grant (true) or revoke (false) admin-style ESP

Fires OnESPChanged only when the state actually changes.

Hooks

Method Description
Hook(handler) Subscribe to ESP changes. Safe to call twice — no double-subscribe
Unhook(handler) Remove the handler — call in your plugin's Unload

Handler signature: void OnESPChanged(CCSPlayerController player, bool state)


Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 114 8/26/2026