Hi, I need to make light, but no light like TE_DLIGHT (ignoring walls, and if too much they are blinking) I need to create real light like in cs_estate (it is on even when I set set_lights("a")). Is possible to create entity or namedentity with properties of original entity class "light"? I think it must be possible, because somehow engine creating this while map loading, metamod has access do engine, modules has access to metamod and plugin(what I try write) has access to module, so how to do it?
PS. I'm not interested about pev_effects of any entity, I know about it but it is exactly like TE_DLIGHT (in working)
I tried this, but...
PHP Code:
new ent=engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"light"))
client_print(0,print_chat,"%d spawned",ent)
set_pev(ent,pev_classname,"light")
new Float:orig[3]={-120.0,-1100.0,-500.0}
entity_set_origin(ent,orig)
orig[0]=-121.0
orig[1]=-1101.0
orig[2]=-501.0
set_pev(ent,pev_absmin,orig)
orig[0]-119.0
orig[1]-1099.0
orig[2]-499.0
set_pev(ent,pev_absmax,orig)
set_pev(ent,pev_targetname,"downstairs")
DispatchKeyValue(ent,"_light","100 100 100 100")
//DispatchSpawn(ent)
client_print(0,print_chat,"%s",is_valid_ent(ent)?"exists":"not exists")
if I uncomment DispatchSpawn entity is removed immediatelly after use (use DispatchSpawn), i know it from print info (exists of not exists)