#RooTs Posted January 1, 2016 Share Posted January 1, 2016 What is wrong ?..... has no errors in debug server.lua addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogin", source ) -- I've tried in (thePlayer) and (playerSource) I did not succeed end ) client.lua addEvent( "onClientPlayerLogin", true ) addEventHandler( "onClientPlayerLogin", resourceRoot, function() bindKey( "F3", "down", toggleState ) addEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end ) Link to comment
Revolt Posted January 1, 2016 Share Posted January 1, 2016 addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogin", resourceRoot ) end ) Link to comment
#RooTs Posted January 1, 2016 Author Share Posted January 1, 2016 @Revolt, thanks, I added more events server.lua addEventHandler ( 'onPlayerLogin', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogin", resourceRoot ) end ) addEventHandler ( 'onPlayerLogout', getRootElement ( ), function () triggerClientEvent ( source, "onClientPlayerLogout", resourceRoot ) end ) client.lua addEvent( "onClientPlayerLogin", true ) addEventHandler( "onClientPlayerLogin", resourceRoot, function() bindKey( "F3", "down", toggleState ) addEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end ) function removeEvent() unbindKey( "F3", "down", toggleState ) removeEventHandler("onClientRender",getRootElement(),renderLoginMessages) botoes() end addEvent( "onClientPlayerLogout", true ) addEventHandler( "onClientPlayerLogout", resourceRoot, removeEvent ) addEventHandler( "onClientPlayerQuit", resourceRoot, removeEvent ) something wrong in your view? Link to comment
Revolt Posted January 1, 2016 Share Posted January 1, 2016 Should work fine, I think. 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