Ulysses

General => Developers Corner => Topic started by: Poseidon on January 25, 2015, 04:03:46 AM

Title: Deathrun Scoreboard colours by rank
Post by: Poseidon 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
Title: Re: Deathrun Scoreboard colours by rank
Post by: Avoid 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 )