Wysłany: 2014-08-10, 18:24
Mizy1999
I <3 Mta
Wiek: 28 Na forum: 4995 dni Posty: 157
Nick w MP: xxx
Piwa : 154
Problem jest taki, nie wywala ?adnego db, panelu nie da si? w??czy? ani wy??czy?, w??cza si? on dopiero gdy w??cz? skrypt.
C-side:
Kod: GUIEditor = {
button = {},
window = {},
label = {}
}
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")
-- 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, 190 )
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, 179 )
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 playerName = getAccountName ( getPlayerAccount ( source ) )
if isObjectInACLGroup ( "user." .. playerName, aclGetGroup ( "Fcmc" ) ) then
triggerClientEvent ( "otworz", source )
end
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, 19)
moveObject ( podnosnik2down, 10000,-304.5, 1021.5996, 19)
triggerClientEvent ( "zamknij", source )
end)
addEvent ( "podnosnikdown", true )
addEventHandler ( "podnosnikdown", root, function()
moveObject ( podnosnik1down, 10000, -304.5, 1018.0996, 16.8 )
moveObject ( podnosnik2down, 10000, -304.5, 1021.5996, 16.8 )
triggerClientEvent ( "zamknij", source )
end)
Wysłany: 2014-08-10, 18:27
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
for k , v in pairs ( getElementsByType ( "player" )) do
if getElementData ( v , "Fcmc" ) == true then
end
end
else
guiSetVisible ( GUIEditor . window [ 1 ], false )
showCursor ( false )
nie rozumiem, co chcesz tym kawa?kiem kodu uzyska??
Wysłany: 2014-08-11, 00:40
Mizy1999
I <3 Mta
Wiek: 28 Na forum: 4995 dni Posty: 157
Nick w MP: xxx
Piwa : 154
Aha, tak Zauwa? skleja?em tw?j skrypt by jako? ogarn?? tworzenie gui, wystarczy usun?? t? p?tle ?
Wysłany: 2014-08-11, 00:42
MeeShuffle
Programista/Grafik
Wiek: 32 Na forum: 4394 dni Posty: 2758
Nick w MP: Shuffle
Piwa : 8575
Skoro robisz warunek to wypada?oby wstawi? co? pod niego nie?
Wysłany: 2014-08-11, 13:14
Mizy1999
I <3 Mta
Wiek: 28 Na forum: 4995 dni Posty: 157
Nick w MP: xxx
Piwa : 154
Nie nie mam poj?cia co mam wstawi?, kurde wszystko mi si? sypie, inne panele si? otwieraj? jak klikam u... pierdziele.
Tagi: panel
Anonymous
Na forum: 245 dni
Posty: 1
Anonymous Koniecznie zajrzyj na: