Skip to content

Commit

Permalink
typo in a variable name caused the SetMpGamerTagName, `SetMpGamerTa…
Browse files Browse the repository at this point in the history
…gVisibility` and `RemoveMpGamerTag` natives to not function properly and, for some users, would still display the Lambda over head names... oops!
  • Loading branch information
lze3 committed Apr 15, 2019
1 parent 85d968c commit e4df738
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hlabels/c_hlabel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ AddEventHandler('setHeadLabelDistance', function(distance)
end)

function DrawText3D(x, y, z, text)
local onScreen, _x, _y = World3dToScreen2d(x, y, z)
local onScreen, _x, _y = GetScreenCoordFromWorldCoord(x, y, z)
local dist = GetDistanceBetweenCoords(GetGameplayCamCoords(), x, y, z, 1)
local ped_l = PlayerPedId()

Expand Down Expand Up @@ -51,18 +51,18 @@ Citizen.CreateThread(function()
while true do

for id = 0, 255 do
if NetworkIsPlayerActive(id) and iPed ~= lPed then
if NetworkIsPlayerActive(id) --[[ and iPed ~= lPed]] then

local iPed = GetPlayerPed(id) -- indexed ped
local lPed = PlayerPedId() -- local ped
local lPlayer = PlayerId()
if DoesEntityExist(iPed) then
local headLabellId = CreateMpGamerTag(iPed, " ", 0, 0, " ", 0)
SetMpGamerTagName(headLabelId, " ")
SetMpGamerTagVisibility(headLabelId, 0, false)
RemoveMpGamerTag(headLabelId)
local headLabelId = CreateMpGamerTag(iPed, " ", 0, 0, " ", 0)
SetMpGamerTagName(headLabelId, " ")
SetMpGamerTagVisibility(headLabelId, 0, false)
RemoveMpGamerTag(headLabelId)

distance = math.floor(GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), GetEntityCoords(GetPlayerPed(id)), true))
local distance = math.ceil(GetDistanceBetweenCoords(GetEntityCoords(PlayerPedId()), GetEntityCoords(GetPlayerPed(id)), true))
if distance < disPlayerNames then
if not ignorePlayerNameDistance then
if NetworkIsPlayerTalking(id) then
Expand Down

0 comments on commit e4df738

Please sign in to comment.