Jump to content

GUI Spawn HELP URGENT!!


flowz

Recommended Posts

--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
  
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...