forked from chopo156/txadminmenu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclient.lua
More file actions
27 lines (24 loc) · 782 Bytes
/
client.lua
File metadata and controls
27 lines (24 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
RegisterCommand("admin", function(source, args, rawcommand)
TriggerServerEvent('txaLogger:CommandExecuted', rawCommand)
TriggerServerEvent("txadmin_menu:open_permission", source)
end)
RegisterNetEvent("open_menu")
AddEventHandler("open_menu", function()
SetNuiFocus(true, true)
SendNUIMessage({
action = "openui",
display = true,
website = Config.site
})
end)
RegisterNUICallback("fecharadmin", function(data)
SetNuiFocus(false, false)
SendNUIMessage({
type = 'openui',
display = false,
})
end)
RegisterNetEvent("no-perms")
AddEventHandler("no-perms", function()
TriggerEvent("chatMessage", "[Error]", {255,0,0}, "Sorry, you don't have permission to run this command!" )
end)