Skip to content

Commit

Permalink
ESP Quick Menu shouldn't be visible to normal players
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonheart committed Aug 29, 2024
1 parent 561e08d commit c543077
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions lilia/modules/core/permissions/libraries/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ local ESP_Items = CreateClientConVar("lilia_esp_items", 0, true)
local ESP_Props = CreateClientConVar("lilia_esp_prop", 0, true)
local ESP_Entities = CreateClientConVar("lilia_esp_entities", 0, true)
function MODULE:SetupQuickMenu(menu)
menu:addCheck("ESP", function(_, state) ESP_Active:SetBool(state) end, ESP_Active:GetBool())
menu:addCheck("ESP Players", function(_, state) ESP_Players:SetBool(state) end, ESP_Players:GetBool())
menu:addCheck("ESP Items", function(_, state) ESP_Items:SetBool(state) end, ESP_Items:GetBool())
menu:addCheck("ESP Props", function(_, state) ESP_Props:SetBool(state) end, ESP_Props:GetBool())
menu:addCheck("ESP Entities", function(_, state) ESP_Entities:SetBool(state) end, ESP_Entities:GetBool())
local client = LocalPlayer()
if client:getChar() and (client:HasPrivilege("Staff Permissions - No Clip ESP Outside Staff Character") or client:isStaffOnDuty()) then
menu:addCheck("ESP", function(_, state) ESP_Active:SetBool(state) end, ESP_Active:GetBool())
menu:addCheck("ESP Players", function(_, state) ESP_Players:SetBool(state) end, ESP_Players:GetBool())
menu:addCheck("ESP Items", function(_, state) ESP_Items:SetBool(state) end, ESP_Items:GetBool())
menu:addCheck("ESP Props", function(_, state) ESP_Props:SetBool(state) end, ESP_Props:GetBool())
menu:addCheck("ESP Entities", function(_, state) ESP_Entities:SetBool(state) end, ESP_Entities:GetBool())
end
end

function MODULE:HUDPaint()
Expand Down Expand Up @@ -64,4 +67,4 @@ end
function MODULE:SpawnMenuOpen()
local client = LocalPlayer()
if self.SpawnMenuLimit then return client:getChar():hasFlags("pet") or client:isStaffOnDuty() or client:HasPrivilege("Spawn Permissions - Can Spawn Props") end
end
end

0 comments on commit c543077

Please sign in to comment.