Code:
void CVisuals::PlayerLights(C_CSPlayer* Entity, int i, Color Color)
{
dlight_t* Light = Interfaces::Effects()->CL_AllocElight(i);
if (!Light)
return;
Light->color.r = Color.GetR();
Light->color.g = Color.GetG();
Light->color.b = Color.GetB();
Light->color.exponent = 10.0f;
Light->radius = 75.0f;
Light->decay = Light->radius / 5.0f;
Light->key = i;
Light->m_Direction = Entity->GetRenderOrigin();
Light->origin = Entity->GetRenderOrigin();
Light->die = Interfaces::GlobalVars()->curtime + 0.05f;
}
i got the code from @
4773n0x and he credited Y3t1y3t
doesnt seem to work its saying, expected a ) on the comma after Entity. (i made entity turn in to an offset because it said entity not declard ex: offset.entitylist)
also says CVisual is not a class or a namespace name (im new to coding)