#Paper Posted January 6, 2011 Share Posted January 6, 2011 This event don't be triggered! --SERVER function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement() ) triggerClientEvent ( "showSkinSelector", getRootElement() ) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end --CLIENT addEvent("showSkinSelector", true) function selectorenable () CreateSelectorWindow() addEventHandler("onClientGUIClick", btnLeft, clientSkinLeft, false) addEventHandler("onClientGUIClick", btnSelect, clientSkinSelect, false) addEventHandler("onClientGUIClick", btnRight, clientSkinRight, false) if (wdwselector ~= nil) then guiSetVisible(wdwselector, true) triggerServerEvent("FrontCamera", getRootElement()) end showCursor(true) end addEventHandler("showSkinSelector", selectorenable, getRootElement()) Link to comment
MatXpl Posted January 6, 2011 Share Posted January 6, 2011 addEventHandler("showSkinSelector", selectorenable, getRootElement()) Try this: addEventHandler( "showSkinSelector", getRootElement(), selectorenable ) Link to comment
SDK Posted January 6, 2011 Share Posted January 6, 2011 + you should only send the event to one player, not all of them. triggerClientEvent ( player, "hideLoginWindow", getRootElement() ) triggerClientEvent ( player, "showSkinSelector", getRootElement() ) 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