Jump to content

login panel dissapear :(

Recommended Posts

Hey guys,i made a login/register panel and the problem is when 2 players connect, either one of them cant see the panel or sometimes, both cant see the panel, but when they dont connect at the same time, they can see it :( Everythin works fine with the registration and login. The only problem is that it dissapears when 2 players try to connect to server :/

heres the client side code :


The server side contains only the check for username and password .

Help me plz. Thank you for your time.

Edited by Guest
Link to comment
Show the code that triggers the event: "hideWindow".

The only reason why this happens is basically the fact that the triggering is wrong, it is triggered on player join/etc, and it makes it close for the rest of players.

Just remember to make the player source of the event hideWindow.

function hidetheWindow() 
if source ~= getLocalPlayer() then return end 
    guiSetVisible(darkpic, false) 
addEvent("hideWindow", true) 
addEventHandler("hideWindow", root, hidetheWindow) 

Link to comment

ok, heres the code, the serverside :

BTW, thnks for the help guys, but understandin everythin wat wiki says is kinda hard for me :( but i always try my best.

After makin postman,bus and taxi job, i decided to make the login panel, but i got this problem :/

Edited by Guest
Link to comment

:o but omg

if i had done it this way like : triggerClientEvent("hideWindow",thePlayer,thePlayer) -- im using the second thePlayer as argument to send to the hideWindow event

then i use thePlayer as argument for the hideWindow event in the clientside, will it work?? bekoz thats wat i normally do for all my jobs :o

Thnks for ur help man :)

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