mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-11-15 02:43:55 +00:00
feat: admin group panel
This commit is contained in:
1 parent
ec05cce082
commit
b7222a1f8f
14 files changed
+1177
-11
No files matched your search
@@ -0,0 +1,32 @@
|
||||
local isOpen = false
|
||||
|
||||
RegisterNUICallback("hide", function(_, cb)
|
||||
isOpen = false
|
||||
SetNuiFocus(false, false)
|
||||
cb("ok")
|
||||
end)
|
||||
|
||||
RegisterNUICallback("groups:create", function(data, cb)
|
||||
local result = lib.callback.await("ND_Core:groups:create", false, data)
|
||||
cb(result or {})
|
||||
end)
|
||||
|
||||
RegisterNUICallback("groups:edit", function(data, cb)
|
||||
local result = lib.callback.await("ND_Core:groups:edit", false, data)
|
||||
cb(result or {})
|
||||
end)
|
||||
|
||||
RegisterNUICallback("groups:delete", function(data, cb)
|
||||
local result = lib.callback.await("ND_Core:groups:delete", false, data)
|
||||
cb(result or {})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("ND:openGroupAdmin", function(groups)
|
||||
if isOpen then return end
|
||||
isOpen = true
|
||||
SetNuiFocus(true, true)
|
||||
SendNUIMessage({
|
||||
type = "groups:open",
|
||||
groups = groups
|
||||
})
|
||||
end)
|
||||
Reference in new issue
Block a user