hey,
ich wieß nicht was ich falsch mache aber irgendwie kommt das login fenster nicht. die musik geht mal mal nicht. bitte hilft mir das mein selber gemachtest gun wider funktionirt
Lua
local sound = playSound("register_login/sound.mp3")
GUIEditor = {
edit = {},
button = {},
window = {},
label = {}
}
function SubmitPasswortLoginEdit(button)
if GUIEditor.button[1] == "left" then
if guiGetText ( GUIEditor.edit[1] ) == "******" then
guiSetText ( GUIEditor.edit[1], "" )
end
end
end
function guiShowLoginAgain_func ()
guiSetVisible ( GUIEditor.window[1], true )
guiSetText ( GUIEditor.edit[1], "" )
end
addEvent ( "guiShowLoginAgain", true )
addEventHandler ( "guiShowLoginAgain", getRootElement(), guiShowLoginAgain_func )
function SubmitEinloggenBtn()
if guiGetVisible ( GUIEditor.window[1] ) then
guiSetVisible ( GUIEditor.window[1], false )
local passwort = guiGetText ( GUIEditor.edit[1] )
triggerServerEvent ( "einloggen", lp, lp, passwort )
unbindKey ( "enter", "down", SubmitEinloggenBtn )
end
end
function _CreateLoginWindow()
GUIEditor.window[1] = guiCreateWindow((screenW - 1565) / 2, (screenH - 869) / 2, 1565, 869, "", false)
guiWindowSetMovable(GUIEditor.window[1], false)
guiWindowSetSizable(GUIEditor.window[1], false)
guiSetAlpha(GUIEditor.window[1], 1.00)
GUIEditor.label[1] = guiCreateLabel(251, 188, 1091, 257, "test", false, GUIEditor.staticimage[1])
GUIEditor.label[2] = guiCreateLabel(483, 544, 700, 161, "", false, GUIEditor.staticimage[1])
GUIEditor.edit[1] = guiCreateEdit(148, 56, 302, 63, "", false, GUIEditor.label[2])
GUIEditor.button[1] = guiCreateButton(488, 67, 136, 48, "", false, GUIEditor.label[2])
end
end
function GUI_ShowLoginWindow()
playSound("register_login/sound.mp3")
setSoundVolume(sound, 0.5)
guiSetVisible(GUIEditor.window[1], true)
guiSetVisible(myGridList, true)
showCursor(true)
bindKey ( "enter", "down", SubmitEinloggenBtn )
end
addEvent ( "ShowLoginWindow", true)
addEventHandler ( "ShowLoginWindow", getRootElement(), GUI_ShowLoginWindow)
function GUI_DisableLoginWindow()
cancelCameraIntro ()
stopSound(sound)
setSoundVolume(sound, 0.0)
guiSetVisible(GUIEditor.window[1], false)
showCursor(false)
setTimer ( checkForSocialStateChanges, 10000, -1 )
setTimer ( getPlayerSocialAvailableStates, 1000, 1 )
end
end
addEvent ( "DisableLoginWindow", true )
addEventHandler ( "DisableLoginWindow", getRootElement(), GUI_DisableLoginWindow)
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()),
function ()
local player = getLocalPlayer()
_CreateLoginWindow()
for i = 1, 100 do
outputChatBox (" ")
end
setTimer ( ShowInfoWindow, 1000, 1 )
triggerServerEvent ( "regcheck", getLocalPlayer(), player )
end
)
function ShowInfoWindow ()
infobox_start_func("Herzlich Willkommen\nbei Dam Reallife!\nBitte fuelle das mittig\nangezeigte Formular\naus!", 7500 )
end
Alles anzeigen
danke