How would this be done?
I use .\\Shadow} Deathrun gamemode and have modifying it in the such:
[CODE]
Custom HUD
Custom Leaderboard
Custom Death/Player Models
Shop
Custom Sounds[/CODE]
I know how to do all that, but how do I make a rounded box over a players head that EVERYONE see's that says something like ADMIN.
Would a plugin do this or do I have to customize the gamemode?
If so how and what file do I edit?
-Thanks the Lua Noob-
[editline]5th September 2013[/editline]
Sorry - Double post.
This should draw text over players names, and hopefully allow you to get the gist of what's going on here.
[lua]
function DrawName( ply )
if !ply:Alive() then return end
local offset = Vector( 0, 0, 85 )
local ang = LocalPlayer():EyeAngles()
local pos = ply:GetPos() + offset + ang:Up()
ang:RotateAroundAxis( ang:Forward(), 90 )
ang:RotateAroundAxis( ang:Right(), 90 )
cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 )
draw.SimpleTextOutlined( ply:GetName(), "default", 0, 0, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))
cam.End3D2D()
end
hook.Add( "PostPlayerDraw", "DrawName", DrawName )
[/lua]
[QUOTE=vegasx;42093580]This should draw text over players names, and hopefully allow you to get the gist of what's going on here.
[lua]
function DrawName( ply )
if !ply:Alive() then return end
local offset = Vector( 0, 0, 85 )
local ang = LocalPlayer():EyeAngles()
local pos = ply:GetPos() + offset + ang:Up()
ang:RotateAroundAxis( ang:Forward(), 90 )
ang:RotateAroundAxis( ang:Right(), 90 )
cam.Start3D2D( pos, Angle( 0, ang.y, 90 ), 0.25 )
draw.SimpleTextOutlined( ply:GetName(), "default", 0, 0, Color(255,255,255,255), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color(0,0,0,255))
cam.End3D2D()
end
hook.Add( "PostPlayerDraw", "DrawName", DrawName )
[/lua][/QUOTE]
Worked superbly, thanks.
Sorry, you need to Log In to post a reply to this thread.