Thanks Citizen But there is Problem
When i start the resource nothing Happened
I tried to add "bindkey",but the same Error
Can you Help me ?
GUIEditor = {
window = {},
button = {},
gridlist = {},
edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(252, 144, 712, 475, "Support Panel", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiWindowSetSizable(GUIEditor.window[1], false)
showCursor( false )
GUIEditor.button[1] = guiCreateButton(585, 398, 111, 50, "Send", false, GUIEditor.window[1])
addEventHandler("onClientGUIClick", GUIEditor.button[1], onClickSend, false)
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
GUIEditor.edit[1] = guiCreateEdit(35, 394, 540, 54, "", false, GUIEditor.window[1])
GUIEditor.gridlist[1] = guiCreateGridList(12, 27, 684, 361, false, GUIEditor.window[1])
local name = guiGridListAddColumn(GUIEditor.gridlist[1], "Name", 0.2)
local message = guiGridListAddColumn(GUIEditor.gridlist[1], "Message", 0.8 )
end
)
function winshow()
guiWindowSetSizable(GUIEditor.window[1], true)
showCursor( true )
end
bindKey ( player, "F2", "down", winshow )
function onClickSend(button, state)
if button == "left" then
local editmsg = tostring( guiGetText( GUIEditor.edit[1] ) )
local playerName = getPlayerName( localPlayer )
local row = guiGridListAddRow ( GUIEditor.gridlist[1] )
guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, editmsg, false, false )
guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, playerName, false, false )
end
)