flowz Posted July 29, 2014 Share Posted July 29, 2014 --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. Link to comment
Max+ Posted July 29, 2014 Share Posted July 29, 2014 what do you want ? i didn't get what you mean you want to hide the gui when the resource Start ? Link to comment
esporta05 Posted July 29, 2014 Share Posted July 29, 2014 There is no guisetvisible. U need it inordeer to hide & show it properly. Link to comment
Anubhav Posted July 29, 2014 Share Posted July 29, 2014 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 ) guiSetVisible( wLogin, false ) showCursor( false ) end end addEventHandler("onClientGUIClick", root, loginAccept) Exactly esporta05. Link to comment
TAPL Posted July 30, 2014 Share Posted July 30, 2014 This all mess and make no sense. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now