Resource:Scoreboard: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Updated TODO)
m (redirecting to the resource that's currently used as a scoreboard)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
__NOTOC__
#REDIRECT [[Resource:dxscoreboard]]
The scoreboard displays connected players, teams, pings and other data in a gridlist for players ingame. It also has a javascript-enabled web interface, so it can be viewed from a browser.
 
When you add a column to the scoreboard, it's linked to the element data field of the same name, so if you add the "score" column, element data in the field "score" will be shown for all players and teams.
 
==Exported serverside functions==
You can call them from another resource using call():
<syntaxhighlight lang="lua">call(getResourceFromName("scoreboard"), "addScoreboardColumn", "wanted level")</syntaxhighlight>
 
<syntaxhighlight lang="lua">
bool addScoreboardColumn( string columnName )
bool removeScoreboardColumn( string columnName )
bool setScoreboardForced( player thePlayer, bool forced )
table getScoreboardColumns( )
</syntaxhighlight>
 
==Issues/TODO==
*There's no way to scroll the scoreboard yet
*Columns are not added in the correct order
*Scoreboard data for web listing is being sent all at once, should allow sending of separate chunks

Latest revision as of 11:09, 18 May 2012