PHP Code:
public server_frame()
{
new Float:delay
new Float:timer = get_gametime()
if(timer > delay)
{
for(new i; i < 500;i++)
{
if(is_valid_ent(i))
{
new class[33]
entity_get_string(i, EV_SZ_classname, class, 32)
if(equal(class, "weaponbox") || equal(class, "tf_ammobox"))
{
new Float:f_origin[3], i_origin[3]
entity_get_vector(i, EV_VEC_origin, f_origin)
f_origin[2] += 6.0
i_origin[0] = floatround(f_origin[0])
i_origin[1] = floatround(f_origin[1])
i_origin[2] = floatround(f_origin[2])
for(new plr; plr < 32; plr++)
{
if(is_user_connected(plr) && is_visible_origin(plr , f_origin) && is_in_viewcone(plr, f_origin, 1))
{
set_dynamic_light2(plr, i_origin, 6, 20, 200, 20, 1, 0)
}
}
}
}
}
delay = timer + 1.0
}
}
Sorry about my late reply. Got caught up in other things.
__________________