Resource:Scores: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(New page: This resource provides kills, deaths, suicides, kill/death ratio and alive/dead status columns. ==Usage== Include "scores" in your resource (this also includes the scoreboard, so you don'...)
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Resource page}}
This resource provides kills, deaths, suicides, kill/death ratio and alive/dead status columns.
This resource provides kills, deaths, suicides, kill/death ratio and alive/dead status columns.


Line 31: Line 32:
<syntaxhighlight lang="lua">bool updateActiveColumns ( )</syntaxhighlight>
<syntaxhighlight lang="lua">bool updateActiveColumns ( )</syntaxhighlight>
Changes the active scoreboard columns according to the resource's current settings.
Changes the active scoreboard columns according to the resource's current settings.
[[ru:Resource:Scores]]

Latest revision as of 14:33, 18 May 2012

This resource provides kills, deaths, suicides, kill/death ratio and alive/dead status columns.

Usage

Include "scores" in your resource (this also includes the scoreboard, so you don't need to do it). From your script, select the columns that you want enabled through the settings system, and then force an update (this is necessary since we don't have settings registry events yet).

Example:

set("scores.kills", true) --enable kills column
set("scores.deaths", true) --enable deaths column
set("scores.self", false) --disable self-kills column
--...
call(getResourceFromName("scores"), "updateActiveColumns")

Keep in consideration that the columns do not have set defaults, so you should explicitly enable or disable all of them.

Columns

kills

deaths

self

ratio

status

Exported functions

Server

bool updateActiveColumns ( )

Changes the active scoreboard columns according to the resource's current settings.