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

Wysłany: 2014-08-09, 15:39


Mizy1999

I <3 Mta






Wiek: 28
Na forum: 4995 dni
Posty: 157
Nick w MP: xxx

Piwa: 154

Respekt: 40

Okej, jednak podam ca?y kod tego panelu. Nie jest on trudny do wykonania wi?c... ;d
Tylko mam problem, taki jak wcze?niej wywala: Bad argument, na linijce o tej:
Kod:

addEventHandler ( "onClientGUIClick", podnosnikupbutton,
function()
outputChatBox ( "[Panel] Podno?nik aktywowany!", 0, 150, 0 )
triggerServerEvent ( "podnosnikup", getLocalPlayer() )
end
)


Tak dok?adnie to na wszystkich kt?re odnosz? si? do button?w. Nie wiem czemu, pr?bowa?em jak tutaj up wida?, zmieni? zmienn? Gui.Button[1] Czy jak ona tam mia?a na podnosnikupbutton i tak samo.

C-side:
Kod:

GUIEditor = {
button = {},
window = {},
label = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.window[1] = guiCreateWindow(949, 296, 245, 443, "Panel Mechanika", false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF528B0F")

podnosnikupbutton = guiCreateButton(16, 135, 88, 42, "Podno?nik: Up", false, GUIEditor.window[1])
guiSetFont(podnosnikupbutton, "default-bold-small")
guiSetProperty(podnosnikupbutton, "NormalTextColour", "FF528B0F")
GUIEditor.button[2] = guiCreateButton(138, 134, 88, 43, "Podno?nik: Down", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[2], "default-bold-small")
guiSetProperty(GUIEditor.button[2], "NormalTextColour", "FF528B0F")
GUIEditor.button[3] = guiCreateButton(17, 270, 87, 50, "", false, GUIEditor.window[1])
GUIEditor.button[4] = guiCreateButton(17, 270, 87, 50, "Skin: Mechanik Kobieta I", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[4], "default-bold-small")
guiSetProperty(GUIEditor.button[4], "NormalTextColour", "FF943405")
GUIEditor.button[5] = guiCreateButton(143, 270, 83, 50, "Skin: Mechanik Kobieta II", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[5], "default-bold-small")
guiSetProperty(GUIEditor.button[5], "NormalTextColour", "FF943405")
GUIEditor.button[6] = guiCreateButton(17, 330, 87, 54, "Skin: Mechanik M??czyzna I", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[6], "default-bold-small")
guiSetProperty(GUIEditor.button[6], "NormalTextColour", "FF943405")
GUIEditor.button[7] = guiCreateButton(143, 330, 83, 54, "Skin: Mechanik M??czyzna II", false, GUIEditor.window[1])
guiSetFont(GUIEditor.button[7], "default-bold-small")
guiSetProperty(GUIEditor.button[7], "NormalTextColour", "FF943405")
GUIEditor.label[1] = guiCreateLabel(23, 57, 217, 48, "Tutaj mo?esz zmieni? skin, wraz z ", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[1], "default-bold-small")
GUIEditor.label[2] = guiCreateLabel(23, 70, 219, 25, "interakcj? podno?nika.", false, GUIEditor.window[1])
guiSetFont(GUIEditor.label[2], "default-bold-small")
end
)

-- Otwieranie Gui po przez "u"

bindKey ( "u", "down", function()
triggerServerEvent ( "open", getLocalPlayer() )
end)


addEvent ( "otworz", true )
addEventHandler ( "otworz", root, function()
if source ~= getLocalPlayer() then return end
if guiGetVisible ( GUIEditor.window[1] ) == false then
guiSetVisible ( GUIEditor.window[1], true )
showCursor ( true )
for k,v in pairs ( getElementsByType ( "player" )) do
if getElementData ( v, "Fcmc" ) == true then
end
end
else
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
end
end)

-- Zmiana skin?w, trigger'owanie do Clienta

addEventHandler ( "onClientGUIClick", podnosnikupbutton,
function()
outputChatBox ( "[Panel] Podno?nik aktywowany!", 0, 150, 0 )
triggerServerEvent ( "podnosnikup", getLocalPlayer() )
end
)

--[[
addEventHandler ( "onClientGUIClick", GUIEditor.button[2],
function()
outputChatBox ( "[Panel] Podno?nik Desaktywowany!", 0, 150, 0 )
triggerServerEvent ( "podnosnikdown", getLocalPlayer() )
end
)

addEventHandler ( "onClientGUIClick", GUIEditor.button[4], function()
outputChatBox ( "[Panel] Zmieniono skin na: Mechanik Kobieta I", 0, 160, 0 )
setElementModel ( localPlayer, 179 )
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
end, false )

addEventHandler ( "onClientGUIClick", GUIEditor.button[5], function(thePlayer)
outputChatBox ( "[Panel] Ta opcja oczekuje oskryptowania, masz pomys? na ni? ? Napisz na Forum!", 0, 160, 0 )
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
end, false)

addEventHandler ( "onClientGUIClick", GUIEditor.button[6], function(thePlayer)
outputChatBox ( "[Panel] Zmieniono skin na: Mechanik M??czyzna I", 0, 160, 0 )
setElementModel ( localPlayer, 190 )
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
end, false)

addEventHandler ( "onClientGUIClick", GUIEditor.button[7], function(thePlayer)
outputChatBox ( "[Panel] Ta opcja oczekuje oskryptowania, masz pomys? na ni? ? Napisz na Forum!", 0, 160, 0 )
end, false)
]]--
-- Zamykanie okna dla klieta z triggera serwer

addEvent ( "zamknij", true )
addEventHandler ( "zamknij", root, function()
if source ~= getLocalPlayer() then return end
if guiGetVisible ( GUIEditor.window[1] ) == true then
guiSetVisible ( GUIEditor.window[1], false )
showCursor ( false )
end
end)

S-side:
Kod:


addEvent ( "open", true )
addEventHandler ( "open", root, function()
local accName = getAccountName ( getPlayerAccount ( source ) )
if not isObjectInACLGroup ("user."..accName, aclGetGroup ( "Fcmc" ) ) then
outputChatBox ( "", source, 80, 200, 0 ) return end
triggerClientEvent ( "otworz", source )
end)

podnosnik1down = createObject( 2567, -304.5, 1018.0996, 16.8, 0, 0, 0)
podnosnik2down = createObject( 2567, -304.5, 1021.5996, 16.8, 0, 0, 0)

addEvent ( "podnosnikup", true )
addEventHandler ( "podnosnikup", root, function()
moveObject ( podnosnik1down, 10000,-304.5, 1018.0996, 18)
moveObject ( podnosnik2down, 10000,-304.5, 1021.5996, 18)
triggerClientEvent ( "zamknij", source )
end)

addEvent ( "podnosnikdown", true )
addEventHandler ( "podnosnikdown", root, function()
moveObject ( podnosnik1down, -304.5, 1018.0996, 16.8)
moveObject ( podnosnik2down, -304.5, 1021.5996, 16.8)
triggerClientEvent ( "zamknij", source )
end)
[/code]

Postaw piwo autorowi tego posta
 

 
Wysłany: 2014-08-09, 15:46


MeeShuffle

Programista/Grafik






Wiek: 32
Na forum: 4395 dni
Posty: 2758
Nick w MP: Shuffle

Piwa: 8575

Respekt: 535,3
Respekt: 535,3

Wywala Ci b??dy bo po co Ci onClientResourceStart przy tworzeniu gui ?


Kawa?ek c-side


GUIEditor = { 
button = {}, 
window = {}, 
label = {} 
} 

GUIEditor.window[1] = guiCreateWindow(949296245443"Panel Mechanika"falseguiWindowSetSizable(GUIEditor.window[1], falseguiSetProperty(GUIEditor.window[1], "CaptionColour""FF528B0F"podnosnikupbutton guiCreateButton(161358842"Podno?nik: Up"falseGUIEditor.window[1]) 
guiSetFont(podnosnikupbutton"default-bold-small"guiSetProperty(podnosnikupbutton"NormalTextColour""FF528B0F"GUIEditor.button[2] = guiCreateButton(1381348843"Podno?nik: Down"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.button[2], "default-bold-small"guiSetProperty(GUIEditor.button[2], "NormalTextColour""FF528B0F"GUIEditor.button[3] = guiCreateButton(172708750""falseGUIEditor.window[1]) 
GUIEditor.button[4] = guiCreateButton(172708750"Skin: Mechanik Kobieta I"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.button[4], "default-bold-small"guiSetProperty(GUIEditor.button[4], "NormalTextColour""FF943405"GUIEditor.button[5] = guiCreateButton(1432708350"Skin: Mechanik Kobieta II"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.button[5], "default-bold-small"guiSetProperty(GUIEditor.button[5], "NormalTextColour""FF943405"GUIEditor.button[6] = guiCreateButton(173308754"Skin: Mechanik M??czyzna I"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.button[6], "default-bold-small"guiSetProperty(GUIEditor.button[6], "NormalTextColour""FF943405"GUIEditor.button[7] = guiCreateButton(1433308354"Skin: Mechanik M??czyzna II"falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.button[7], "default-bold-small"guiSetProperty(GUIEditor.button[7], "NormalTextColour""FF943405"GUIEditor.label[1] = guiCreateLabel(235721748"Tutaj mo?esz zmieni? skin, wraz z "falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.label[1], "default-bold-small"GUIEditor.label[2] = guiCreateLabel(237021925"interakcj? podno?nika."falseGUIEditor.window[1]) 
guiSetFont(GUIEditor.label[2], "default-bold-small"


Podpis

https://shufflecode.pl
Static Codes and Graphics - Join our discord!
Postaw piwo autorowi tego posta
 

 
Tagi: panel :: mechanika :: reflesh.
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Panel Mechanika Reflesh. 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