Optimized way, you cannot change the color or the radius, to disable it change EF_BRIGHTLIGHT to 0:
PHP Code:
entity_set_int( Client, EV_INT_effects, EF_BRIGHTLIGHT );
Less optimized way, calls every so often to reset because the "TE" are temporary not infinite, but u can edit the color and radius:
PHP Code:
set_task( 0.1, "fxLight", Client, _, _, "b" );
public fxLight( Client )
{
MakeLight( Client, 20, 255, 0, 0, 300, 10 );
}
stock MakeLightTormenta( Client, Radius, R, G, B, Life, Decayrate );
{
new Float:__fl_Origin[3];
entity_get_vector( Client, 0, __fl_Origin );
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(TE_DLIGHT) // 27
write_coord_f(__fl_Origin[0]) // x
write_coord_f(__fl_Origin[1]) // y
write_coord_f(__fl_Origin[2]) // z
write_byte(Radius) // radius
write_byte(R) // Red
write_byte(G) // Green
write_byte(B) // Blue
write_byte(Life) // life
write_byte(Decayrate) // decay rate
message_end()
}
You can remove it with remove_task( Client );