-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathcommands.lua
46 lines (39 loc) · 1.64 KB
/
commands.lua
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
RegisterNetEvent('Scene_creator:'..Config.Commands.AllowScene.name, function()
if not allow[source]then
allow[source] = Admin(source,nil,Config.Commands.AllowScene?.Permissions?.Identifiers,Config.Commands.AllowScene?.Permissions?.Groups)
else
allow[source] = false
end
TriggerClientEvent('Scene_creator:allow',source,allow[source])
end)
RegisterNetEvent('Scene_creator:'..Config.Commands.ShowAdmin.name, function()
if Admin(source,nil,Config.Commands.ShowAdmin?.Permissions?.Identifiers,Config.Commands.ShowAdmin?.Permissions?.Groups) then
TriggerClientEvent('Scene_creator:openAdmin',source)
end
end)
RegisterNetEvent('Scene_creator:'..Config.Commands.SaveTemplate.name, function()
if Admin(source,nil,Config.Commands.ShowAdmin?.Permissions?.Identifiers,Config.Commands.ShowAdmin?.Permissions?.Groups) then
TriggerClientEvent('Scene_creator:saveTemplate',source)
end
end)
RegisterNetEvent('Scene_creator:'..Config.Commands.DeleteAll.name, function()
if Admin(source,nil,Config.Commands.DeleteAll?.Permissions?.Identifiers,Config.Commands.DeleteAll?.Permissions?.Groups) then
TriggerClientEvent('Scene_creator:sceneDeleteAll',source)
end
end)
--Server Console Commands
RegisterCommand('removescenebucket', function(source,args)
if source == 0 then
DeleteScene(args[1])
end
end)
RegisterCommand('setscenebucket', function(source,args)
if source==0 then
SetSceneBucket(args[1],args[2])
end
end)
RegisterCommand('loadscenebucket', function(source,args)
if source==0 then
LoadSceneBucket(args[1])
end
end)