Author Topic: Deathrun Scoreboard colours by rank  (Read 2218 times)

0 Members and 1 Guest are viewing this topic.

Offline Poseidon

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
Deathrun Scoreboard colours by rank
« on: January 25, 2015, 04:03:46 AM »
Im not that good with LUA and stuff  so i was looking on how to make it so your name is the same colour as the rank.

EG. I would like to make creator blue on the scoreboard and mod green

Currently it gives a basic yellow colour to any rank based on superadmin

I would appreciate help on this please

Offline Avoid

  • Full Member
  • ***
  • Posts: 142
  • Karma: 42
Re: Deathrun Scoreboard colours by rank
« Reply #1 on: January 25, 2015, 06:02:00 AM »
Hello,
take a look into 'hook_examples.lua' in the gamemode folder:

Code: [Select]
hook.Add( "GetScoreboardNameColor", "Name Color Example", function( ply )

if ply:IsUserGroup( "vip" ) then -- If the player is in the "vip" group
return Color( 255, 0, 0, 255 ) -- give the player a red name.
end

end )