Wysłany: 2015-01-28, 15:05
Hardkorowy1996
Wiek: 30 Na forum: 4182 dni Posty: 11
Nick w MP: Grubson123456
Piwa : 1
Witam zrobi?em sobie taki panel w gui editorze ale nie wiem jak zrobi? ?eby si? otwiera? na klawisz f2 kod lua:
[lua]GUIEditor = {
tab = {},
tabpanel = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.tabpanel[1] = guiCreateTabPanel(188, 203, 1269, 612, false)
GUIEditor.tab[1] = guiCreateTab("Przewodnik", GUIEditor.tabpanel[1])
GUIEditor.memo[1] = guiCreateMemo(21, 31, 1210, 517, "", false, GUIEditor.tab[1])
GUIEditor.tab[2] = guiCreateTab("Prace", GUIEditor.tabpanel[1])
GUIEditor.memo[2] = guiCreateMemo(34, 28, 1195, 527, "", false, GUIEditor.tab[2])
GUIEditor.tab[3] = guiCreateTab("Konto Premium", GUIEditor.tabpanel[1])
GUIEditor.memo[3] = guiCreateMemo(31, 14, 1198, 553, "", false, GUIEditor.tab[3])
end
)[/lua]
Więcej szczegółów
Wystawiono 1 piw(a):Takoot21
Wysłany: 2015-01-28, 15:49
xHardus
Wiek: 27 Na forum: 4786 dni Posty: 90
Nick w MP: Harduś
Piwa : 786
Więcej szczegółów
Wystawiono 3 piw(a):Mezo. , psychol. , Takoot21
Wysłany: 2015-01-28, 15:54
Hardkorowy1996
Wiek: 30 Na forum: 4182 dni Posty: 11
Nick w MP: Grubson123456
Piwa : 1
[lua]GUIEditor = {
tab = {},
tabpanel = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function pomoc()
GUIEditor.tabpanel[1] = guiCreateTabPanel(188, 203, 1269, 612, false)
GUIEditor.tab[1] = guiCreateTab("Przewodnik", GUIEditor.tabpanel[1])
GUIEditor.memo[1] = guiCreateMemo(21, 31, 1210, 517, "", false, GUIEditor.tab[1])
GUIEditor.tab[2] = guiCreateTab("Prace", GUIEditor.tabpanel[1])
GUIEditor.memo[2] = guiCreateMemo(34, 28, 1195, 527, "", false, GUIEditor.tab[2])
GUIEditor.tab[3] = guiCreateTab("Konto Premium", GUIEditor.tabpanel[1])
GUIEditor.memo[3] = guiCreateMemo(31, 14, 1198, 553, "", false, GUIEditor.tab[3])
end
function bindTheKeys ()
bindKey ( "F2", "down", pomoc )
end
) [/lua]
Nie wiem czy dobrze zrozumia?em tak to ma wygl?da? ?
Wysłany: 2015-01-28, 16:43
xHardus
Wiek: 27 Na forum: 4786 dni Posty: 90
Nick w MP: Harduś
Piwa : 786
Kod:
function Widocznosc()
if (guiGetVisible(GUIEditor.tabpanel[1])) then
showCursor(false)
guiSetVisible(GUIEditor.tabpanel[1],false)
else
showCursor(true)
guiSetVisible(GUIEditor.tabpanel[1],true)
end
end
bindKey("F1","down",Widocznosc)
I jak masz tam ) to daj do po end wyzej
Ostatnio zmieniony przez xHardus 2015-01-28, 17:56, w całości zmieniany 5 razy
Więcej szczegółów
Wystawiono 3 piw(a):Mezo. , psychol. , Takoot21
Wysłany: 2015-01-28, 16:55
Hardkorowy1996
Wiek: 30 Na forum: 4182 dni Posty: 11
Nick w MP: Grubson123456
Piwa : 1
Taki mam error:
[code][16] SCRIPT ERROR: test\test.lua:24: ')' expected (to close '(' at line 7) near 'function'
[16] ERROR: Loading script failed: test\test.lua:24: ')' expected (to close '(' at line 7) near 'function'[/code]
Wysłany: 2015-01-29, 20:30
Maximerr
Programmer PHP, LUA
Wiek: 25 Na forum: 4427 dni Posty: 548
Piwa : 1051
Stw?rz funkcj? z guiSetVisible g??wnego okna, a nast?pnie u?yj
Więcej informacji znajdziesz w Wikipedii MTA: bindKey
i zbinduj t? funkcj?.
Tagi: panel
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: