Sign in to follow this  
koviak98

[Help] Scoreboard

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

Share this post


Link to post

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

Share this post


Link to post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.