<commit_before>--[[
********************************************************************************
	Project owner:		RageQuit community
	Project name: 		GTW-RPG
	Developers:   		Mr_Moose

	Source code:		https://github.com/GTWCode/GTW-RPG/
	Bugtracker: 		http://forum.404rq.com/bug-reports/
	Suggestions:		http://forum.404rq.com/mta-servers-development/

	Version:    		Open source
	License:    		BSD 2-Clause
	Status:     		Stable release
********************************************************************************
]]--

local x,y = guiGetScreenSize()
function update_nametags()
	for k,v in pairs(getElementsByType("player")) do
		if v ~= localPlayer and getPlayerTeam(v) then
			local r,g,b = getTeamColor(getPlayerTeam(v))
			local x1,y1,z1 = getElementPosition(localPlayer)
			local x2,y2,z2 = getElementPosition(v)
			local visibleto = getDistanceBetweenPoints3D(x1,y1,z1,x2,y2,z2)
			if visibleto < 10 and getElementData(localPlayer, "isLoggedIn") then
				local sx,sy = getScreenFromWorldPosition(x2,y2,z2+0.4)
				if sx and sy and not getElementData(v, "anon") and getElementInterior(v) == getElementInterior(localPlayer) and<commit_msg>[Patch] Disable default nametags before rendering custon tags<commit_after>--[[
********************************************************************************
	Project owner:		RageQuit community
	Project name: 		GTW-RPG
	Developers:   		Mr_Moose

	Source code:		https://github.com/GTWCode/GTW-RPG/
	Bugtracker: 		http://forum.404rq.com/bug-reports/
	Suggestions:		http://forum.404rq.com/mta-servers-development/

	Version:    		Open source
	License:    		BSD 2-Clause
	Status:     		Stable release
********************************************************************************
]]--

-- Hide default nametag
setPlayerNametagShowing(localPlayer, false)

-- Render the new nametag
local x,y = guiGetScreenSize()
function update_nametags()
	for k,v in pairs(getElementsByType("player")) do
		if v ~= localPlayer and getPlayerTeam(v) then
			local r,g,b = getTeamColor(getPlayerTeam(v))
			local x1,y1,z1 = getElementPosition(localPlayer)
			local x2,y2,z2 = getElementPosition(v)
			local visibleto = getDistanceBetweenPoints3D(x1,y1,z1,x2,y2,z2)
			if visibleto < 10 and getElementData(localPlayer, "isLoggedIn") then
				local sx,sy = getScreenFromWorldPosition(x2,y2,z2+0.4)
				if sx and sy and not getElementData(v, "anon") and getElementInterior(v) == getElementInterior(localPlayer) and
{'fraction_non_alphanumeric': 0.22799836266884976, 'fraction_numerical': 0.022103970528039297, 'mean_word_length': 5.331606217616581, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2216484', 'n_tokens_mistral': 888, 'n_tokens_neox': 804, 'n_words': 167}