bandi94 Posted August 20, 2011 Share Posted August 20, 2011 1. How can i get all Accounts and one Account Data for all Account's like whit getPlayerAccount.. 1 get account for players who are playing on server but i need all account's on server i find local accounts = getAccounts() --and after whit in pairs do its this correct ? and 2. what is the best mode to save map data/s like time played last played time and more and then om map start thet get curent map and data/s (i don't need a full code only function names or to explain how to do) Thanks in advantage Link to comment
bandi94 Posted August 20, 2011 Author Share Posted August 20, 2011 i know getAccountData but first you need to get the Account and whit getAccount you get accounts for players who is playing on server but i need all account's exist on server like something local accounts=getAccounts() for i,v in pairs(accounts) do data=getAccountData(v) ............ end and whit a gui ... i need to know if this is correct(it will work?) befor i start to do all script Link to comment
AGENT_STEELMEAT Posted August 20, 2011 Share Posted August 20, 2011 To iterate over all the accounts on the server, and to create a table that holds all the account data, do: local accountData = {} for index, account in ipairs(getAccounts()) do accountData[account] = getAccountData(account) end Link to comment
Castillo Posted August 21, 2011 Share Posted August 21, 2011 getAccountData has two required arguments, account, key name: example: local accountData = {} for index, account in ipairs(getAccounts()) do accountData[account] = getAccountData(account, "myData") end 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