Jump to content

get all players account data


Grievous

Recommended Posts

Does anyone know how to get and set all players account data?

function PayAllJobs ( player )
alivePlayers = getAlivePlayers ()
    if ( alivePlayers ) then
    alivePlayersList = "none"
      for playerKey, playerValue in ipairs(alivePlayers) do
         if ( alivePlayersList == "none" ) then
            alivePlayersList = getPlayerName ( playerValue )
        else
            PayJobExp(alivePlayers)
          outputChatBox ( "Alive Players: " .. alivePlayersList )    
            setAccountData ( account, "exp." ..theTeam, JobExp + 1 )
            end
        end
    end
   
end
function startGameDay( hour, minute )
    -- set the time first
    setTime ( 0, 0 )
    
setTimer ( PayAllJobs, 10000, 1 )
end
addEventHandler("onResourceStart",getResourceRootElement(getThisResource()),startGameDay)

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...