crismar Posted May 9, 2014 Posted May 9, 2014 I'm working on one of my system and I want to be able to get account data without player being online thus having a command like /getaccpos [account name]. The problem is the account name is a string, how do I convert a string into an account ? Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
cheez3d Posted May 9, 2014 Posted May 9, 2014 https://wiki.multitheftauto.com/wiki/Ge ... tsBySerial from 1.4.
WASSIm. Posted May 9, 2014 Posted May 9, 2014 https://wiki.multitheftauto.com/wiki/GetAccountsBySerial from 1.4. he want get account from account name
crismar Posted May 9, 2014 Author Posted May 9, 2014 You don't understand... I want to turn a string into an account, so I can use that string inside getAccountData. getAccount doesn't help me. Contact me if you are looking for a Web Developer. 3rd of October 2014 - Founder of RomaniaZ
Dealman Posted May 9, 2014 Posted May 9, 2014 getAccount will return the account element, which is what you need to use in getAccountData - not a string. For example you could do this; function exampleCommand_Handler(thePlayer, theCMD, theTarget) local theData = getAccountData(getAccount(theTarget), "DataKey"); end addCommandHandler("GetAccPos", exampleCommand_Handler, false, false); Usage would be for example; /getaccposs account1 If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.
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