Matevsz Posted June 7, 2016 Share Posted June 7, 2016 Hi, i create x6 image and x6 button. After pressing "lshift" shows 6 photos and now I would like to show one of the first button to the photo by pressing the arrow "arrow_u" and "arrow_d". function carLights(value) local car = getPedOccupiedVehicle(localPlayer) if car and getVehicleController(car) == localPlayer then if value == true then guiSetVisible(photos, true) elseif value == false then guiSetVisible(photos, false) end end end bindKey("lshift", "both", function(key,state) if state == "down" then carLights(true) elseif state == "up" then carLights(false) end end) addEventHandler("onClientGUIClick", photos, function() local car = getPedOccupiedVehicle(localPlayer) if car then if getVehicleOverrideLights(car) ~= 2 then guiSetVisible(button1, true) guiSetVisible(lights, false) bindKey("arrow_u", "up", button1) bindKey("arrow_d", "down", button1) else guiSetVisible(button1, false) guiSetVisible(lights, true) unbindKey("arrow_u", "up", button1) unbindKey("arrow_d", "down", button1) end end end) what we could be wrong? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now