-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfig.lua
59 lines (44 loc) · 2.06 KB
/
config.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
Config = {}
Config.MaxDistanceFromPlayer = 20.0 -- Max distance from player to camera
Config.ShowIconAbovePlayersInPhotomode = true
Config.CheckJob = false -- Activate job check
Config.CheckGroup = false -- Activate user group check
Config.CheckVIP = false -- Activate VIP check
-- List of jobs authorized to use photo mode (if CheckJob is enabled)
Config.AllowedJobs = {'police', 'ambulance'}
-- List of groups authorized to use photo mode (if CheckGroup is enabled)
Config.AllowedGroups = {'admin', 'mod'}
-- Notification configuration
Config.NotificationType = 'esx' -- Can be 'esx', 'qb', or 'custom'.
-- Check for updates
Config.CheckForUpdates = true -- Check for updates
-- Message to display when a player does not have permission to use the command
Config.NoPermissionMessage = 'You do not have permission to use this command.'
Config.HideCommandTip = false -- Hide the "Press [e]" text
-- Function Triggered when a player enter photomode
-- You can use this function to toggle off your HUD
function Config.EnteredPhotomode()
end
-- Function Triggered when a player exit photomode
-- You can use this function to toggle on your HUD
function Config.ExitedPhotomode()
end
-- Function Server Side
-- This function currently returns false for all players.
-- To implement VIP checks, you need to edit this function to include the logic for determining if a player is a VIP.
-- Replace the 'return false' line with the appropriate VIP check logic.
function Config.IsPlayerVIP(source)
-- Add your VIP check logic here
return false
end
function Config.SendNotification(source, message)
if Config.NotificationType == 'esx' then
TriggerClientEvent('esx:showNotification', source, message)
elseif Config.NotificationType == 'qb' then
TriggerClientEvent('QBCore:Notify', source, message, 'error')
elseif Config.NotificationType == 'custom' then
-- If the user wants to use his own notification system
-- He can add a function here for his notifications
-- Example: TriggerClientEvent('custom_notify', source, message, 'error')
end
end