-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.lua
165 lines (133 loc) · 5.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
Config = {}
Config.RemoveTimeProKit = 3000 -- How much time it will save if using Pro version of cleaning kit
Config.RemoveTimePhyton = 2000 -- How much it will save if using (having) Phyton in player's inventory
Config.RemoveTimeOil = 2000 -- How much it will save if using (having) Oil in player's inventory
Config.TimeIfBellow30 = 30000 -- How much cleaning will take if gun's wear is < 30
Config.TimeIfAbove30 = 25000 -- How much cleaning will take if gun's wear is > 30
Config.TimeIfBellow60 = 20000 -- How much cleaning will take if gun's wear is < 60
Config.TimeIfBellow90 = 10000 -- How much cleaning will take if gun's wear is < 90
Config.InteractSound = true -- If you're using Interact sound (https://github.com/plunkettscott/interact-sound)
Config.CleaningSounds = true
Config.ISVolumeJam = 0.5 -- Interact sound volume for jam
Config.ISVolumeCleaning = 0.3 -- Interact sound volume for Cleaning
Config.Debug = true
Config.Framework = 'qb' -- 'ox' or 'qb'
Config.VersionCheck = true
-- Jamming System
Config.ignoredWeaponHashes = { -- Weapons that will not jam.
[GetHashKey("weapon_grenade")] = true,
[GetHashKey("weapon_bzgas")] = true,
[GetHashKey("weapon_molotov")] = true,
[GetHashKey("weapon_stickybomb")] = true,
[GetHashKey("weapon_proxmine")] = true,
[GetHashKey("weapon_snowball")] = true,
[GetHashKey("weapon_pipebomb")] = true,
[GetHashKey("weapon_ball")] = true,
[GetHashKey("weapon_smokegrenade")] = true,
[GetHashKey("weapon_flare")] = true,
[GetHashKey("weapon_acidpackage")] = true,
[GetHashKey("weapon_petrolcan")] = true,
[GetHashKey("gadget_parachute")] = true,
[GetHashKey("weapon_fireextinguisher")] = true,
[GetHashKey("weapon_hazardcan")] = true,
[GetHashKey("weapon_fertilizercan")] = true,
[GetHashKey("weapon_rpg")] = true,
[GetHashKey("weapon_grenadelauncher")] = true,
[GetHashKey("weapon_grenadelauncher_smoke")] = true,
[GetHashKey("weapon_minigun")] = true,
[GetHashKey("weapon_firework")] = true,
[GetHashKey("weapon_railgun")] = true,
[GetHashKey("weapon_hominglauncher")] = true,
[GetHashKey("weapon_compactlauncher")] = true,
[GetHashKey("weapon_rayminigun")] = true,
[GetHashKey("weapon_emplauncher")] = true,
[GetHashKey("weapon_railgunxm3")] = true,
}
Config.EnableSpecificWeaponModifier = true
Config.SpecificWeaponModifier = {
[GetHashKey("weapon_specialcarbine")] = 3,
[GetHashKey("weapon_carbinerifle")] = 100,
[GetHashKey("weapon_pistol")] = 50,
}
Config.JamChangeAbove95 = 0.1
Config.JamChangeAbove90 = 0.2
Config.JamChangeAbove60 = 0.3
Config.JamChangeAbove50 = 0.5
Config.JamChangeAbove40 = 1.7
Config.JamChangeAbove30 = 3.8
Config.JamChangeBellow30 = 10.9
Config.JamType1Max = 3000 -- How much time at maximum will first jam take
Config.JamType1Min = 1000 -- How much time at minimum will first jam take
Config.JamType2Max = 3000 -- How much time at maximum will second jam take
Config.JamType2Min = 5000 -- How much time at minimum will second jam take
Config.JamType3Max = 5000 -- How much time at maximum will third jam take
Config.JamType3Min = 7000 -- How much time at minimum will third jam take
-- Notify System
local ESX = nil
local QBCore = nil
if Config.Framework == 'ox' then
ESX = exports["es_extended"]:getSharedObject()
elseif Config.Framework == 'qb' then
QBCore = exports['qb-core']:GetCoreObject()
end
function NotifyError(text)
if Config.Framework == 'ox' then
lib.notify({
id = 'some_identifier',
title = 'Weapons',
description = text,
position = 'top',
style = {
backgroundColor = '#141517',
color = '#C1C2C5',
['.description'] = {
color = '#909296'
}
},
icon = 'triangle-exclamation',
iconColor = '#C53030'
})
else
QBCore.Functions.Notify({text = 'Weapons', caption = text}, 'error', 5000)
end
end
function Notify(text)
if Config.Framework == 'ox' then
lib.notify({
title = 'Weapons',
description = text,
type = 'info'
})
else
QBCore.Functions.Notify({text = 'Weapons', caption = text}, 'error', 5000)
end
end
Config.Text = {
['no_weapon'] = 'I think I need to hold a weapon',
['canceled'] = 'You cancelled the weapon cleaning',
['half_cleaned'] = 'You partially cleaned the weapon',
['full_clean'] = 'You fully cleaned the weapon',
['weapon_jammed'] = 'Gun jammed! Press [E] to fix it',
['CanceledFixing'] = 'You canceled fixing',
['PrepairingToClean'] = 'Preparing',
-- Weapon issues causes:
['weapon_jammed1'] = 'Replugging magazine',
['weapon_jammed2'] = 'Clearing ejection port',
['weapon_jammed3'] = 'Clearing the chamber'
}
-- For my Lithuanian brothers
--[[
Config.Text = {
['no_weapon'] = 'Manau man reikėtų laikyti ginklą',
['canceled'] = 'Atšaukėte ginklo valymą',
['half_cleaned'] = 'Pusiau išvalėte ginklą',
['full_clean'] = 'Pilnai išvalėte ginklą',
['weapon_jammed'] = 'Ginklas užstrigo! Spausk [E] norėdamas jį atstrigdinti',
['CanceledFixing'] = 'Atšaukei strigimo tvarkymą',
['PrepairingToClean'] = 'Pasiruoši valymui',
-- Weapon issues causes:
['weapon_jammed1'] = 'Pertrauki spyną',
['weapon_jammed2'] = 'Krapštai įtrigusią tūtą uokse',
['weapon_jammed3'] = 'Krapštai įtrigusią tūtą šovinio lizde'
}
]]