fix(es_extended/server): define GlobalState

This commit is contained in:
Kasey FItton
2024-11-08 06:33:15 +00:00
parent 5e225c5782
commit 9b3a28f563
2 changed files with 3 additions and 1 deletions
@@ -146,7 +146,7 @@ local placeHolders = {
return GetCurrentServerEndpoint() or "localhost:30120"
end,
server_players = function()
return GlobalState.PlayerCount
return GlobalState.playerCount or 0
end,
server_maxplayers = function()
return GetConvarInt("sv_maxClients", 48)
+2
View File
@@ -63,3 +63,5 @@ RegisterNetEvent("esx:ReturnVehicleType", function(Type, Request)
Core.ClientCallbacks[Request] = nil
end
end)
GlobalState.playerCount = 0