--CLIENT SIDE--
function onSpawn()
wLogin = guiCreateWindow(200, 216, 366, 110, "", false)
guiWindowSetSizable(wLogin, false)
guiWindowSetMovable(wLogin, false)
iName = guiCreateLabel(28, 33, 90, 15, "In-Game Name : ", false, wLogin)
iEdit = guiCreateEdit(121, 27, 212, 31, "Firstname_Lastname", false, wLogin)
iLogin = guiCreateButton(24, 68, 97, 31, "Login", false, wLogin)
showCursor( true )
end
addEventHandler("onPlayerJoin", root, onSpawn)
function startSpawn() --При старте
onSpawn()
end
addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),onSpawn)
local thePed = getPlayerFromName()
function loginAccept()
if source == iEdit and iLogin then
setPlayerNametagText ( thePed, .. iEdit )
setElementPosition( source, 1953.69666, -1765.17114, 13.54688 )
fadeCamera ( true, 4 )
end
end
addEventHandler("onClientGUIClick", root, loginAccept)
When I remove the bottom part my GUI appears, I think my bottom code don't work please help me.