so far i've got this and everything is working as intended, when i use affect function on entity it becomes inactive and colored in RED colour.
PHP Code:
public affect(ent,button)
{
if(button != 1)
{
g_trapstate[button] = true
}
g_trapstate[ent] = true
new temp_trap[2]
temp_trap[0] = ent
temp_trap[1] = button
set_task(get_pcvar_float(cvar_time), "enable", 0, temp_trap, 2)
set_pev(ent, pev_renderfx, 0)
set_pev(ent, pev_renderamt, 200.0)
set_pev(ent, pev_rendercolor, 255.0, 0.0, 0.0)
set_pev(ent, pev_rendermode, 1)
}
However, for example when I change the pev_rendercolor line to any other color, in game it just won't show the right color.. it will just fade black.
So, basically the code below is working :
PHP Code:
set_pev(ent, pev_rendercolor, 255.0, 0.0, 0.0)
and this one isnt working
PHP Code:
set_pev(ent, pev_rendercolor, 0.0, 0.0, 255.0)
What could be wrong?