If you want to emit light from an entity, you can set some flag on it, I think it's pev_effects. However, I don't think you can change the color of this light.
Otherwise, you can always use this:
Code:
#define TE_DLIGHT 27 // Dynamic light, effect world, minor entity effect
// write_byte(TE_DLIGHT)
// write_coord(position.x)
// write_coord(position.y)
// write_coord(position.z)
// write_byte(radius in 10's)
// write_byte(red)
// write_byte(green)
// write_byte(blue)
// write_byte(brightness)
// write_byte(life in 10's)
// write_byte(decay rate in 10's)
__________________