addEventHandler("onClientResourceStart", root,
function()
loginButton = guiCreateButton(634, 323, 117, 37, "Zaloguj!", false)
addEventHandler("onClientGUIClick", loginButton,
function(button, state)
if button == "left" and state == "up" then
local login = guiGetText( loginBox )
local pass = guiGetText( passBox )
if login and pass then
triggerServerEvent("submitLogin", localPlayer, login, pass)
local elements = { loginButton, loginPassLabel, registerLabel, loginBox, passBox, keyImage }
destroyElement( elements )
guiSetInputEnabled( false )
showCursor( false )
removeEventHandler("onClientRender",root,createDxOnLogin)
else
outputChatBox("#EE5555* #C0C0C0Prosze wpisac #EE5555Login #C0C0C0oraz #EE5555Haslo#C0C0C0, aby sie zalogowac!", 255, 255, 255, true)
end
end
end, false )
loginPassLabel = guiCreateLabel( 481, 244, 48, 56, "Login:\n\n\nHaslo:", false )
guiSetFont(loginPassLabel,"default-bold-small")
registerLabel = guiCreateLabel( 363, 424, 397, 86, "Jesli nie posiadasz konta, udaj sie na nasze forum i zarejestruj konto.\nKolejnym krokiem bedzie zalozenie postaci.\n\n\n[url=http://www.LostHeaven.pl]http://www.LostHeaven.pl[/url]", false )
guiSetFont(registerLabel,"default-bold-small")
loginBox = guiCreateEdit( 525, 241, 145, 23, "", false )
guiEditSetMaxLength( loginBox, 25 )
passBox = guiCreateEdit( 525, 281, 145, 23, "", false )
guiEditSetMasked( passBox, true )
guiEditSetMaxLength( passBox, 30 )
keyImage = guiCreateStaticImage( 358, 237, 111, 94, "images/Key.png", false )
--outputChatBox("Dupa1")
showCursor( true )
guiSetInputEnabled( true )
--outputChatBox("Dupa2")
addEventHandler("onClientRender", root, createDxOnLogin)
end)
use triggerClientEvent on serverside then trigger an event with guiSetVisible.