[hide]Once upon a time I was looking around GameDeception, found a few threads for player dlights by Tetsuo, and I came up with this code.
Code:
static void PlayerLights()
{
cl_entity_t *me = pEngfuncs->GetLocalPlayer();
cl_entity_t *pLocal = pEngfuncs->GetLocalPlayer();
dlight_t *dl = gEngfuncs.pEfxAPI->CL_AllocDlight(0);
hud_player_info_t pinfo;
for(int i = 1; i < 33; i++)
{
if(i == pLocal->index)
continue;
cl_entity_t *ent = pEngfuncs->GetEntityByIndex(i);
if(strstr(pinfo.model, "arctic"), strstr(pinfo.model, "guerilla"), strstr(pinfo.model, "leet"), strstr(pinfo.model, "terror))
{
dl->color.r = 255;
dl->color.g = 50;
dl->color.b = 50;
}
else if(strstr(pinfo.model, "gign"), strstr(pinfo.model, "gsg9"), strstr(pinfo.model, "sas"), strstr(pinfo.model, "urban"), strstr(pinfo.model, "vip"))
{
dl->color.r = 50;
dl->color.g = 50;
dl->color.b = 255;
}
dl->origin = ent->origin;
dl->radius = 50;
dl->die = gEngfuncs.GetClientTime();
}
}
[/hide]