Raised This Month: $ Target: $400
 0% 

help my with fm_find_ent? [class and in radius]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Nightfall1
Senior Member
Join Date: Aug 2008
Old 04-29-2011 , 07:26   help my with fm_find_ent? [class and in radius]
Reply With Quote #1

PHP Code:
#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
#define fm_find_ent_in_sphere(%1,%2,%3) engfunc(EngFunc_FindEntityInSphere, %1, %2, %3)
 
 
public thisIsPublic(id)
{
    
// Get origin
    
static Float:originF[3]
    
pev(idpev_originoriginF)
 
    new 
ent
    ent 
= -1
    
if((ent fm_find_ent_by_class(ent"func_breakable") | fm_find_ent_in_sphere(entoriginF150.0)) != 0)
    {
        
client_print(0print_center"HIT:%d"ent//- dev only
    
}

client_print worck but is not work for corect entity
the point is i need to find a class and find is in range
I also tried
PHP Code:
stock Float:fm_entity_range(ent1ent2) { 
 new 
Float:origin1[3], Float:origin2[3
 
pev(ent1pev_originorigin1
 
pev(ent2pev_originorigin2
 
 return 
get_distance_f(origin1origin2

__________________
SIGNATURE

Last edited by Nightfall1; 04-29-2011 at 07:29.
Nightfall1 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 04:27.


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