Hey
Today I installed broken addon to my server to try if its working (Last addon update something like 5/4 years ago)
Soo I tryed to fix the addon but I could not
The code is (its the cl_nametags.lua)
[QUOTE]include( "autorun/Settings.lua" )
Nametags = {}
surface.CreateFont( NAMETAG_FONT, 14, 700, false, false, NAMETAG_FONT .. "_14" )
surface.CreateFont( NAMETAG_FONT, 12, 500, false, false, NAMETAG_FONT .. "_12" )
function umPlayerJoined( um )
local Ent = um:ReadEntity()
local Str = um:ReadString() // Please don't ask me about this. I don't know why, but this seemed to work. I recieved half entity names and missing things before.
for k,v in pairs( player.GetAll() ) do
//print( "Matching: " .. tostring( v ) .. " == " .. Str )
if ( tostring( v ) == Str ) then
Ent = v
end
end
//print( "Player Joined: " .. tostring( Ent ) .. " - " .. Str )
if ( Ent == LocalPlayer() ) then return end
if ( Nametags[Ent] != nil ) then Nametags[Ent]:Remove() end
Nametags[Ent] = vgui.Create( "Nametag" );
Nametags[Ent]:SetUp( Ent )
end
usermessage.Hook( "Nametags.UpdatePlayers", umPlayerJoined )
[/QUOTE]
Console error
[ERROR] addons/nametags/lua/autorun/client/cl_nametags.lua:21: table index is nil
1. Function - addons/nametags/lua/autorun/client/cl_nametags.lua:21
2. unknown - lua/includes/modules/usermessage.lua:87
[ERROR] addons/nametags/lua/autorun/client/cl_nametags.lua:21: table index is nil
1. Function - addons/nametags/lua/autorun/client/cl_nametags.lua:21
2. unknown - lua/includes/modules/usermessage.lua:87
I will very happy if someone will fix the code for me
(IM SORRY I mistakenly opened the topic on Garry's Mod General Discussion and not on Help & Support my bad)
Sorry, you need to Log In to post a reply to this thread.