Jump to content

No binds when editing


dima3367

Recommended Posts

Hi all, tell me why I insert a function for that would not work when entering text binds, but they still work. Here's a piece of code.

local window = guiCreateWindow(0.36,0.2, 0.3,0.35, '', true)
guiSetVisible(window,false)
guiWindowSetSizable(window,false)

local grid = guiCreateGridList(0,0.1, 0.6,1, true, window)
local column = guiGridListAddColumn(grid, 'Никнейм', 0.9)

guiCreateLabel(0.685,0.1, 1,0.1, 'Поиск по нику:',true,window)
local edit_nickname = guiCreateEdit(0.63,0.17, 1,0.1, '',true,window)
guiSetInputMode("no_binds_when_editing")

guiCreateLabel(0.685,0.3, 1, 0.1, 'Срок (в минутах):', true, window)

local edit = guiCreateEdit(0.63,0.37, 1,0.1, '', true,window)

local button = guiCreateButton(0.63,0.48, 1,0.1, 'Посадить',true,window)
addEventHandler('onClientGUIClick',button,function()
	if source ~= button then return end
	local detention = tonumber(guiGetText(edit))
	if not detention then return end

	local nick = guiGridListGetSelectedText(grid,1)
	triggerServerEvent('server:arrest',localPlayer,nick,detention)
end)

 

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...