[HELP] Bot Renaming

Sup, Zombie again,
was feeling bored and thought why not spice bot names up a bit, so i wrote this


function ChangeBotName( ply )
	if not ply:IsBot() then return end

		for k,v in pairs(player.GetBots()) do 
			v:SetName("Bob the Tester") 
		end

end
hook.Add("PlayerInitialSpawn", "ChangeBotName", ChangeBotName)

the problem is that it doesn’t work, and i have no idea what could be wrong.

all help welcome, thanks in advance

SetName doesn’t set the actual “Nick” of the bot. SetName sets the entity name, which can be obtained using GetName.

so what do you suggest ? this doesn’t work either


function ChangeBotName( ply )
	if not ply:IsBot() then return end

		for k,v in pairs(player.GetBots()) do 
			v:Nick("Bob the Tester")
                                   --or--
			v:Nick() = "Bob the Tester"
		end

end
hook.Add("PlayerInitialSpawn", "ChangeBotName", ChangeBotName)

[LUA]
local meta = FindMetaTable( “Player” )

local oldn = meta.Nick
function meta:Nick()
if self:IsBot() then return “Bob the Tester” end
return oldn( self )
end
[/LUA]

alright,this is good now,


Client "Bob the Tester" spawned in server (BOT)<BOT>.

but i still see “bot01” in my scoreboard, ulx menu and console command “status”, is it possible to change those value’s to ?

Do the same but on the client.

alright that fixed it for ULX, now “status”

You can’t do it for ‘Status’ as that’s a source engine command.

ah that sucks

Alternatively, you may be interested in this feature in the next update.
http://forum.facepunch.com/showthread.php?t=1374457&p=44951315&viewfull=1#post44951315