Jump to content

[Help] Scoreboard


koviak98

Recommended Posts

Hi :) I started a few days ago lua scripting, my first project is an scoreboard. But i have an issue. I can't test my job, because don't have enought players on my custom server. I can join from my laptop, but this is just 2 player ( my pc and laptop). My question, that how can i set scoreboard bots (just a few, example 10) for the test? :)

Edited by koviak98
Link to comment

Use loop

As example:

function updateScoreboard()
  scoreboard = {}
  for _, player in ipairs(getElementsByType("player")) do
    if not getPlayerTeam(player) then
      for n = 1, 10 do
        table.insert(scoreboard, {"player", player})
      end
    end
end

 

Edited by SaNoR
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...