#
Blinkers
#
Get blinkers state
SHARED
if veh:SV_GetLeftBlinkerState() then
-- Left blinker is enabled.
end
if veh:SV_GetRightBlinkerState() then
-- Right blinker is enabled.
end
#
Set blinkers state
CLIENT
SetLeftBlinkerState sets the state of the left blinker of the vehicle driven by the player. SetRightBlinkerState sets the state of the right blinker of the vehicle driven by the player.
SVMOD:SetLeftBlinkerState(false) -- Disables left blinker=
SVMOD:SetLeftBlinkerState(true) -- Enables left blinker
SVMOD:SetRightBlinkerState(false) -- Disables right blinker
SVMOD:SetRightBlinkerState(true) -- Enables right blinker
#
Enable left blinkers
SERVER
SV_TurnOnLeftBlinker turns on the left blinkers of a vehicle.
Returns true if the left blinkers have been switched on, false otherwise. The operation will fail if the left blinkers are already on, if the vehicle has no left blinkers, or if the blinkers have been disabled.
if veh:SV_TurnOnLeftBlinker() then
-- Left blinkers are enabled.
else
-- Oops, operation failed!
end
#
Disable left blinkers
SERVER
SV_TurnOffLeftBlinker turns off the left blinkers of a vehicle.
Returns true if the left blinkers have been switched off, false otherwise. The operation will fail if the left blinkers are already switched off.
if veh:SV_TurnOffLeftBlinker() then
-- Left blinkers are disabled.
else
-- Oops, operation failed!
end
#
Enable right blinkers
SERVER
SV_TurnOnRightBlinker turns on the right blinkers of a vehicle.
Returns true if the right blinkers have been switched on, false otherwise. The operation will fail if the right blinkers are already on, if the vehicle has no right blinkers, or if the blinkers have been disabled.
if veh:SV_TurnOnRightBlinker() then
-- Right blinkers are enabled.
else
-- Oops, operation failed!
end
#
Disable right blinkers
SERVER
SV_TurnOffRightBlinker turns off the right blinkers of a vehicle.
Returns true if the right blinkers have been switched off, false otherwise. The operation will fail if the right blinkers are already switched off.
if veh:SV_TurnOffRightBlinker() then
-- Right blinkers are disabled.
else
-- Oops, operation failed!
end