Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/02/24 in all areas

  1. I want to get a data from all accounts on the server, but i get this warning: 'getAccount' [Expected string at argument 1, got account] 'getAccountData' [Expected account at argument 1, got boolean] this is my code: for i, v in pairs(getAccounts()) do names = getAccountData(getAccount(v), "acc:nickname") end outputChatBox(names) What wrong?
    1 point
  2. Well you have to do it like this addCommandHandler('getdata',function(player,commandName) local playersData = {} local accounts = getAccounts() if player then for k,account in ipairs(accounts) do playersData[k] = getAccountData(account,"acc:nickname") end outputChatBox(tostring(inspect(playersData)),player) end end,false,false)
    1 point
×
×
  • Create New...