-
-
Notifications
You must be signed in to change notification settings - Fork 221
Expand file tree
/
Copy pathbones.lua
More file actions
134 lines (125 loc) · 4.31 KB
/
bones.lua
File metadata and controls
134 lines (125 loc) · 4.31 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
local Bones = { Options = {}, Vehicle = { 'chassis', 'windscreen', 'seat_pside_r', 'seat_dside_r', 'bodyshell', 'suspension_lm', 'suspension_lr', 'platelight', 'attach_female', 'attach_male', 'bonnet', 'boot', 'chassis_dummy', 'chassis_Control', 'door_dside_f', 'door_dside_r', 'door_pside_f', 'door_pside_r', 'Gun_GripR', 'windscreen_f', 'platelight', 'VFX_Emitter', 'window_lf', 'window_lr', 'window_rf', 'window_rr', 'engine', 'gun_ammo', 'ROPE_ATTATCH', 'wheel_lf', 'wheel_lr', 'wheel_rf', 'wheel_rr', 'exhaust', 'overheat', 'seat_dside_f', 'seat_pside_f', 'Gun_Nuzzle', 'seat_r' } }
if Config.EnableDefaultOptions then
local BackEngineVehicles = {
[`ninef`] = true,
[`adder`] = true,
[`vagner`] = true,
[`t20`] = true,
[`infernus`] = true,
[`zentorno`] = true,
[`reaper`] = true,
[`comet2`] = true,
[`comet3`] = true,
[`jester`] = true,
[`jester2`] = true,
[`cheetah`] = true,
[`cheetah2`] = true,
[`prototipo`] = true,
[`turismor`] = true,
[`pfister811`] = true,
[`ardent`] = true,
[`nero`] = true,
[`nero2`] = true,
[`tempesta`] = true,
[`vacca`] = true,
[`bullet`] = true,
[`osiris`] = true,
[`entityxf`] = true,
[`turismo2`] = true,
[`fmj`] = true,
[`re7b`] = true,
[`tyrus`] = true,
[`italigtb`] = true,
[`penetrator`] = true,
[`monroe`] = true,
[`ninef2`] = true,
[`stingergt`] = true,
[`surfer`] = true,
[`surfer2`] = true,
[`gp1`] = true,
[`autarch`] = true,
[`tyrant`] = true
}
local function ToggleDoor(vehicle, door)
if GetVehicleDoorLockStatus(vehicle) < 2 then
if GetVehicleDoorAngleRatio(vehicle, door) > 0.0 then
SetVehicleDoorShut(vehicle, door, false)
else
SetVehicleDoorOpen(vehicle, door, false)
end
end
end
Bones.Options['seat_dside_f'] = {
['Toggle Front Door'] = {
icon = 'fas fa-door-open',
label = 'Toggle Front Door',
canInteract = function(entity)
return GetEntityBoneIndexByName(entity, 'door_dside_f') ~= -1
end,
action = function(entity)
ToggleDoor(entity, 0)
end,
distance = 1.2
},
}
Bones.Options['seat_pside_f'] = {
['Toggle Front Door'] = {
icon = 'fas fa-door-open',
label = 'Toggle Front Door',
canInteract = function(entity)
return GetEntityBoneIndexByName(entity, 'door_pside_f') ~= -1
end,
action = function(entity)
ToggleDoor(entity, 1)
end,
distance = 1.2
}
}
Bones.Options['seat_dside_r'] = {
['Toggle Rear Door'] = {
icon = 'fas fa-door-open',
label = 'Toggle Rear Door',
canInteract = function(entity)
return GetEntityBoneIndexByName(entity, 'door_dside_r') ~= -1
end,
action = function(entity)
ToggleDoor(entity, 2)
end,
distance = 1.2
}
}
Bones.Options['seat_pside_r'] = {
['Toggle Rear Door'] = {
icon = 'fas fa-door-open',
label = 'Toggle Rear Door',
canInteract = function(entity)
return GetEntityBoneIndexByName(entity, 'door_pside_r') ~= -1
end,
action = function(entity)
ToggleDoor(entity, 3)
end,
distance = 1.2
}
}
Bones.Options['bonnet'] = {
['Toggle Hood'] = {
icon = 'fa-duotone fa-engine',
label = 'Toggle Hood',
action = function(entity)
ToggleDoor(entity, BackEngineVehicles[GetEntityModel(entity)] and 5 or 4)
end,
distance = 0.9
}
}
Bones.Options['boot'] = {
['Toggle Trunk'] = {
icon = 'fas fa-truck-ramp-box',
label = 'Toggle Trunk',
action = function(entity)
ToggleDoor(entity, BackEngineVehicles[GetEntityModel(entity)] and 4 or 5)
end,
distance = 0.9
}
}
end
return Bones