Quote:
Originally Posted by Exolent[jNr]
Code:
// set starting entity
new ent = -1;
// this is the center of the sphere that you want to check around
new Float:origin[3];
// the maximum distance away from the origin
new Float:radius = 100.0;
while((ent = find_ent_in_sphere(ent, origin, radius)))
{
// ent is inside "radius" distance to "origin"
}
|
Could you give me an example?
PHP Code:
new ent = -1;
// this is the center of the sphere that you want to check around
new Float:origin[3];
// the maximum distance away from the origin
new Float:radius = 100.0;
while((ent = find_ent_in_sphere(ent, origin, radius)))
{
// ent is inside "radius" distance to "origin"
set_user_health(ent,get_user_health(ent)-50)
Is this is correct?