nikitafloy Posted April 19, 2014 Share Posted April 19, 2014 Decided to remake 'curve' author code. The main problem: PoliceFrak = { gridlist = {}, window = {}, button = {}, label = {} } xS,yS = guiGetScreenSize() PoliceFrak.window[1] = guiCreateWindow(xS/2, yS/2, 344, 497, "Рабочая одежда", false) guiWindowSetSizable(PoliceFrak.window[1], false) PoliceFrak.label[1] = guiCreateLabel(38, 28, 306, 50, "Двойной клик, чтобы одеться и вооружиться.", false, PoliceFrak.window[1]) guiSetFont(PoliceFrak.label[1], "default-bold-small") PoliceFrak.gridlist[1] = guiCreateGridList(12, 56, 322, 372, false, PoliceFrak.window[1]) guiGridListAddColumn(PoliceFrak.gridlist[1], "Выбор одежды", 0.9) PoliceFrak.button[1] = guiCreateButton(22, 435, 302, 52, "Закрыть", false, PoliceFrak.window[1]) guiSetFont(PoliceFrak.button[1], "default-bold-small") guiSetProperty(PoliceFrak.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible(PoliceFrak.window[1],false) guiSetInputEnabled(false) showCursor(false) function userSkinJob( ) outputChatBox('Хер') local row, col = guiGridListGetSelectedItem(PoliceFrak.gridlist[1]) if (row and col and row ~= -1 and col ~= -1) then local model = tonumber(guiGridListGetItemData(PoliceFrak.gridlist[1], row, 1)) if model == 286 then triggerServerEvent("checkFBI", localPlayer, model) elseif model ~= "" then triggerServerEvent("useSkin1", localPlayer, model) end end end addEventHandler("onClientDoubleClick", PoliceFrak.gridlist[1], userSkinJob, false) Specifically: addEventHandler("onClientDoubleClick", PoliceFrak.gridlist[1], userSkinJob, false) Dont work, only with root. Link to comment
Drakath Posted April 19, 2014 Share Posted April 19, 2014 'onClientDoubleClick' is for buttons only. Use 'onClientGUIDoubleClick' instead. Link to comment
nikitafloy Posted April 19, 2014 Author Share Posted April 19, 2014 'onClientDoubleClick' is for buttons only. Use 'onClientGUIDoubleClick' instead. Strange that I did not find it in the search. Spent a lot of time on his stupidity. Thank you! 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