Sticky11 Posted May 12, 2016 Share Posted May 12, 2016 Hello, I need help with this function, I tried to make the dobule click on gridlist it didn't work why? here is the function: function spawnMyVeh(button, state, absoluteX, absoluteY) triggerServerEvent("SpawnMyVehicle", localPlayer, ID) setTimer(function() vehsa = getElementData(localPlayer,"spawnedcars") or {} vehs = "" for ind,veh in ipairs(vehsa) do if vehs ~= "" then vehs = vehs..", "..veh.."" else vehs = vehs..""..veh.."" end end guiSetText(currentVehLabel, "Current Vehicle: "..vehs) end,1000,1) end addEventHandler ( "onClientDoubleClick", root, spawnMyVeh) Link to comment
Noki Posted May 15, 2016 Share Posted May 15, 2016 function spawnMyVeh(button, state, absoluteX, absoluteY) if (source == gridListVariable) then addEventHandler("onClientGUIDoubleClick", guiRoot, spawnMyVeh) Change 'gridListVariable' to the grid list's variable. 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