mirror of
https://github.com/daffyyyy/CS2-SimpleAdmin.git
synced 2026-09-27 20:17:04 +02:00
update: add servername & playername in css_query response
This commit is contained in:
parent
e964097a55
commit
7ac2f873a7
1 changed files with 4 additions and 0 deletions
|
|
@ -55,6 +55,8 @@ public partial class CS2_SimpleAdmin
|
||||||
MaxPlayers = ConVar.Find("sv_visiblemaxplayers")?.GetPrimitiveValue<int>() ?? -1;
|
MaxPlayers = ConVar.Find("sv_visiblemaxplayers")?.GetPrimitiveValue<int>() ?? -1;
|
||||||
MaxPlayers = MaxPlayers <= -1 ? Server.MaxPlayers : MaxPlayers;
|
MaxPlayers = MaxPlayers <= -1 ? Server.MaxPlayers : MaxPlayers;
|
||||||
|
|
||||||
|
string ServerName = ConVar.Find("hostname")?.StringValue ?? "Unknown";
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Maps = Server.GetMapList();
|
Maps = Server.GetMapList();
|
||||||
|
|
@ -67,6 +69,7 @@ public partial class CS2_SimpleAdmin
|
||||||
var server = new
|
var server = new
|
||||||
{
|
{
|
||||||
map = Map,
|
map = Map,
|
||||||
|
hN = ServerName,
|
||||||
p = Players,
|
p = Players,
|
||||||
mP = MaxPlayers,
|
mP = MaxPlayers,
|
||||||
// maps = Maps,
|
// maps = Maps,
|
||||||
|
|
@ -91,6 +94,7 @@ public partial class CS2_SimpleAdmin
|
||||||
// accountId = player.AuthorizedSteamID?.AccountId.ToString(),
|
// accountId = player.AuthorizedSteamID?.AccountId.ToString(),
|
||||||
// steamId2 = player.AuthorizedSteamID?.SteamId2,
|
// steamId2 = player.AuthorizedSteamID?.SteamId2,
|
||||||
// steamId3 = player.AuthorizedSteamID?.SteamId3,
|
// steamId3 = player.AuthorizedSteamID?.SteamId3,
|
||||||
|
pn = player.PlayerName,
|
||||||
s64 = player.AuthorizedSteamID?.SteamId64.ToString(),
|
s64 = player.AuthorizedSteamID?.SteamId64.ToString(),
|
||||||
// ping = player.Ping,
|
// ping = player.Ping,
|
||||||
t = player.Team,
|
t = player.Team,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue