forked from AliOG1337/ali_sleepoffline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.lua
85 lines (76 loc) · 3 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
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
Config = {}
-- Basic Settings
Config.Debug = false -- Enable/disable debug messages
Config.Locale = 'en' -- Language (de/en/lt)
-- Ped Settings
Config.PedTimeout = 15 -- Time in minutes before a sleeping ped is removed
Config.PedCheckInterval = 1 -- Interval in minutes to check for old peds
Config.PedOffset = -1.0 -- Z-offset for the ped's position (height above the ground)
-- Text Settings
Config.TextSettings = {
Font = 4, -- Font ID for the 3D text
Scale = 0.55, -- Base scaling for the 3D text
Color = {r = 255, g = 255, b = 255, a = 255}, -- Text color (RGB + Alpha)
DrawDistance = 15.0, -- Maximum distance for the text to be visible
}
-- Animation Settings
Config.Animation = {
Dict = "timetable@tracy@sleep@", -- Animation dictionary
Name = "idle_c", -- Animation name
Flag = 1, -- Animation flag
BlendIn = 8.0, -- Transition speed into the animation
BlendOut = -8.0, -- Transition speed out of the animation
}
-- Localization
Config.Locales = {
['de'] = {
['sleeping'] = 'Spieler Schläft',
['name'] = 'Name: %s',
['unknown'] = 'Unbekannt',
['license'] = "Lizenz: %s"
},
['en'] = {
['sleeping'] = 'Player Sleeping',
['name'] = 'Name: %s',
['unknown'] = 'Unknown',
['license'] = "License: %s"
},
['lt'] = {
['sleeping'] = 'Žaidėjas miega',
['name'] = 'Vardas: %s',
['unknown'] = 'Nežinomas',
['license'] = "%s"
}
}
-- Name Display Settings
Config.NameDisplay = {
Mode = 'id/name', -- Modes: false, "name", "license", "id/name", "id/license"
MaskLastname = true, -- Mask last names (e.g., "Doe" becomes "Do*******")
MaskLength = 2, -- Number of visible characters for masked last names
Format = nil -- Placeholder; will be dynamically set below
}
-- Dynamically set the Format after Mode is declared
if Config.NameDisplay.Mode == "name" then
Config.NameDisplay.Format = "~y~"..Config.Locales[Config.Locale].sleeping.."\n~w~"..Config.Locales[Config.Locale].name
elseif Config.NameDisplay.Mode == "license" or Config.NameDisplay.Mode == "id/name" or Config.NameDisplay.Mode == "id/license" then
Config.NameDisplay.Format = "~y~"..Config.Locales[Config.Locale].sleeping.."\n~w~"..Config.Locales[Config.Locale].license
else
Config.NameDisplay.Format = "~y~"..Config.Locales[Config.Locale].sleeping
end
-- MySQL Settings
Config.MySQL = {
Tables = {
Users = "users", -- Name of the Users table
Fields = {
Identifier = "identifier", -- Column name for player ID
Skin = "skin", -- Column name for skin data
Firstname = "firstname", -- Column name for first name
Lastname = "lastname" -- Column name for last name
}
}
}
-- Permissions
Config.Permissions = {
FakeCommand = "admin", -- Permission level required for the fake command
FakeCommandName = "fakesleep" -- Name of the fake sleep command
}