Hey, Hab nen Frage. Hab mir nen Register gui gemacht von sa stories, Und ja, Alles erscheint, Registern funkoniert, Doch wenn ich mich reconnect. sehee ich nähmlich kein "Login" Button..
hier ma script
Lua
local x,y = guiGetScreenSize()
local gme = getLocalPlayer()
local gLogin = {}
function createLogin()
gLogin["Window"] = guiCreateStaticImage(0.3236,0.3216,0.3748,0.3333,"images/login_form.png",true)
gLogin["Info"] = guiCreateLabel(171,95,316,15,"Forum: Coming soon",false,gLogin["Window"])
gLogin["User"] = guiCreateLabel(171,127,316,15,"",false,gLogin["Window"])
gLogin["PW"] = guiCreateEdit(200,148,246,19,"",false,gLogin["Window"])
gLogin["Login"] = guiCreateStaticImage(25,191,100,30,"images/login_button.png",false,gLogin["Window"])
gLogin["Login_Hover"] = guiCreateStaticImage(25,191,100,30,"images/login_button.png",false,gLogin["Window"])
gLogin["Login_Click"] = guiCreateStaticImage(25,191,100,30,"images/login_button.png",false,gLogin["Window"])
gLogin["Quit"] = guiCreateStaticImage(348,191,100,30,"images/button_cancel.png",false,gLogin["Window"])
guiEditSetMasked(gLogin["PW"],true)
function Login()
local login = triggerServerEvent("onLogin", getRootElement(), getLocalPlayer(), getPlayerName(gme), guiGetText(gLogin["PW"]))
showCursor(false)
showCursor(false)
guiSetVisible(gLogin["Window"],false)
end
addEventHandler("onClientGUIClick",gLogin["Login"],Login,false)
addEventHandler("onClientMouseEnter", gLogin["Login"], function()
guiSetVisible(gLogin["Login"],false)
end)
function Leave()
triggerServerEvent("kickHim", getLocalPlayer(), getPlayerName(gme))
end
addEventHandler("onClientGUIClick",gLogin["Quit"],Leave,false)
end
addEvent("cLogin",true)
addEventHandler("cLogin",getRootElement(),createLogin)
Alles anzeigen
das error ist: server triggered clintside event cLogin, but event is not added Clentside
Neue error:
:23:bad argument @ 'addEventHandler' [Expected element at argument 2, got nil]
:25: Das gleiche
:32: Das gleiche
Meta = Type="client"
worran lieg das falsch?