View Single Post
Sammy-ROCK!
Senior Member
Join Date: Jun 2008
Location: Near Mrs.Lag
Old 12-07-2008 , 15:56   Re: L4D - Tank Colorer
Reply With Quote #4

Quote:
Originally Posted by SAMURAI16 View Post
instead of creating 4 cvars (sm_tank_colorer_red,sm_tank_colorer_green,sm _tank_colorer_blue,sm_tank_colorer_alpha) I suggest you to create one cvar, something like sm_tank_color and to be in this format "r g b alpha"
And you'll use for example sm_tank_color "255 100 255 255"
I tough on it but if you look in the code line 42:
SetEntityRenderColor(TankId, GetConVarInt(Red), GetConVarInt(Green), GetConVarInt(Blue), GetConVarInt(Alpha));
it takes 5 args 1 is the entity and other 4 the int values. If I make it 1 single convar it's more confusing and would take more CPU to separate in 4 ints. So to make it easier and faster I made 4 convars.
Sammy-ROCK! is offline