-
Notifications
You must be signed in to change notification settings - Fork 193
/
Copy pathgroups.lua
131 lines (123 loc) · 3.23 KB
/
groups.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
local cfg = {}
-- define each group with a set of permissions
-- _config property:
--- title (optional): group display name
--- gtype (optional): used to have only one group with the same gtype per player (example: a job gtype to only have one job)
--- onspawn (optional): function(player) (called when the player spawn with the group)
--- onjoin (optional): function(player) (called when the player join the group)
--- onleave (optional): function(player) (called when the player leave the group)
--- (you have direct access to vRP and vRPclient, the tunnel to client, in the config callbacks)
cfg.groups = {
["superadmin"] = {
_config = {onspawn = function(player) vRPclient._notify(player,"You are superadmin.") end},
"player.group.add",
"player.group.remove",
"player.givemoney",
"player.giveitem"
},
["admin"] = {
"admin.tickets",
"admin.announce",
"player.list",
"player.whitelist",
"player.unwhitelist",
"player.kick",
"player.ban",
"player.unban",
"player.noclip",
"player.custom_emote",
"player.custom_sound",
"player.display_custom",
"player.coords",
"player.tptome",
"player.tpto"
},
["god"] = {
"admin.god" -- reset survivals/health periodically
},
-- the group user is auto added to all logged players
["user"] = {
"player.phone",
"player.calladmin",
"police.askid",
"police.store_weapons",
"police.seizable" -- can be seized
},
["police"] = {
_config = {
title = "Police",
gtype = "job",
onjoin = function(player) vRPclient._setCop(player,true) end,
onspawn = function(player) vRPclient._setCop(player,true) end,
onleave = function(player) vRPclient._setCop(player,false) end
},
"police.menu",
"police.cloakroom",
"police.pc",
"police.handcuff",
"police.drag",
"police.putinveh",
"police.getoutveh",
"police.check",
"police.service",
"police.wanted",
"police.seize.weapons",
"police.seize.items",
"police.jail",
"police.fine",
"police.announce",
"-police.store_weapons",
"-police.seizable" -- negative permission, police can't seize itself, even if another group add the permission
},
["emergency"] = {
_config = {
title = "Emergency",
gtype = "job"
},
"emergency.revive",
"emergency.shop",
"emergency.service"
},
["repair"] = {
_config = {
title = "Repair",
gtype = "job"
},
"vehicle.repair",
"vehicle.replace",
"repair.service"
},
["taxi"] = {
_config = {
title = "Taxi",
gtype = "job"
},
"taxi.service"
},
["citizen"] = {
_config = {
title = "Citizen",
gtype = "job"
}
}
}
-- groups are added dynamically using the API or the menu, but you can add group when an user join here
cfg.users = {
[1] = { -- give superadmin and admin group to the first created user on the database
"superadmin",
"admin"
}
}
-- group selectors
-- _config
--- x,y,z, blipid, blipcolor, permissions (optional)
cfg.selectors = {
["Job Selector"] = {
_config = {x = -268.363739013672, y = -957.255126953125, z = 31.22313880920410, blipid = 351, blipcolor = 47},
"police",
"taxi",
"repair",
"citizen"
}
}
return cfg