go to the EndScene hook and write there:
static auto mat_ambient_light_r = g_CVar->FindVar("mat_ambient_light_r");
static auto mat_ambient_light_g = g_CVar->FindVar("mat_ambient_light_g");
static auto mat_ambient_light_b = g_CVar->FindVar("mat_ambient_light_b");
Then go to your config.h and...