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

Made this up real quick in simplified code. Sends indicator status to all clients.

Turns your left/right indicators on/off with keys [ and ], respectively.

http://www.mediafire.com/file/frf65b7m2dphhke/indicators.zip

14 Likes

Please do put code in a pastebin aswell.

Also, do these show for everyone or just the client cause I think thats what its all about.

or like that:
updated now (first my variant is not working) :blush:

local ind = {l = false, r = false}

Citizen.CreateThread(function()
	while true do
		Wait(0)
		if IsPedSittingInAnyVehicle(GetPlayerPed(-1)) then
			if GetPedInVehicleSeat(GetVehiclePedIsUsing(GetPlayerPed(-1)), -1) == GetPlayerPed(-1) then
				if IsControlJustPressed(1, 190) then -- l
					ind.l = not ind.l
					SetVehicleIndicatorLights(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0, ind.l)
				end
				if IsControlJustPressed(1, 189) then --r
					ind.r = not ind.r
					SetVehicleIndicatorLights(GetVehiclePedIsUsing(GetPlayerPed(-1)), 1, ind.r)
				end
			end
		end
	end
end)

This is server-sided. Sends indicators to all connected players.

1 Like

thanks for cleaning up the booleans. I didn’t have a chance to clean up the code; only to get it working.

1 Like

Thanks a lot works great! Hope to see more we really need another hands up script since all kan’s stuff is MIA

i’ll release that soon :slight_smile:

his server is back online! we really need a hidden mini map if possible:)

HideHudAndRadarThisFrame()

use it in thread

This doesn’t appear to be working. Are there any specific controls for this or have I missed something out? The server loads the script just fine but we don’t see it work in the game.

2 Likes

Left bracket [ and right bracket ]. Do you see it for yourself?

I added this to my server, put the name in the AutoStart list but [ and ] don’t do anything for me.

Resolved: I noticed there were two ‘Indicator’ folders, so I removed the folder inside of the other folder (so when I open up the folder I see the files) and now I see the indicators when using [ and ]

Is it possible to change the keys? Left indicator [ changes weapons when your in a vehicle. I’m not seeing where I can change these values.

Thanks

Look at @MarkViolla’s post

if IsControlJustPressed(1, 190) then – l

if IsControlJustPressed(1, 189) then --r

The numbers represent keys on your keyboard…Change them to whatever you want.

(first resource I was able to find)
https://forum.cfx.re/t/list-of-possible-keys-in-array/1979
and

1 Like

Hmmm, its still not working for me. It indicates only client-side, you cant see the indicators from other players :confused:

1 Like

I dont know why but to me its set to k=left and l=right . How can i change this to Bracelte keys?

Does this include emergency lights? So like when you priss Arrow up both left and right starts to flash?

There are scripts that allow you to do this in the releases section of the forums. This is very early example to demonstrate how to stream vehicle’s flags.

My friends told me they couldn’t see the indicator, how can i fix this?

1 Like

Idk what went wrong in your code, but i fixed it for you. there you go

indicators_client.lua (1.3 KB)
indicators_server.lua (582 Bytes)
__resource.lua (76 Bytes)

10 Likes