Jump to content

triggerClientEvent


#Paper

Recommended Posts

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

+ you should only send the event to one player, not all of them.

        triggerClientEvent ( player, "hideLoginWindow", getRootElement() ) 
        triggerClientEvent ( player, "showSkinSelector", getRootElement() ) 

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