-
Notifications
You must be signed in to change notification settings - Fork 1
/
ivl_binds_server.lua
48 lines (38 loc) · 1.17 KB
/
ivl_binds_server.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
addCommandHandler("lights",
function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
setVehicleHeadLightsState(vehicle, not getVehicleHeadLightsState(vehicle))
end
)
addCommandHandler("turnl",
function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
local state = getVehicleIndicatorLightsState(vehicle)
setVehicleIndicatorLightsState(vehicle, state == 1 and 0 or 1)
end
)
addCommandHandler("turnr",
function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
local state = getVehicleIndicatorLightsState(vehicle)
setVehicleIndicatorLightsState(vehicle, state == 2 and 0 or 2)
end
)
addCommandHandler("hazard",
function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
local state = getVehicleIndicatorLightsState(vehicle)
setVehicleIndicatorLightsState(vehicle, state == 3 and 0 or 3)
end
)
addCommandHandler("park",
function(player)
local vehicle = getPedOccupiedVehicle(player)
if not vehicle then return end
setVehicleParkLightsState(vehicle, not getVehicleParkLightsState(vehicle))
end
)