I was bored and decided to fulfil someones request. So I give you [B]"Player Title"[/B]. With this you can set your title(description or what ever) and it will display above your head for other players. It also displays your name.
Your title is saved to a file on the server, so you don't have to set your title every time you join. Administrators have the ability to set other players title.
You can set your own title with "!settitle text" in chat and "!settitleadmin playername text" to set it for others, if you are an admin in the server.
[img]http://www.garrysmod.org/img/dl/47890_1.jpg[/img]
[img]http://www.garrysmod.org/img/dl/47890_2.jpg[/img]
[url=http://www.garrysmod.org/downloads/?a=view&id=47890][img]http://www.garrysmod.org/img/?t=dll&id=47890[/img][/url]
Enjoy!
simple :)
It is simple, actually. :)
Can you set your own title?
This idea was from SAT right?
Yeah SAT/Citrus has something like this, too. It's from a request.
You can set your own title with "!settitle" in chat. And "!settitleadmin playername" for other players.
Looks good. I'll ask about adding it to a couple of servers I like.
Nice job, I tried doing this myself but failed :4chan:
Could you add this ?
"The title of a player is displayed in front of it's name in chat, <title>Playername"
I would have to remake the chat box. And it would look shitty if the player had a long title.
Simple, but pretty nice. Might I suggest added a "shadow" to the text so it's easier to read against certain backgrounds?
[QUOTE=Aska49]Simple, but pretty nice. Might I suggest added a "shadow" to the text so it's easier to read against certain backgrounds?[/QUOTE]
You'll be surprised when you see my somewhat overcomplicated code.
Hm yes, the shadow is a good idea.
[b]Yeah this is so complicated.[/b]
[lua]
self = LocalPlayer()
surface.CreateFont( "Arial", 14, 400, true, false, "ESPSmall" )
function DoESP( )
for _, pl in pairs(player.GetAll()) do
local pos = pl:GetPos()
local mypos = self:GetPos()
local size = ScrW() * 0.02
pos.z = pos.z + 80
pos = pos:ToScreen()
if pl:Team() == self:Team() then
if pl:Alive() then
if (math.floor(pl:GetPos():Distance(mypos)) <= 1500) then
draw.SimpleText(pl:Name(), "ESPSmall", pos.x, pos.y + size + 10, Color(50,255,50,150), TEXT_ALIGN_CENTER)
draw.SimpleText("Health: "..pl:Health(), "ESPSmall", pos.x, pos.y-10 + size + 30, Color(50,255,255,150), TEXT_ALIGN_CENTER)
end
end
end
if pl:Team() != self:Team() then
if pl:Alive() then
if (math.floor(pl:GetPos():Distance(mypos)) <= 1500) then
draw.SimpleText(pl:Name(), "ESPSmall", pos.x, pos.y + size + 10, Color(255,50,50,150), TEXT_ALIGN_CENTER)
draw.SimpleText("Health: "..pl:Health(), "ESPSmall", pos.x, pos.y-10 + size + 30, Color(50,255,255,150), TEXT_ALIGN_CENTER)
end
end
end
end
end
hook.Add("HUDPaint","ESP",DoESP)
[/lua]
Also it looks nicer...
Oh, and here's how you find them druglabs in RP Mods
[lua]
self = LocalPlayer()
surface.CreateFont( "Arial Bold", 35, 400, true, false, "PropESP" )
function PropESP()
for _, ent in pairs(ents.GetAll()) do
local pos = ent:GetPos()
local model = ent:GetModel()
local mypos = self:GetPos()
if (ent:GetModel()=="models/props_combine/combine_mine01.mdl") then
pos = pos:ToScreen()
draw.SimpleText("+" , "PropESP", pos.x, pos.y, Color(255,255,255,200), TEXT_ALIGN_CENTER)
draw.SimpleText(""..math.floor(ent:GetPos():Distance(mypos)), "ESPSmall", pos.x, pos.y-5, Color(255,255,255,200), TEXT_ALIGN_CENTER)
end
end
end
hook.Add("HUDPaint","PropESP",PropESP)
[/lua]
And I said this is complicated when...? Seriously... Atleast give a working example before braging..
[QUOTE=Nevec]Yeah SAT/Citrus has something like this, too. It's from a request.
You can set your own title with "!settitle" in chat. And "!settitleadmin playername" for other players.[/QUOTE]
Is this admin only or can players set their own title? I want to be a dick with this. :v:
[b]Edit:[/b]
[QUOTE=haloshadow][b]Yeah this is so complicated.[/b][/QUOTE]
Calm down, dude, he said it was simple. All he meant was that he could have simplified it even more if he tried. He said over-complicated. Not complicated.
[QUOTE=jockmo42]Is this admin only or can players set their own title? I want to be a dick with this. :v:[/QUOTE]
Players can change their own title. But admins can change other players title. I'm going to make the first bit optional when I feel like working on it.
If an admin sets an players title, can the player just change it again?
The title the admin set should override, imo.
Good idea. I'll add that.
[QUOTE=FPtje]simple :)[/QUOTE]
But fun, hopefully he didn't implement this atrociously.
I use the 'Name Tag' addon on my build server. It displays name, player status, avatar and team color. Very useful.
However, you cannot display your own message. So this thing is pretty cool.
where did you get the bots from?
[QUOTE=StarGateSG1]where did you get the bots from?[/QUOTE]
type in sv_cheats 1 in console, then type in bot. This require that you're on multiplayer.
Edit:
shit, bump...
[b]A short question:[/b] If the player choose not to enter a personal message/description, will the name still be displayed above their heads?
Ofcourse :)
Anyway I can make there name and there title disappear after a certain distance? Interesting seeing people across the map on flatgrass.
I'm no longer supporting this. An updated player title script will be in my upcoming management system. I believe nametags has the fading feature.
Looks good!
Download link gone =[ Please Reupload
Reupload?
I'll try to release a revamped version tomorrow.
Awesome, thanks :3:
Sorry, you need to Log In to post a reply to this thread.