• Getting individual color values from team.GetColor(ply:team())
    3 replies, posted
What I want to achieve: As you get closer to a player, their name fades in. That's it. What the problem is: Everything else fades normally, that's no problem. My issue is with the teams. Players, when they speak or when you view them normally, have colored text matching their team color. I need to extract that information easily into four separate numbers: R, G, B, and A. What I tried: [CODE]local r, g, b, a = team.GetColor(ply:Team())[/CODE] When I try to use any of those variables, they come out as tables that are always changing, and not individual numbers. Can anyone help? This is for tweaking DarkRP, by the way. Any help with this would be greatly appreciated. Thank you!
[code]local col = team.GetColor(ply:Team()) local r, g, b, a = col.r, col.g, col.b, col.a[/code]
Awesome, thanks a lot! :)
To be honest, you don't need the local variables r, g, b and a. You could just use col.r instead of r etc.
Sorry, you need to Log In to post a reply to this thread.