[Release] Turn Signals/Indicators [Server-sided]

How to add that? It doesn’t work for me.

Make a folder and call it whatever you want. Goto “server.cfg” and put it under “AUTOSTART RECOURSES”

Put it as
“Start [name]”

Start the server and done

Forgot to reply, problem solved however thank you for reply.

1 Like

Thanks for the fix! :smile:

2 Likes

Can someone add hazard lights to this?

Just press both keys at the same time, tested, it works…

1 Like

Its not working for me rn?

So, how would I add a hazard function? What are the values I need to replace with what name?

Also, I tried changing the controls. Every resource I find claims that the left and right arrow keys are “37”, and “39”. The problem is, that TAB and SCROLL_DOWN are triggering the indicators with these settings.

Using a code index from another indicator mod (that I don’t think works with FiveM), I was able to bind the left and right arrow keys to the indicators (INPUT_CELLPHONE_LEFT “174”, and INPUT_CELLPHONE_RIGHT “175”). The problem, is that left and right DPad also triggers them on my controller. But, hey… At least it’s working now, and I can always just click the right indicator off when I manually toggle my headlights.

Not working for me either.

Turn signals don’t show for other players in my server.

Thinking perhaps something changed with Five M that needs updating on the code?

37 and 39 are the keys for Tab and [

The arrow keys are as follows
172 ARROW UP, 173 ARROW DOWN, 174 ARROW LEFT, 175 ARROW RIGHT

You can use this official document to find the keys you want

Regarding the hazards, pressing both keys at the same time should work, if needed i could provide a function to trigger both when a single key is pressed. Just need to test it works as intended before I post it.

Hi, just got homes and check my change to add hazards and it works as intended,
Open your resources, open Indicators, open indicators_client.lua

Where you see this

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
		if IsControlJustPressed(1, 43) then -- left [ Key
			if IsPedInAnyVehicle(GetPlayerPed(-1), true) then
				TriggerEvent('Indicator', 'left')
			end
		end

		if IsControlJustPressed(1, 42) then --right ] Key
			if IsPedInAnyVehicle(GetPlayerPed(-1), true) then
				TriggerEvent('Indicator', 'right')
			end
		end
    end
end)

Change it to this

Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
		if IsControlJustPressed(1, 43) then -- left [ Key
			if IsPedInAnyVehicle(GetPlayerPed(-1), true) then
				TriggerEvent('Indicator', 'left')
			end
		end

		if IsControlJustPressed(1, 42) then --right ] Key
			if IsPedInAnyVehicle(GetPlayerPed(-1), true) then
				TriggerEvent('Indicator', 'right')
			end
		end
		
		if IsControlJustPressed(1, 84) then -- hazards - Key
			if IsPedInAnyVehicle(GetPlayerPed(-1),true) then
				TriggerEvent('Indicator', 'left')
				TriggerEvent('Indicator', 'right')
			end
		end
		
    end
end)

Restart the resource (/restart indicators) and you are good to go

Edit: The key i set by default is - (minus)

Also this isn’t required for hazards, simply pressing both keys at the same time works fine. (isn’t as user friendly)

Also i recommend removing or commenting out the

print(netID .. "Indicator left")

in the indicators_server.lua file to stop the console getting spammed when the indicators are used.

1 Like

uhm… in indicators_server.lua
there is

local playerIndicators = {}{}

maybe make it…

local playerIndicators = {}

But still nice script shanks for sharing

what are the keys for left and right indicators

Is there no way to remove controller input? Maybe some other way to test for keyboard input? I actually turned this off in my own FiveM server due to pressing the headlights on my controller constantly triggering the indicators… It’s kind of annoying.

anyone find away to get trailers to have turn signals when activated from the cab?

1 Like

How do I increase the light intensity?

Would this be able to play a blinker tone if coded correctly?

what are the keybinds? Because i can’t seem to get it to work…

hey how can i change the controls and what are the standard controls?