-
Notifications
You must be signed in to change notification settings - Fork 9
/
shared.lua
82 lines (68 loc) · 1.47 KB
/
shared.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Config = {
Locale = GetConvar("esx:locale", "en")
}
if not Translate then Translate = _ end
COMSERV = {
outCoords = {
Enable = true,
Coords = vector3(156.8522, -992.6871, 29.3590),
},
coords = vector3(168.528, -978.9825, 30.09193),
radius = 50,
marker = { --task marker
typ = 1,
size = 1.5,
upDown = false,
color = { 200, 150, 0, 150 },
},
blip = {
icon = 1,
name = "Current Job",
},
model = GetHashKey("prop_tool_broom"),
}
JAIL = {
cells = {
vector3(460.0349, -994.5331, 24.91486),
vector3(459.6106, -997.8928, 24.91485),
vector3(459.5863, -1001.283, 24.91486),
},
outCoords = vector3(426.0047, -980.4569, 30.7098),
distance = 3,
}
ADMIN_RANKS = {
["admin"] = true,
}
-- WEBHOOK = false --discord log is disabled
WEBHOOK = "" --your webhook here
function output(text, target)
if IsDuplicityVersion() then --Server Side
TriggerClientEvent("chat:addMessage", target or -1, {
color = { 255, 0, 0 },
multiline = true,
args = { "Server", text },
})
else
TriggerEvent("chat:addMessage", {
color = { 255, 0, 0 },
multiline = true,
args = { "Server", text },
})
end
end
if not IsDuplicityVersion() then --Server side
return
end
function isAdmin(xPlayer)
if type(xPlayer) ~= "table" then
xPlayer = ESX.GetPlayerFromId(xPlayer)
end
if not xPlayer then
return false
end
local permissions = ADMIN_RANKS[xPlayer.getGroup()]
if not permissions then
output(Translate("not_admin"), xPlayer.source)
end
return permissions
end