I’ve been working on this script now for the past 20 minutes and I can’t figure it out.
This is my code:
local emergl = false
Citizen.CreateThread(function()
while true do
Citizen.Wait(0)
if IsPedInAnyVehicle(GetPlayerPed(-1), false) and GetPedInVehicleSeat(-1, GetPlayerPed(-1))then
if IsControlJustPressed(0, 311) then
if emergl == false then
emergl = true
while emergl == true then
SetVehicleNeonLightsColour(GetVehiclePedIsUsing(GetPlayerPed(-1)), 255, 0, 0)
SetVehicleNeonLightEnabled(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0, true)
SetVehicleNeonLightEnabled(GetVehiclePedIsUsing(GetPlayerPed(-1)), 1, true)
SetVehicleNeonLightEnabled(GetVehiclePedIsUsing(GetPlayerPed(-1)), 2, true)
SetVehicleNeonLightEnabled(GetVehiclePedIsUsing(GetPlayerPed(-1)), 3, true)
Citizen.Wait(500)
SetVehicleNeonLightsColour(GetVehiclePedIsUsing(GetPlayerPed(-1)), 0, 0, 255)
Citizen.Wait(500)
end
end
end
end
end
end
end)
No errors but still doesnt work. I would love some help. Thanks