- --[[---------------------------------------------------------------------------
- Entity HUDPaint things
- ---------------------------------------------------------------------------]]
- -- Draw a player's name, health and/or job above the head
- -- This syntax allows for easy overriding
- plyMeta.drawPlayerInfo = plyMeta.drawPlayerInfo or function(self)
- local pos = self:EyePos()
- pos.z = pos.z + 10 -- The position we want is a bit above the position of the eyes
- pos = pos:ToScreen()
- if not self:getDarkRPVar("wanted") then
- -- Move the text up a few pixels to compensate for the height of the text
- pos.y = pos.y - 50
- end
- if GAMEMODE.Config.showname then
- local nick, plyTeam = self:Nick(), self:Team()
- draw.DrawNonParsedText(nick, "DarkRPHUD2", pos.x + 1, pos.y + 1, colors.black, 1)
- draw.DrawNonParsedText(nick, "DarkRPHUD2", pos.x, pos.y, RPExtraTeams[plyTeam] and RPExtraTeams[plyTeam].color or team.GetColor(plyTeam) , 1)
- end
This file has been truncated. show original