mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +00:00
fix: player is valid
This commit is contained in:
parent
7a739564f1
commit
36e2de1883
|
@ -46,14 +46,14 @@ function gmInte.refreshSettings()
|
||||||
end
|
end
|
||||||
|
|
||||||
function gmInte.superadminGetConfig(ply)
|
function gmInte.superadminGetConfig(ply)
|
||||||
if (!gmInte.plyValid(ply) || !ply:IsSuperAdmin()) then return end
|
if (!ply:IsValid() || !ply:IsPlayer(ply) || !ply:IsSuperAdmin()) then return end
|
||||||
|
|
||||||
gmInte.config.websocket = GWSockets && true || false
|
gmInte.config.websocket = GWSockets && true || false
|
||||||
gmInte.SendNet("adminConfig", gmInte.config, ply)
|
gmInte.SendNet("adminConfig", gmInte.config, ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gmInte.publicGetConfig(ply)
|
function gmInte.publicGetConfig(ply)
|
||||||
if (!gmInte.plyValid(ply)) then return end
|
if (!ply:IsValid() || !ply:IsPlayer(ply)) then return end
|
||||||
|
|
||||||
gmInte.SendNet("publicConfig", {
|
gmInte.SendNet("publicConfig", {
|
||||||
["debug"] = gmInte.config.debug,
|
["debug"] = gmInte.config.debug,
|
||||||
|
@ -62,7 +62,7 @@ function gmInte.publicGetConfig(ply)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gmInte.superadminSetConfig(ply, data)
|
function gmInte.superadminSetConfig(ply, data)
|
||||||
if (!gmInte.plyValid(ply) || !ply:IsSuperAdmin()) then return end
|
if (!ply:IsValid() || !ply:IsPlayer(ply) || !ply:IsSuperAdmin()) then return end
|
||||||
|
|
||||||
for k, v in pairs(data) do
|
for k, v in pairs(data) do
|
||||||
gmInte.saveSetting(k, v)
|
gmInte.saveSetting(k, v)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user