its a model. I add the model on top of the candle where the flame is and set it's light property.

I use the following codes.
Code:
function candleflame()
{
	set(my, PASSABLE);
	set(my, INVISIBLE); //set model to invisible
	set(my, LIGHT);
	vec_set(my.blue,vector(255,255,255)); //set light to white
	my.lightrange = 200;

}

//attached to the candle action
ent_create ("nothing.mdl", vector(my.x,my.y,my.z+17), candleflame);



Just not sure why it does that.