berdan91 Posted November 25, 2013 Share Posted November 25, 2013 (edited) Hello i create script and i create bindkey but he doesn't work , please help me here is the script : -- KODU EDITLEME YOKSA KÖTÜ OLUR SANA -- GUIEditor = { button = {}, window = {}, label = {} } GUIEditor.window[1] = guiCreateWindow(352, 162, 472, 470, "Silah Paneli FULL Coded by Eded", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.label[1] = guiCreateLabel(17, 44, 429, 46, "Silah Paneli", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 25, 246, -- s8) --> guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.label[2] = guiCreateLabel(43, 151, 371, 116, "", false, GUIEditor.label[1]) GUIEditor.label[3] = guiCreateLabel(137, 100, 185, 48, "By Eded", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "sa-header") guiLabelSetColor(GUIEditor.label[3], 25, 246, -- s8) --> GUIEditor.button[1] = guiCreateButton(17, 190, 116, 39, "AK - 47", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(176, 190, 116, 39, "M4", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(336, 190, 116, 39, "UZI", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(17, 261, 116, 39, "TEC-9", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(176, 261, 116, 39, "Susturucu Pistol", false, GUIEditor.window[1]) GUIEditor.button[6] = guiCreateButton(336, 261, 116, 39, "Pistol", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(17, 332, 116, 39, "SPAS-12", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(176, 332, 116, 39, "Sawnoff Shotgun", false, GUIEditor.window[1]) GUIEditor.button[9] = guiCreateButton(336, 332, 116, 39, "Shotgun", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(17, 400, 116, 39, "Desert Eagle", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(176, 400, 116, 39, "MP5", false, GUIEditor.window[1]) GUIEditor.button[12] = guiCreateButton(336, 400, 116, 39, "Sniper Riffle", false, GUIEditor.window[1]) GUIEditor.button[13] = guiCreateButton(17, 94, 91, 86, "Can", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[13], "sa-header") GUIEditor.button[14] = guiCreateButton(361, 90, 91, 86, "Zirh", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[14], "sa-header") GUIEditor.label[4] = guiCreateLabel(156, 446, 306, 14, "Silah Paneli by Eded TurkishCity Freeroam 2012-2013", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 2, 2, 251) GUIEditor.button[15] = guiCreateButton(127, 152, 216, 28, "KAPAT / QUIT / F2", false, GUIEditor.window[1]) AddEventHandler ("OnClientGUIClick",silah, silahh, false ) end function GUI() bindKey ( "F2", "down", GUI ) end Sorry for my bad english , i 'm turkish Edited November 26, 2013 by Guest Link to comment
codeluaeveryday Posted November 25, 2013 Share Posted November 25, 2013 Please keep in mind Lua is CASE sensitive, your addEventHandler was AddEventHandler, please look more carefully next time: GUIEditor = { button = {}, window = {}, label = {} } addEventHandler('onClientResourceStart', resourceRoot, function() GUIEditor.window[1] = guiCreateWindow(352, 162, 472, 470, "Silah Paneli FULL Coded by Eded", false) guiWindowSetSizable(GUIEditor.window[1], false) guiSetAlpha(GUIEditor.window[1], 1.00) GUIEditor.label[1] = guiCreateLabel(17, 44, 429, 46, "Silah Paneli", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[1], "sa-header") guiLabelSetColor(GUIEditor.label[1], 25, 246, -- s8) --> guiLabelSetHorizontalAlign(GUIEditor.label[1], "center", false) GUIEditor.label[2] = guiCreateLabel(43, 151, 371, 116, "", false, GUIEditor.label[1]) GUIEditor.label[3] = guiCreateLabel(137, 100, 185, 48, "By Eded", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[3], "sa-header") guiLabelSetColor(GUIEditor.label[3], 25, 246, -- s8) --> GUIEditor.button[1] = guiCreateButton(17, 190, 116, 39, "AK - 47", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(176, 190, 116, 39, "M4", false, GUIEditor.window[1]) GUIEditor.button[3] = guiCreateButton(336, 190, 116, 39, "UZI", false, GUIEditor.window[1]) GUIEditor.button[4] = guiCreateButton(17, 261, 116, 39, "TEC-9", false, GUIEditor.window[1]) GUIEditor.button[5] = guiCreateButton(176, 261, 116, 39, "Susturucu Pistol", false, GUIEditor.window[1]) GUIEditor.button[6] = guiCreateButton(336, 261, 116, 39, "Pistol", false, GUIEditor.window[1]) GUIEditor.button[7] = guiCreateButton(17, 332, 116, 39, "SPAS-12", false, GUIEditor.window[1]) GUIEditor.button[8] = guiCreateButton(176, 332, 116, 39, "Sawnoff Shotgun", false, GUIEditor.window[1]) GUIEditor.button[9] = guiCreateButton(336, 332, 116, 39, "Shotgun", false, GUIEditor.window[1]) GUIEditor.button[10] = guiCreateButton(17, 400, 116, 39, "Desert Eagle", false, GUIEditor.window[1]) GUIEditor.button[11] = guiCreateButton(176, 400, 116, 39, "MP5", false, GUIEditor.window[1]) GUIEditor.button[12] = guiCreateButton(336, 400, 116, 39, "Sniper Riffle", false, GUIEditor.window[1]) GUIEditor.button[13] = guiCreateButton(17, 94, 91, 86, "Can", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[13], "sa-header") GUIEditor.button[14] = guiCreateButton(361, 90, 91, 86, "Zirh", false, GUIEditor.window[1]) guiSetFont(GUIEditor.button[14], "sa-header") GUIEditor.label[4] = guiCreateLabel(156, 446, 306, 14, "Silah Paneli by Eded TurkishCity Freeroam 2012-2013", false, GUIEditor.window[1]) guiSetFont(GUIEditor.label[4], "default-bold-small") guiLabelSetColor(GUIEditor.label[4], 2, 2, 251) GUIEditor.button[15] = guiCreateButton(127, 152, 216, 28, "KAPAT / QUIT / F2", false, GUIEditor.window[1]) addEventHandler ("OnClientGUIClick",silah, silahh, false ) bindKey ( "F2", "down", GUI ) end ) function GUI() local status = not guiGetVisible(GUIEditor.window[1]) showCursor(status) guiSetVisible(GUIEditor.window[1], status) end Link to comment
=KoG=Rouche Posted November 25, 2013 Share Posted November 25, 2013 bindKey is not working for me too its wreid 0.o Link to comment
pa3ck Posted November 25, 2013 Share Posted November 25, 2013 Change 'OnClientGUIClick' To 'onClientGUIClick' Also, when you are scripting, I advise you to use /debugscript 3 to see the errors ( if there is any ) Link to comment
iPrestege Posted November 26, 2013 Share Posted November 26, 2013 At line 22 and 14 : Forum bug don't use lua tag post the code so we can fix it. Link to comment
berdan91 Posted November 26, 2013 Author Share Posted November 26, 2013 Don't work help Link to comment
berdan91 Posted November 26, 2013 Author Share Posted November 26, 2013 Im pressing a key (F2) but she doesn't works Link to comment
TAPL Posted November 27, 2013 Share Posted November 27, 2013 Im pressing a key (F2) but she doesn't works Did you fixed this? At line 22 and 14 : Forum bug don't use lua tag post the code so we can fix it. OR you just ignore it, like it never been said? 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