forked from andristum/dpclothing
-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.lua
226 lines (217 loc) · 6.45 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
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
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
Config = {
Language = "en", -- You can change the language here. I translated some with a tool online so they might not be 100% accurate. Let me know!
ExtrasEnabled = true, -- This toggles the extra commands (Shirt, Pants) in case you dont want your players stripping their clothes for whatever reason.
Debug = false, -- Enables logging and on screen display of what your character is wearing.
GUI = {
Position = {x = 0.65, y = 0.5}, -- 0.5 is the middle!
AllowInCars = false, -- Allow the GUI in cars?
AllowWhenRagdolled = false, -- Allow the GUI when ragdolled?
Enabled = true, -- You can turn the gui off here, the base commands will still work.
DefaultKey = 'Y', -- Change the GUI key here.
Sound = true, -- You can disable sound in the GUI here. https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
TextColor = {255,255,255},
TextOutline = true,
TextFont = 0, -- Change font, useful for other languages.
TextSize = 0.21, -- Change the text size below buttons here, useful for other languages.
Toggle = true, -- Change the keybind from toggling the window open, or just holding it to open it.
}
}
--[[
Here are the commands to be generated, this is the layout.
["commandname"] = {
Func = Function that gets triggered.
Sprite = You probably shouldnt change this.
Desc = Description to be added in chat.
Button = The position of the button in the GUI.
Name = The display string for the GUI, we grab this with the Lang function, so they can be changed above.
},
You can change the command name if you wish, do so in the language file Locales/LANGUAGE.lua,
Some alternatives i thought of were :
Top : Jacket, Hoodie.
Hair : Bun, Ponytail, Hairdown.
Visor : Brim, Cap.
And then for the props you can change em to something real short to make it easy for people to use.
Glasses : G.
Hat : H.
Mask : M.
Visor : V.
]]--
Config.Commands = {
[Lang("TOP")] = {
Func = function() ToggleClothing("Top") end,
Sprite = "top",
Desc = Lang("Top2"),
Button = 1,
Name = Lang("Top")
},
[Lang("GLOVES")] = {
Func = function() ToggleClothing("Gloves") end,
Sprite = "gloves",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Gloves"))),
Button = 2,
Name = Lang("Gloves")
},
[Lang("VISOR")] = {
Func = function() ToggleProps("Visor") end,
Sprite = "visor",
Desc = Lang("Visor2"),
Button = 3,
Name = Lang("Visor")
},
[Lang("BAG")] = {
Func = function() ToggleClothing("Bag") end,
Sprite = "bag",
Desc = Lang("Bag2"),
Button = 8,
Name = Lang("Bag")
},
[Lang("SHOES")] = {
Func = function() ToggleClothing("Shoes") end,
Sprite = "shoes",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Shoes"))),
Button = 5,
Name = Lang("Shoes")
},
[Lang("VEST")] = {
Func = function() ToggleClothing("Vest") end,
Sprite = "vest",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Vest"))),
Button = 14,
Name = Lang("Vest")
},
[Lang("HAIR")] = {
Func = function() ToggleClothing("Hair") end,
Sprite = "hair",
Desc = Lang("Hair2"),
Button = 7,
Name = Lang("Hair")
},
[Lang("HAT")] = {
Func = function() ToggleProps("Hat") end,
Sprite = "hat",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Hat"))),
Button = 4,
Name = Lang("Hat")
},
[Lang("GLASSES")] = {
Func = function() ToggleProps("Glasses") end,
Sprite = "glasses",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Glasses"))),
Button = 9,
Name = Lang("Glasses")
},
[Lang("EAR")] = {
Func = function() ToggleProps("Ear") end,
Sprite = "ear",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Ear2"))),
Button = 10,
Name = Lang("Ear")
},
[Lang("NECK")] = {
Func = function() ToggleClothing("Neck") end,
Sprite = "neck",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Neck2"))),
Button = 11,
Name = Lang("Neck")
},
[Lang("WATCH")] = {
Func = function() ToggleProps("Watch") end,
Sprite = "watch",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Watch"))),
Button = 12,
Name = Lang("Watch"),
Rotation = 5.0
},
[Lang("BRACELET")] = {
Func = function() ToggleProps("Bracelet") end,
Sprite = "bracelet",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Bracelet"))),
Button = 13,
Name = Lang("Bracelet")
},
[Lang("MASK")] = {
Func = function() ToggleClothing("Mask") end,
Sprite = "mask",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Mask"))),
Button = 6,
Name = Lang("Mask")
}
}
local Bags = { -- This is where bags/parachutes that should have the bag sprite, instead of the parachute sprite.
[40] = true,
[41] = true,
[44] = true,
[45] = true
}
Config.ExtraCommands = {
[Lang("PANTS")] = {
Func = function() ToggleClothing("Pants", true) end,
Sprite = "pants",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Pants"))),
Name = Lang("Pants"),
OffsetX = -0.04,
OffsetY = 0.0,
},
[Lang("SHIRT")] = {
Func = function() ToggleClothing("Shirt", true) end,
Sprite = "shirt",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Shirt"))),
Name = Lang("Shirt"),
OffsetX = 0.04,
OffsetY = 0.0,
},
[Lang("RESET")] = {
Func = function() if not ResetClothing(true) then Notify(Lang("AlreadyWearing")) end end,
Sprite = "reset",
Desc = Lang("Reset2"),
Name = Lang("Reset"),
OffsetX = 0.12,
OffsetY = 0.2,
Rotate = true
},
["clothingexit"] = {
Func = function() MenuOpened = false end,
Sprite = "exit",
Desc = "",
Name = Lang("Exit"),
OffsetX = 0.12,
OffsetY = -0.2,
Enabled = Config.GUI.Toggle
},
[Lang("BAGOFF")] = {
Func = function() ToggleClothing("Bagoff", true) end,
Sprite = "bagoff",
SpriteFunc = function()
local Bag = GetPedDrawableVariation(PlayerPedId(), 5)
local BagOff = LastEquipped["Bagoff"]
if LastEquipped["Bagoff"] then
if Bags[BagOff.Drawable] then
return "bagoff"
else
return "paraoff"
end
end
if Bag ~= 0 then
if Bags[Bag] then
return "bagoff"
else
return "paraoff"
end
else
return false
end
end,
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Bag"))),
Name = Lang("Bag"),
OffsetX = -0.12,
OffsetY = 0.2,
},
[Lang("UNDERSHIRT")] = {
Func = function() ToggleClothing("Undershirt", true) end,
Sprite = "undershirt",
Desc = string.format(Lang("TakeOffOn"), string.lower(Lang("Undershirt"))),
Name = Lang("Undershirt"),
OffsetX = -0.02,
OffsetY = 0.07,
},
}