Hi.
I have a question.
Code:
PHP Code:
#define is_user_valid_alive(%1) (1 <= %1 <= g_maxplayers && is_user_alive(id))
register_forward(FM_Think, "fw_Think")
public fw_think(entity)
{
static classname[32], model[64]
pev(entity, pev_classname, classname, charsmax(classname))
if(equal(classname, "bad_zone"))
{
new e = -1
new Float:ent_origin[3]
pev(entity, pev_origin, ent_origin)
while((e = find_ent_in_sphere(e, ent_origin, 200.0)) != 0)
{
pev(e, pev_model, model, charsmax(model))
if(equal(model, "models/balls/w_ball3.mdl")) break;
if(!is_user_valid_alive(e)) continue;
// ...
}
set_pev(entity, pev_nextthink, get_gametime() + 0.1)
}
}
Why the while works for the players when the entity that the model has it's inside the radio ?
Thanks in advanced.