koviak98 Posted March 19, 2019 Share Posted March 19, 2019 (edited) 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 March 19, 2019 by koviak98 Link to comment
Moderators Patrick Posted March 19, 2019 Moderators Share Posted March 19, 2019 answered in Link to comment
SaNoR Posted March 19, 2019 Share Posted March 19, 2019 (edited) 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 March 19, 2019 by SaNoR Link to comment
Discord Moderators Pirulax Posted March 20, 2019 Discord Moderators Share Posted March 20, 2019 Just create some peds, insert them into the table, and thats it. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now