GhostXoP Posted June 17, 2012 Share Posted June 17, 2012 How can the server get the users account name from the players Player element I tried Client triggerServerEvent("Test", getRootResource(), getPlayerName(getLocalPlayer())) Server function Test(PlayerName) -- The event handler is defined, but just to skip to it. getAccountName(getAccount(PlayerName)) end I dont want the players name, i want the account name the player logged in with. Link to comment
Guest Guest4401 Posted June 17, 2012 Share Posted June 17, 2012 triggerServerEvent('Test',localPlayer) addEvent('Test',true) addEventHandler('Test',root, function() local account = getPlayerAccount(source) -- get account element from player element local accname = getAccountName(account) -- get account name from account element outputChatBox(accname) -- show the account name end ) Link to comment
Guest Guest4401 Posted June 17, 2012 Share Posted June 17, 2012 Thank you very much You're welcome Could you use instead of from now on? :] Link to comment
GhostXoP Posted June 17, 2012 Author Share Posted June 17, 2012 Yes of course. Was wondering why the code didn't look too similar to my IDE's colors. 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