Karuzo Posted February 14, 2014 Posted February 14, 2014 Hey Guys, i need some help, is there a way to get the Account Name of the Player and set it to his Nickname ? and if he wants to change his nick cancel it ?
Castillo Posted February 14, 2014 Posted February 14, 2014 Yes, it is. getPlayerAccount getAccountName setPlayerName To stop the player from changing his name use: cancelEvent with the event onPlayerChangeNick. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
MTA Team 0xCiBeR Posted February 14, 2014 MTA Team Posted February 14, 2014 Not Tested: addEventHandler ( 'onPlayerLogin', root, function ( _, theCurrentAccount ) local acc = getAccountName(theCurrentAccount) setPlayerName ( source, acc ) end ) function nickChangeHandler() cancelEvent() end addEventHandler("onPlayerChangeNick", root, nickChangeHandler) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Karuzo Posted February 14, 2014 Author Posted February 14, 2014 Thank you Ciber, but got it How can i make a 'Remember Me' button ?
MTA Team 0xCiBeR Posted February 14, 2014 MTA Team Posted February 14, 2014 XML functions maybe the best. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Karuzo Posted February 14, 2014 Author Posted February 14, 2014 Hmm, but what about if i want it to make with Account functions and don't want it to put it in a XML ? Isn't there another way ?
MTA Team 0xCiBeR Posted February 14, 2014 MTA Team Posted February 14, 2014 With account functions you mean setAccountData? Well that's maybe posible with: --Storing a serial with setAccountData --Then on join use getAccounts--This will get a list of all accounts on the server --Then you can use getAccountData--To retrive the serial saved on that account Easier is XML functions tho. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
MTA Team 0xCiBeR Posted February 14, 2014 MTA Team Posted February 14, 2014 You're Welcome. DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
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