Hello. So I am trying to light an entity without adding lights outside of it. Everytime I execute this the server crashes. Any ideas? I can confirm that the entity is valid.
Code:
public lights_task(ent)
{
static Float:origin[3];
static iOrigin[3];
pev(ent, pev_origin, origin)
FVecIVec(origin, iOrigin)
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte(TE_ELIGHT)
write_coord(iOrigin[0]); // x
write_coord(iOrigin[1]); // y
write_coord(iOrigin[2]); // z
write_coord(50); // radius
write_byte(255); // r
write_byte(0); // g
write_byte(0); // b
write_byte(25); // life <<<<<<<<
write_coord(0); // decay rate
message_end()
set_task(1.0, "lights_task", ent)
}