Schick uns mal dein Script , dann mache ich es dir.
Lua
-----------------------------------------GUI-----------------------------------------
GUIEditor = {
button = {},
staticimage = {},
edit = {}
}
GUIEditor = {
button = {},
staticimage = {},
edit = {}
}
addEventHandler("onClientResourceStart", resourceRoot,
function()
GUIEditor.staticimage[1] = guiCreateStaticImage(0.00, 0.00, 1.00, 1.00, ":gimages/img/bg.png", true)
GUIEditor.staticimage[2] = guiCreateStaticImage(0.23, 0.04, 0.54, 0.95, ":gimages/img/login.png", true, GUIEditor.staticimage[1])
GUIEditor.edit[1] = guiCreateEdit(0.31, 0.32, 0.42, 0.07, "", true, GUIEditor.staticimage[2])
GUIEditor.edit[2] = guiCreateEdit(0.31, 0.41, 0.42, 0.07, "", true, GUIEditor.staticimage[2])
Loginbutton= guiCreateButton(0.32, 0.51, 0.40, 0.05, "", true, GUIEditor.staticimage[2])
guiSetAlpha(GUIEditor.button[1], 0.00)
guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA")
end
)
-----------------------------------------GUI-----------------------------------------
function showLogin () --Zeige das Login Fenster
showCursor(true)
guiSetVisible(LoginFenster,true)
end
addEvent("showLogin",true)
addEventHandler("showLogin",getRootElement(),showLogin)
function showRegister () --Zeige das Register Fenster
showCursor(true)
guiSetVisible(RegisterFenster,true)
end
addEvent("showRegister",true)
addEventHandler("showRegister",getRootElement(),showRegister)
function showLoginAgain ()
if source == Loginbutton then
showCursor(false)
guiSetVisible(GUI_Login,false)
fadeCamera (false,1.0, 0,0,0)
fadeCamera (true,10.0, 0,0,0)
end
end
addEventHandler("onClientGUIClick", getRootElement(), showLoginAgain)
function callServerForRegister ()
triggerServerEvent("checkPlayerInDB",getLocalPlayer())
end
addEventHandler("onClientResourceStart",getResourceRootElement(),callServerForRegister)
Alles anzeigen