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 ?
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.
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
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