synskidz Posted November 9, 2016 Share Posted November 9, 2016 -- i want to know about michael99's resource known "m-nickname". i really need help function setPlayerName (thePlayer) acc = getPlayerAccount(thePlayer) user = getAccountName(acc) if user then setPlayerName(thePlayer,user) end end addEventHandler("onPlayerLogin",getRootElement(),setPlayerName) Link to comment
</Mr.Tn6eL> Posted November 9, 2016 Share Posted November 9, 2016 This code sets player name as his account name when logging in 1 Link to comment
synskidz Posted November 10, 2016 Author Share Posted November 10, 2016 12 hours ago, </Mr.Tn6eL> said: This code sets player name as his account name when logging in yeah but its not working, where's the mistake? Link to comment
iPrestege Posted November 10, 2016 Share Posted November 10, 2016 (edited) 49 minutes ago, synskidz said: yeah but its not working, where's the mistake? Hi your mistake is that you are using thePlayer but the player in this event is the source. Edited November 10, 2016 by iPrestege Link to comment
' A F . Posted November 10, 2016 Share Posted November 10, 2016 Try this addEventHandler ( "onPlayerLogin" , root , function ( _ , account ) setPlayerName ( source , getAccountName ( account ) ) end ); 1 Link to comment
Rat32 Posted November 10, 2016 Share Posted November 10, 2016 (edited) This not work because you using a setPlayerName function - function is created already by mta, change function name. Edited November 10, 2016 by Tasumi 1 Link to comment
synskidz Posted November 10, 2016 Author Share Posted November 10, 2016 14 hours ago, Default said: Try this addEventHandler ( "onPlayerLogin" , root , function ( _ , account ) setPlayerName ( source , getAccountName ( account ) ) end ); thanks dude... its work Link to comment
' A F . Posted November 10, 2016 Share Posted November 10, 2016 You Are Welcome , Any time .. 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