What is your goal? Change the player nametag (not name, but nametag) for different players?
Changing the name's color is currently impossible, but the nametag is now changeable.
Putting this in a mod
should make admins have a red nametag.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local admins = {"amadin"}
minetest.register_on_joinplayer(function(player)
for _, n in pairs(admins) do
if player:get_player_name() == n then
player:set_nametag_attributes({color = "red"})
break
end
end
end)