Raised This Month: $ Target: $400
 0% 

find_ent_in_sphere problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
dutchmeat
Senior Member
Join Date: Sep 2006
Old 11-13-2006 , 05:19   Re: find_ent_in_sphere problem
Reply With Quote #2

Something like this?:

Code:
public test(id){
   new Float:vOrigin[3]; //get my origin
   entity_get_vector( id, EV_VEC_origin, vOrigin ); 
   new Radius = 100.0
  while((ent = find_ent_in_sphere(id, vOrigin, Radius)) != 0)
    {
        if(!is_user_alive(ent) || ent == id)
        {
            return 0
        }
        else
        {
 
            //Do the stuff if a player was found
            explosion(ent)     // create an explosion on each found entity.
        }
    }
}
public explosion (id){ 
   new startloc[3] 
   get_user_origin(id,startloc)
   message_begin( MSG_ALL, get_user_msgid("Explosion"), {0,0,0} ,id); 
   write_coord(startloc[0])
   write_coord(startloc[1])
   write_coord(startloc[2]) 
   write_long(500) 
   write_byte(5) 
   message_end() 
}

Last edited by dutchmeat; 11-13-2006 at 05:30.
dutchmeat is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode