Nametags2

Allow objects had nametags with observers, colors and range

API / Library

Download (3 KB)

How do I install this?

Nametags 2 #

Set to the entities a new type of nametag, based on WayPoints and on Observers List, Range (Per block), Color and string style " "

API #

The API is easy to use:

Functions #

  • dnt_api.register_nametag(name_of_nt, definition): Register new nametag
    def = {obj=Object, text="string", range=10, players={Catars=true}, color=0x0}
    name_of_nt = "string, name/id of nametag"
  • dnt_api.insert_player(name_of_nt, player): Add a new player in the nametag
    player = PlayerObj
    name_of_nt = "string, name/id of nametag"
  • dnt_api.update_hard_players(name_of_nt, players): Reset 'nametag' players table and set a new player table
    name_of_nt = "string, name/id of nametag"
    players = {Player1 = true, Player2 = true} --New players table
  • dnt_api.remove_player(name_of_nt, NameObj): Remove a player from 'nametag' players table
    NameObj = PlayerObject or PlayerName
    name_of_nt = "string, name/id of nametag"
  • dnt_api.remove_dynamic_nametag(name_of_nt): Remove nametag
    name_of_nt = "string, name/id of nametag"

Global Tables
There are 3 defined global tables for nametags: #

  • dnametag: This table stores all registered NameTags definitions
  • dnt_api: This table have the API of NameTags
  • dnthud: WayPoint Definition (Used to register NameTags)

How NameTags works #

Nametags works from WayPoints on huds. Every NameTag has WayPoint for each player, that updates on every server step (From Object Pos)

License #

Its MIT

Notes #

  1. This mod may produce lag
  2. This mod updates nametags definition (As Pos, Text and Color) on every server step

Reviews

Review

Do you recommend this mod?

  • No reviews, yet.