Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2015-12-31, 15:55


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

Witam

Mam takowy kod z GUIEditora
Kod:


GUIEditor = {
button = {},
window = {},
label = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(784, 361, 422, 305, "[MWgang] Wybierz Gang", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.97)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF07BBF6")

GUIEditor.memo[1] = guiCreateMemo(450, 123, 0, 20, "", false, GUIEditor.window[1])
GUIEditor.label[1] = guiCreateLabel(175, 97, 78, 15, "Jak to dziala?", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(47, 126, 328, 15, "Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron", false, GUIEditor.window[1])
GUIEditor.button[5] = guiCreateButton(32, 42, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[3] = guiCreateLabel(32, 10, 55, 16, "Groove", false, GUIEditor.button[5])
guiLabelSetColor(GUIEditor.label[3], 5, 247, 39)

GUIEditor.button[6] = guiCreateButton(296, 42, 102, 38, "", false, GUIEditor.window[1])

GUIEditor.label[4] = guiCreateLabel(36, 10, 52, 13, "Ballas", false, GUIEditor.button[6])
guiLabelSetColor(GUIEditor.label[4], 246, 5, 243)

GUIEditor.button[7] = guiCreateButton(32, 244, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[5] = guiCreateLabel(34, 10, 53, 15, "Crips", false, GUIEditor.button[7])
guiLabelSetColor(GUIEditor.label[5], 18, 0, 250)

GUIEditor.button[8] = guiCreateButton(296, 246, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[6] = guiCreateLabel(34, 10, 50, 15, "Bloods", false, GUIEditor.button[8])
guiLabelSetColor(GUIEditor.label[6], 250, 0, 0)

GUIEditor.label[7] = guiCreateLabel(47, 148, 328, 15, "miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi ", false, GUIEditor.window[1])
GUIEditor.label[8] = guiCreateLabel(47, 169, 328, 15, "wiec dla przykladu miejsce spawnu jest wazna funkcja", false, GUIEditor.window[1])
showCursor(true)
end
)

addEventHandler("onClientRender", root,
function()
dxDrawText("", 984, 464, 984, 464, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawText("", 1005, 484, 1005, 484, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
end
)



I teraz mam pytanie... jak zrobi? ?e kiedy gracz wci?nie np guzik GROOVE to wykonuje si? jaka? funkcja?

Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-31, 15:59


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8


Więcej informacji znajdziesz w Wikipedii MTA:

https://wiki.multitheftauto.com/wiki/OnClientGUIClick


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Ostatnio zmieniony przez marcin778 2015-12-31, 19:32, w całości zmieniany 3 razy  
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-31, 16:45


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

Mo?liwe ?e robi? co? ?le ale teraz to nawet menu si? nie pojawia

Kod:


GUIEditor = {
button = {},
window = {},
label = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(784, 361, 422, 305, "[MWgang] Wybierz Gang", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 0.97)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF07BBF6")

GUIEditor.memo[1] = guiCreateMemo(450, 123, 0, 20, "", false, GUIEditor.window[1])
GUIEditor.label[1] = guiCreateLabel(175, 97, 78, 15, "Jak to dziala?", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(47, 126, 328, 15, "Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron", false, GUIEditor.window[1])
GUIEditor.button[5] = guiCreateButton(32, 42, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[3] = guiCreateLabel(32, 10, 55, 16, "Groove", false, GUIEditor.button[5])
guiLabelSetColor(GUIEditor.label[3], 5, 247, 39)

GUIEditor.button[6] = guiCreateButton(296, 42, 102, 38, "", false, GUIEditor.window[1])

GUIEditor.label[4] = guiCreateLabel(36, 10, 52, 13, "Ballas", false, GUIEditor.button[6])
guiLabelSetColor(GUIEditor.label[4], 246, 5, 243)

GUIEditor.button[7] = guiCreateButton(32, 244, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[5] = guiCreateLabel(34, 10, 53, 15, "Crips", false, GUIEditor.button[7])
guiLabelSetColor(GUIEditor.label[5], 18, 0, 250)

GUIEditor.button[8] = guiCreateButton(296, 246, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[6] = guiCreateLabel(34, 10, 50, 15, "Bloods", false, GUIEditor.button[8])
guiLabelSetColor(GUIEditor.label[6], 250, 0, 0)

GUIEditor.label[7] = guiCreateLabel(47, 148, 328, 15, "miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi ", false, GUIEditor.window[1])
GUIEditor.label[8] = guiCreateLabel(47, 169, 328, 15, "wiec dla przykladu miejsce spawnu jest wazna funkcja", false, GUIEditor.window[1])
showCursor(true)
addEventHandler ( "onClientGUIClick", GUIEditor.button[5], setGroove, false)
end
)

addEventHandler("onClientRender", root,
function()
dxDrawText("", 984, 464, 984, 464, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawText("", 1005, 484, 1005, 484, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
end
)

function setGroove(button)
if button = "left" then
fadeCamera (source, false)
showChat(source,true)
setPlayerHudComponentVisible(source,"all",true)
outputChatBox("WYBRALES GROOVE")
end
end




Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-31, 16:48


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

GUIEditor = { 
button = {}, 
window = {}, 
label = {}, 
memo = {} 
} 
addEventHandler("onClientResourceStart"resourceRoot, 
function() 
GUIEditor.window[1] = guiCreateWindow(784361422305"[MWgang] Wybierz Gang"falseguiWindowSetSizable(GUIEditor.window[1], falseguiSetAlpha(GUIEditor.window[1], 0.97guiSetProperty(GUIEditor.window[1], "CaptionColour""FF07BBF6"GUIEditor.memo[1] = guiCreateMemo(450123020""falseGUIEditor.window[1]) 
GUIEditor.label[1] = guiCreateLabel(175977815"Jak to dziala?"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-bold-small"GUIEditor.label[2] = guiCreateLabel(4712632815"Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron"falseGUIEditor.window[1]) 
GUIEditor.button[5] = guiCreateButton(324210338""falseGUIEditor.window[1]) 

GUIEditor.label[3] = guiCreateLabel(32105516"Groove"falseGUIEditor.button[5]) 
guiLabelSetColor(GUIEditor.label[3], 524739GUIEditor.button[6] = guiCreateButton(2964210238""falseGUIEditor.window[1]) 

GUIEditor.label[4] = guiCreateLabel(36105213"Ballas"falseGUIEditor.button[6]) 
guiLabelSetColor(GUIEditor.label[4], 2465243GUIEditor.button[7] = guiCreateButton(3224410338""falseGUIEditor.window[1]) 

GUIEditor.label[5] = guiCreateLabel(34105315"Crips"falseGUIEditor.button[7]) 
guiLabelSetColor(GUIEditor.label[5], 180250GUIEditor.button[8] = guiCreateButton(29624610338""falseGUIEditor.window[1]) 

GUIEditor.label[6] = guiCreateLabel(34105015"Bloods"falseGUIEditor.button[8]) 
guiLabelSetColor(GUIEditor.label[6], 25000GUIEditor.label[7] = guiCreateLabel(4714832815"miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi "falseGUIEditor.window[1]) 
GUIEditor.label[8] = guiCreateLabel(4716932815"wiec dla przykladu miejsce spawnu jest wazna funkcja"falseGUIEditor.window[1]) 
showCursor(trueend 
addEventHandler("onClientRender"root, 
function() 
dxDrawText(""984464984464tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalsedxDrawText(""10054841005484tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalseend 
) 

function setGroove(button) 
if button "left" then 
fadeCamera (sourcefalseshowChat(source,truesetPlayerHudComponentVisible(source,"all",trueoutputChatBox("WYBRALES GROOVE"end 
end
addEventHandler "onClientGUIClick"GUIEditor.button[5], setGroovefalse)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2015-12-31, 16:56


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

Nie dzia?a.. menu si? nie pokazuje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-01, 20:28


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

zamie?

guiSetAlpha(GUIEditor.window[1], 0.97


na

guiSetVisible(GUIEditor.window[1], false)


[ Dodano: 2016-01-01, 20:30 ]
tak pozatym, jak si? te GUI otwiera?, ani komendy, markera, pickupa

Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-01, 23:53


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

Mo?e inaczej

M?j skrypt odpowiedzialny za GUI:
Kod:

GUIEditor = {
button = {},
window = {},
label = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(784, 361, 422, 305, "[MWgang] Wybierz Gang", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF07BBF6")

GUIEditor.memo[1] = guiCreateMemo(450, 123, 0, 20, "", false, GUIEditor.window[1])
GUIEditor.label[1] = guiCreateLabel(175, 97, 78, 15, "Jak to dziala?", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(47, 126, 328, 15, "Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron", false, GUIEditor.window[1])
GUIEditor.button[5] = guiCreateButton(32, 42, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[3] = guiCreateLabel(32, 10, 55, 16, "Groove", false, GUIEditor.button[5])
guiLabelSetColor(GUIEditor.label[3], 5, 247, 39)

GUIEditor.button[6] = guiCreateButton(296, 42, 102, 38, "", false, GUIEditor.window[1])

GUIEditor.label[4] = guiCreateLabel(36, 10, 52, 13, "Ballas", false, GUIEditor.button[6])
guiLabelSetColor(GUIEditor.label[4], 246, 5, 243)

GUIEditor.button[7] = guiCreateButton(32, 244, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[5] = guiCreateLabel(34, 10, 53, 15, "Crips", false, GUIEditor.button[7])
guiLabelSetColor(GUIEditor.label[5], 18, 0, 250)

GUIEditor.button[8] = guiCreateButton(296, 246, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[6] = guiCreateLabel(34, 10, 50, 15, "Bloods", false, GUIEditor.button[8])
guiLabelSetColor(GUIEditor.label[6], 250, 0, 0)

GUIEditor.label[7] = guiCreateLabel(47, 148, 328, 15, "miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi ", false, GUIEditor.window[1])
GUIEditor.label[8] = guiCreateLabel(47, 169, 328, 15, "wiec dla przykladu miejsce spawnu jest wazna funkcja", false, GUIEditor.window[1])
showCursor(true)
end
)

addEventHandler("onClientRender", root,
function()
dxDrawText("", 984, 464, 984, 464, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawText("", 1005, 484, 1005, 484, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
end
)

function setGroove(button)
if button = "left" then
fadeCamera (source, false)
showChat(source,true)
setPlayerHudComponentVisible(source,"all",true)
outputChatBox("WYBRALES GROOVE")
end
end
addEventHandler ( "onClientGUIClick", GUIEditor.button[5], setGroove, false)


M?j drugi skrypt kt?ry odpowiada za ustawienie kamery etc:
Kod:

function spawnOnLogin (prevA, curA, autoLogin)
fadeCamera (source, true)
setCameraTarget (source, source)
setCameraMatrix(source,2315.6630859375,-1655.9891357422,46.456806182861)
showChat(source,false)
setPlayerHudComponentVisible(source,"all",false)
end
addEventHandler("onPlayerJoin", getRootElement(), spawnOnLogin)


Moje meta.xml
Kod:

<meta>
<info author="Matrzak" version="0.1" type="gamemode" name="MWgang" description="System Gangow by Matrzak" />
<script src="joinmanager.lua" type="server" />
<script src="GUI.lua" type="client" />
</meta>


Kamera sie poprawnie ustawia, gui nie wyskakuje nie ma go na owym ekranie ;x

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 12:57


marcin778

Krytyk serwerów MTA






Wiek: 24
Na forum: 4149 dni
Posty: 2268
Nick w MP: Marcineg

Piwa: 4662

Respekt: 1436,8
Respekt: 1436,8

GUIEditor = { 
button = {}, 
window = {}, 
label = {}, 
memo = {} 
} 
addEventHandler("onClientResourceStart"resourceRoot, 
function() 
GUIEditor.window[1] = guiCreateWindow(784361422305"[MWgang] Wybierz Gang"falseguiWindowSetSizable(GUIEditor.window[1], falseguiSetVisible(GUIEditor.window[1], falseguiSetProperty(GUIEditor.window[1], "CaptionColour""FF07BBF6"GUIEditor.memo[1] = guiCreateMemo(450123020""falseGUIEditor.window[1]) 
GUIEditor.label[1] = guiCreateLabel(175977815"Jak to dziala?"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-bold-small"GUIEditor.label[2] = guiCreateLabel(4712632815"Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron"falseGUIEditor.window[1]) 
GUIEditor.button[5] = guiCreateButton(324210338""falseGUIEditor.window[1]) 

GUIEditor.label[3] = guiCreateLabel(32105516"Groove"falseGUIEditor.button[5]) 
guiLabelSetColor(GUIEditor.label[3], 524739GUIEditor.button[6] = guiCreateButton(2964210238""falseGUIEditor.window[1]) 

GUIEditor.label[4] = guiCreateLabel(36105213"Ballas"falseGUIEditor.button[6]) 
guiLabelSetColor(GUIEditor.label[4], 2465243GUIEditor.button[7] = guiCreateButton(3224410338""falseGUIEditor.window[1]) 

GUIEditor.label[5] = guiCreateLabel(34105315"Crips"falseGUIEditor.button[7]) 
guiLabelSetColor(GUIEditor.label[5], 180250GUIEditor.button[8] = guiCreateButton(29624610338""falseGUIEditor.window[1]) 

GUIEditor.label[6] = guiCreateLabel(34105015"Bloods"falseGUIEditor.button[8]) 
guiLabelSetColor(GUIEditor.label[6], 25000GUIEditor.label[7] = guiCreateLabel(4714832815"miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi "falseGUIEditor.window[1]) 
GUIEditor.label[8] = guiCreateLabel(4716932815"wiec dla przykladu miejsce spawnu jest wazna funkcja"falseGUIEditor.window[1]) 
showCursor(trueend 
addEventHandler("onClientRender"root, 
function() 
dxDrawText(""984464984464tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalsedxDrawText(""10054841005484tocolor(255255255255), 1.00"default""left""top"falsefalsefalsefalsefalseend 
) 

function setGroove(button) 
if button "left" then 
fadeCamera (sourcefalseshowChat(source,truesetPlayerHudComponentVisible(source,"all",trueoutputChatBox("WYBRALES GROOVE"end 
end 
addEventHandler "onClientGUIClick"GUIEditor.button[5], setGroovefalse)

function guiopen (elmd)
if not md or getElementByType(el) ~="player" then return end
   if el == localPlayer then
   guiSetVisible(GUIEditor.window[1], true)

   showCursor(true)
end
end
addEventHandler("onPlayerJoin"guiopen)


Podpis
Moje prace: https://www.youtube.com/c...MuaWGHPp1mhlGnw

-- obecnie
-- obecnie
-- dawniej
-- dawniej
-- dawniej
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 14:23


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

Ca?y czas menu si? nie pokazuje

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 20:30


#404







Wiek: 26
Na forum: 4771 dni
Posty: 1438

Piwa: 2512

Respekt: 833,5
Respekt: 833,5Respekt: 833,5

Ostrzeżeń: 60%
Matrzak, to mo?e podaj db3 ? Nasze forum nie sta? na jasnowidz?w.

Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 21:02


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

db3 pokazuje takie logi:
Kod:

WARNING: mwgang/GUI.lua:59: Bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]


WARNING: mwgang/GUI.lua:69: Bad argument @ 'addEventHandler' [Expected element at argument 2, got function]


Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 21:28


Emm

***** ***






Wiek: 32
Na forum: 3880 dni
Posty: 3191
Nick w MP: Emm

Piwa: 6162

Respekt: 1580
Respekt: 1580Respekt: 1580


   Administrator: Admin ma zawsze rację | REGULAMIN FORUM | REKLAMA/VIP | .
Daj linijk? 59 i 69.

Podpis

Użytkownik: 20.10.2015r
GTAO Member: 06.03.2016r
Support-Team: 20.01.2016r
Moderator: 30.03.2016r
Mod-Team: 08.10.2016r
Vice Admin: 04.05.2018r
Administrator: 03.05.2022r


! Koniecznie zapoznaj się z regulaminem forum.
Pamiętaj, aby zawsze go przestrzegać, nie mniej ważne są również regulaminy działów, w których się wypowiadasz!
Zamiast zakładać temat po kilka razy, bo jest usuwany przez Administrację, przejrzyj regulamin i napisz poprawnie temat!
Sprawy z administracją możesz załatwiać anonimowo w tym dziale.
Najważniejsze informacje od Administracji możesz przeczytać tutaj oraz tutaj.
Postaw piwo autorowi tego posta
 

 
Wysłany: 2016-01-02, 21:35


Matrzak







Wiek: 35
Na forum: 4440 dni
Posty: 16



Respekt: 50

59: addEventHandler ( "onClientGUIClick", GUIEditor.button[5], setGroove, false)

69: addEventHandler("onPlayerJoin", guiopen)

Ca?y kod:
Kod:

GUIEditor = {
button = {},
window = {},
label = {},
memo = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(784, 361, 422, 305, "[MWgang] Wybierz Gang", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetVisible(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF07BBF6")

GUIEditor.memo[1] = guiCreateMemo(450, 123, 0, 20, "", false, GUIEditor.window[1])
GUIEditor.label[1] = guiCreateLabel(175, 97, 78, 15, "Jak to dziala?", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(47, 126, 328, 15, "Kazdy gang rozni sie wieloma funkcjami.. kazdy ma inna bron", false, GUIEditor.window[1])
GUIEditor.button[5] = guiCreateButton(32, 42, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[3] = guiCreateLabel(32, 10, 55, 16, "Groove", false, GUIEditor.button[5])
guiLabelSetColor(GUIEditor.label[3], 5, 247, 39)

GUIEditor.button[6] = guiCreateButton(296, 42, 102, 38, "", false, GUIEditor.window[1])

GUIEditor.label[4] = guiCreateLabel(36, 10, 52, 13, "Ballas", false, GUIEditor.button[6])
guiLabelSetColor(GUIEditor.label[4], 246, 5, 243)

GUIEditor.button[7] = guiCreateButton(32, 244, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[5] = guiCreateLabel(34, 10, 53, 15, "Crips", false, GUIEditor.button[7])
guiLabelSetColor(GUIEditor.label[5], 18, 0, 250)

GUIEditor.button[8] = guiCreateButton(296, 246, 103, 38, "", false, GUIEditor.window[1])

GUIEditor.label[6] = guiCreateLabel(34, 10, 50, 15, "Bloods", false, GUIEditor.button[8])
guiLabelSetColor(GUIEditor.label[6], 250, 0, 0)

GUIEditor.label[7] = guiCreateLabel(47, 148, 328, 15, "miejsce spawnu i pojazdy... pamietaj ze rywalizujesz z innymi ", false, GUIEditor.window[1])
GUIEditor.label[8] = guiCreateLabel(47, 169, 328, 15, "wiec dla przykladu miejsce spawnu jest wazna funkcja", false, GUIEditor.window[1])
showCursor(true)
end
)

addEventHandler("onClientRender", root,
function()
dxDrawText("", 984, 464, 984, 464, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
dxDrawText("", 1005, 484, 1005, 484, tocolor(255, 255, 255, 255), 1.00, "default", "left", "top", false, false, false, false, false)
end
)

function setGroove(button)
if button == "left" then
fadeCamera (source, false)
showChat(source,true)
setPlayerHudComponentVisible(source,"all",true)
outputChatBox("WYBRALES GROOVE")
end
end
addEventHandler ( "onClientGUIClick", GUIEditor.button[5], setGroove, false)

function guiopen (el, md)
if not md or getElementByType(el) ~="player" then return end
if el == localPlayer then
guiSetVisible(GUIEditor.window[1], true)

showCursor(true)
end
end
addEventHandler("onPlayerJoin", guiopen)


Postaw piwo autorowi tego posta
 

 
Tagi: ustawianie :: funkcji :: pod :: przyciskiem :: gui
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Ustawianie funkcji pod przyciskiem z GUI Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku