Jump to content

onClientDoubleClick


nikitafloy

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...