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 tablednt_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 definitionsdnt_api:
This table have the API of NameTagsdnthud:
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
- This mod may produce lag
- This mod updates nametags definition (As Pos, Text and Color) on every server step