Sehr geehrte Community,
meine GUI macht Probleme. Eigentlich keine Großen, aber es nervt!
Jedesmal wenn man sich auf meinen Server verbindet, kommt meine GUI direkt beim Login raus. Dies möchte ich verhindern!
Hier ist das Script:
Lua
------------------
-----Info-GUI-----
----Clientside----
---by[MRLoudly----
------------------
addEventHandler("onClientResourceStart",resourceRoot,
function()
GUIEditor_TabPanel = {}
GUIEditor_Tab = {}
GUIEditor_Button = {}
GUIEditor_Label = {}
GUIEditor_Radio = {}
GUIEditor_Image = {}
Major_Haupt = guiCreateWindow(265,140,725,411,"Major-Reallife - Informationen",false)
Major_Image_MajorRL = guiCreateStaticImage(9,22,271,78,"images/major-rl.png",true,Major_Haupt)
GUIEditor_TabPanel[1] = guiCreateTabPanel(61,125,598,267,false,Major_Haupt)
GUIEditor_Tab[1] = guiCreateTab("Regeln",GUIEditor_TabPanel[1])
GUIEditor_Label[1] = guiCreateLabel(15,14,306,17,"1. Beleidigungen aller Art sind hier unerwünscht!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[1],"clear-normal")
GUIEditor_Label[2] = guiCreateLabel(15,28,306,17,"2. Spieler werden mit Respekt behandelt!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[2],"clear-normal")
GUIEditor_Label[3] = guiCreateLabel(15,42,306,17,"3. Admins werden mit Respekt behandelt!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[3],"clear-normal")
GUIEditor_Label[4] = guiCreateLabel(16,148,567,16,"Bei Widerspruch dieser Regeln wird erstmal ein Kick und bei wiederholtem Male, ein Timeban verhängt!",false,GUIEditor_Tab[1])
GUIEditor_Label[5] = guiCreateLabel(15,55,306,17,"4. Jegliches Cheaten/Hacken ist hier untersagt!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[5],"clear-normal")
GUIEditor_Label[6] = guiCreateLabel(15,69,306,17,"5. Töten mittels Drive-By ist untersagt!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[6],"clear-normal")
GUIEditor_Label[7] = guiCreateLabel(15,82,473,16,"6. Einen spielerischen Vorteil mittels Bugs zu nutzen!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[7],"clear-normal")
GUIEditor_Label[8] = guiCreateLabel(15,95,579,15,"7. Pornografische Bilder/Videos werden im TS3/Forum nicht gedultet!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[8],"clear-normal")
GUIEditor_Label[9] = guiCreateLabel(15,109,579,15,"8. Bugs werden sofort im Forum und Ingame reportet!",false,GUIEditor_Tab[1])
guiSetFont(GUIEditor_Label[9],"clear-normal")
GUIEditor_Radio[1] = guiCreateRadioButton(14,200,16,15,"",false,GUIEditor_Tab[1])
guiRadioButtonSetSelected(GUIEditor_Radio[1],true)
GUIEditor_Label[10] = guiCreateLabel(32,200,254,16,"Ich akzeptiere alle Regeln, besonders #4 !",false,GUIEditor_Tab[1])
GUIEditor_Tab[2] = guiCreateTab("Team",GUIEditor_TabPanel[1])
GUIEditor_Image[1] = guiCreateStaticImage(7,10,430,245,"images/team.png",false,GUIEditor_Tab[2])
GUIEditor_Tab[3] = guiCreateTab("Forum",GUIEditor_TabPanel[1])
Major_Image_Forum = guiCreateStaticImage(121,50,344,128,"images/forum.png",false,GUIEditor_Tab[3])
Major_Tabs = guiCreateTab("Teamspeak 3",GUIEditor_TabPanel[1])
Major_Image_TS3 = guiCreateStaticImage(114,51,368,143,"images/ts3.png",false,Major_Tabs)
GUIEditor_Label[11] = guiCreateLabel(561,21,158,17,"Script and Design by Loudly!",false,Major_Haupt)
Major_Close_Button = guiCreateButton(530,110,128,39,"Schließen",false,Major_Haupt)
GUIEditor_Button[1] = guiCreateButton(420,267,5,5,"",false)
end
)
function show_Major_Haupt ()
if guiGetVisible(Major_Haupt) then
guiSetVisible(Major_Haupt, false)
guiSetInputEnabled(false)
showCursor(false)
else
guiSetVisible(Major_Haupt, true)
guiSetInputEnabled(true)
showCursor(true)
end
end
bindKey("F2", "down", show_Major_Haupt)
addCommandHandler("info", show_Major_Haupt)
addEventHandler("onClientGUIClick", getRootElement(),
function (state)
if state == "left" then
if source == Major_Close_Button then
show_Major_Haupt()
end
end
end
)
Alles anzeigen
Vielleicht hat es ja was mit der 'else' bei der 'function show_Major_Haupt' zutun?
Ich hoffe einer kann mir sagen, wie ich dies beheben kann.
Info: Ich bin ein Anfänger. Dies ist für mich Wissenschaftler-Sprache!