MisterQuestions Posted January 17, 2015 Share Posted January 17, 2015 Hey all, i want to make a scoreboard. Yes...one that could load players, teams, if a player is on a team move it under team row. What do i will need? And how can i start? Link to comment
Bonsai Posted January 17, 2015 Share Posted January 17, 2015 Why don't you just start and come back when you actually have a problem? Link to comment
MisterQuestions Posted January 17, 2015 Author Share Posted January 17, 2015 jeje ok im currently starting... Link to comment
LaCosTa Posted January 17, 2015 Share Posted January 17, 2015 setPlayerTeam bosslorenz why he should use setPlayerTeam?? , he wants to know the player Team name and i guess he knows the function well Link to comment
MisterQuestions Posted January 17, 2015 Author Share Posted January 17, 2015 I think, i need to use: getElementsByType getPlayerName getPlayerTeam getTeamName Sure? Link to comment
Bonsai Posted January 17, 2015 Share Posted January 17, 2015 ... Don't waste your time on this, but more important, don't waste our time. Link to comment
MisterQuestions Posted January 18, 2015 Author Share Posted January 18, 2015 Bonsai, why you always say that i cant? Just if you dont wanna help just ignore my post ... Link to comment
novo Posted January 18, 2015 Share Posted January 18, 2015 Out from this pointless confrontation that you're having over here, I recommend you to begin with the following piece of code: local scoreboard = {data = {}} function scoreboard:generate () local data = {players = {}, teams = {}) for i,v in ipairs(getElementsByType("team")) do data.teams[v] = {} end for i,v in ipairs(getElementsByType("player")) do local team = getPlayerTeam(v) if not team then table.insert(data.players, v) else table.insert(data.teams[team], v) end end self.data = data end Once held all the necessary data on a table, you will simply need to use dx functions whilst looping over it. Link to comment
Bonsai Posted January 18, 2015 Share Posted January 18, 2015 Bonsai, why you always say that i cant? Just if you dont wanna help just ignore my post ... Because its always the same. You ask what functions you have to use. Someone posts them. After that you ask for an example, whatever you mean by that. But it feels like you never actually finish something, considering your skills don't seem to improve at all. I would like to help you, but you always ask this weird questions. You should at least have tried something on your own before you post here, so you can ask about some specific problem. Link to comment
MisterQuestions Posted January 18, 2015 Author Share Posted January 18, 2015 How to make arithmetic with this string? code: function addHeight(extra) extraHeight = extraHeight + extra end addCommandHandler("addh", addHeight) Link to comment
MTA Team botder Posted January 18, 2015 MTA Team Share Posted January 18, 2015 You don't even know some basic Lua functions and try to make a relative complex scoreboard? tonumber Link to comment
MisterQuestions Posted January 18, 2015 Author Share Posted January 18, 2015 o yes thanks 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