crismar Posted May 9, 2014 Share 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 ? Link to comment
cheez3d Posted May 9, 2014 Share Posted May 9, 2014 https://wiki.multitheftauto.com/wiki/Ge ... tsBySerial from 1.4. Link to comment
WASSIm. Posted May 9, 2014 Share Posted May 9, 2014 https://wiki.multitheftauto.com/wiki/GetAccountsBySerial from 1.4. he want get account from account name Link to comment
crismar Posted May 9, 2014 Author Share 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. Link to comment
Dealman Posted May 9, 2014 Share 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 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