-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.lua
More file actions
159 lines (139 loc) · 3.84 KB
/
config.lua
File metadata and controls
159 lines (139 loc) · 3.84 KB
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
Config = {}
-- Discord webhook logs
Config.Webhook = {
Enabled = true,
Url = 'YOUR_URL_HERE',
Username = 'pc-stoptraffic',
AvatarUrl = 'YOUR_URL_HERE',
IncludePosition = true, -- true = include x,y,z in embeds
Colors = {
StopCreated = 15158332, -- red
SlowCreated = 16766720, -- yellow/orange
ZoneRemoved = 5793266 -- green
}
}
-- Authorized job(s)
-- string: 'police'
-- table: { 'police', 'sheriff' }
Config.Job = { 'police', 'ambulance' }
-- If true, the player must be on duty
Config.RequireOnDuty = true
-- Customizable commands
Config.Commands = {
Open = 'stoptraffic', -- /stoptraffic
SlowOpen = 'slowtraffic', -- /slowtraffic
Remove = 'stoptrafficoff' -- /stoptrafficoff
}
-- Radius parameters
Config.Radius = {
Min = 0,
Max = 100,
Default = 25,
Step = 5
}
Config.Slow = {
Speed = {
Min = 5,
Max = 120,
Default = 50,
Step = 5
}
}
Config.PositionMenu = 'top-right' -- You can set 'top-left' or 'top-right' or 'bottom-left' or 'bottom-right'
-- Ground circle marker
Config.Marker = {
Type = 1,
Color = { r = 255, g = 70, b = 70, a = 110 },
Height = 1.2,
BobUpAndDown = false,
FaceCamera = false,
}
-- All active zones remain visible
Config.ShowActiveZoneMarker = false
Config.Preview = {
BlipColors = {
stop = 1,
slow = 5
},
BlipAlpha = 80
}
-- Minimap circle (visible only to authorized job members)
Config.Minimap = {
Enabled = true,
Colors = {
stop = 1, -- red
slow = 5 -- yellow
},
Alpha = 110, -- circle transparency
ShowCenter = false,
CenterSprite = 883, -- center icon
CenterScale = 0.8,
CenterColors = {
stop = 1,
slow = 5
},
ShortRange = true,
Names = {
stop = 'Stop Traffic',
slow = 'Slow Traffic'
}
}
Config.Local = {
NotAuthorized = 'You do not have permission to use this command.',
MustBeOnDuty = 'You must be on duty to use this command.',
ZoneCreated = 'Stop traffic enabled.',
SlowZoneCreated = 'Slow traffic enabled.',
ZoneRemoved = 'Traffic zone disabled.',
NoZone = 'No active stop traffic zone.',
NotInZone = 'You must be inside the zone to disable it.',
ZoneReplaced = 'The active stop traffic zone has been moved.',
PreviewCancelled = 'Zone creation cancelled.',
MenuTitle = 'Stop Traffic',
SlowMenuTitle = 'Slow Traffic',
ConfirmOption = 'Confirm zone',
CancelOption = 'Cancel',
CurrentRadius = 'Current radius',
RadiusLabel = 'Zone size',
RadiusDescription = 'Choose a radius between 0 and 100 meters.',
SpeedLabel = 'Speed in zone (km/h)',
SpeedDescription = 'Choose the maximum NPC vehicle speed in the zone.',
ConfirmTitle = 'Confirm zone',
ConfirmDescription = 'Confirm this stop traffic zone?',
SlowConfirmDescription = 'Confirm this slow traffic zone?',
Webhook = {
Unknown = 'Unknown',
NotAvailable = 'N/A',
TitleStopCreated = 'Stop Traffic Created',
TitleSlowCreated = 'Slow Traffic Created',
TitleZoneRemoved = 'Traffic Zone Removed',
DescriptionStopCreated = 'A stop traffic zone was created by %s.',
DescriptionSlowCreated = 'A slow traffic zone was created by %s.',
DescriptionZoneRemoved = '%s removed a traffic zone.',
FieldServerId = 'Server ID',
FieldRpName = 'RP Name',
FieldSessionName = 'Session Name',
FieldCitizenId = 'CitizenID',
FieldJob = 'Job',
FieldZoneType = 'Zone Type',
FieldRadius = 'Radius',
FieldSpeed = 'Speed',
FieldZoneId = 'Zone ID',
FieldLicense = 'License',
FieldDiscordId = 'Discord ID',
FieldPosition = 'Position',
ValueJobFormat = '%s (on duty: %s)',
ValueRadiusFormat = '%sm',
ValueSpeedFormat = '%s km/h',
ValueSpeedStop = '0 km/h',
ValuePositionFormat = 'x: %.2f y: %.2f z: %.2f',
ValueZoneTypeStop = 'stop',
FooterFormat = '%s • %s'
}
}
--[[
The 'Config.Sleep' variable sets the refresh rate (in milliseconds) for the while true loop.
By default, it is set to 1500 (1.5 seconds).
]]
Config.Sleep = 1500
-- Show debug logs in console
Config.Debug = false