• How to get every value of a table separately?
    3 replies, posted
Hello, so I want to list the players of a specific team (job) with draw.SimpleText. I can get a table of the players in the team with  team.GetPlayers( TEAM_CITIZEN ), but then I can't draw it with draw.SimpleText in separate lines. So how can I get one value of the table for one line?
Try looping through the players and getting their team like this: for k, v in ipairs(player.GetAll()) do print(team.GetName(v:Team())) end
local table = team.GetPlayers( TEAM_CITIZEN ) print(table[1]) table[1] returns the first position of the table. the first value. [2] would give the second obviously
Thank you very much for your answers!
Sorry, you need to Log In to post a reply to this thread.