Jump to content

Does'nt Set Gui Invisible No Errors Plus Censor Edit Boxes


Recommended Posts

Well There Are No Errors But The Register Gui aint invisble, Also i would like to know how to censor edit boxes

local datroot = getRootElement() 
local localPlayer = getLocalPlayer() 
  
addEvent("login:failed",true) 
function hideallreg() 
    guiSetVisible(register_Window[1], false) 
    guiSetVisible(login_Window[1], true) 
    showCursor( true ) 
end 
addEventHandler("onClientPlayerJoin", localPlayer, hideallreg) 
addEventHandler("onClientGUIClick", register_Button[2], hideallreg) 
addEventHandler("login:failed", localPlayer, hideallreg) 
  

Link to comment
  • Other Languages Moderators

'onClientPlayerJoin'

http://wiki.multitheftauto.com/wiki/OnClientPlayerJoin

This event is triggered when a player joins a server. It is triggered for all players except the local player, as the local player joins the server before their client-side resources are started. It would also be possible for two players to join within a few seconds of each other and for the two players' scripts may not receive onClientPlayerJoin events as their scripts wouldn't have started yet.

so you should use event onClientResourceStart

Link to comment
'onClientPlayerJoin'

http://wiki.multitheftauto.com/wiki/OnClientPlayerJoin

This event is triggered when a player joins a server. It is triggered for all players except the local player, as the local player joins the server before their client-side resources are started. It would also be possible for two players to join within a few seconds of each other and for the two players' scripts may not receive onClientPlayerJoin events as their scripts wouldn't have started yet.

so you should use event onClientResourceStart

That does no different, it still shows the register screen for me, should i change localPlayer too root?

Link to comment
Well There Are No Errors But The Register Gui aint invisble, Also i would like to know how to censor edit boxes
local datroot = getRootElement() 
local localPlayer = getLocalPlayer() 
  
addEvent("login:failed",true) 
function hideallreg() 
    guiSetVisible(register_Window[1], false) 
    guiSetVisible(login_Window[1], true) 
    showCursor( true ) 
end 
addEventHandler("onClientPlayerJoin", localPlayer, hideallreg) 
addEventHandler("onClientGUIClick", register_Button[2], hideallreg) 
addEventHandler("login:failed", localPlayer, hideallreg) 
  

Fixed

Link to comment
Well There Are No Errors But The Register Gui aint invisble, Also i would like to know how to censor edit boxes
local datroot = getRootElement() 
local localPlayer = getLocalPlayer() 
  
addEvent("login:failed",true) 
function hideallreg() 
    guiSetVisible(register_Window[1], false) 
    guiSetVisible(login_Window[1], true) 
    showCursor( true ) 
end 
addEventHandler("onClientPlayerJoin", localPlayer, hideallreg) 
addEventHandler("onClientGUIClick", register_Button[2], hideallreg) 
addEventHandler("login:failed", localPlayer, hideallreg) 
  

Any Idea How to censor the edit box?

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