Raised This Month: $32 Target: $400
 8% 

[INFO] Fakemeta & Ham detailed function descriptions and examples


Post New Thread Reply   
 
Thread Tools Display Modes
AlexALX
Senior Member
Join Date: Apr 2009
Old 09-08-2010 , 17:24   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #171

Quote:
int UTIL_EntitiesInBox( CBaseEntity **pList, int listMax, const Vector &mins, const Vector &maxs, int flagMask )
{
edict_t *pEdict = g_engfuncs.pfnPEntityOfEntIndex( 1 );
CBaseEntity *pEntity;
int count;

count = 0;

if ( !pEdict )
return count;

for ( int i = 1; i < gpGlobals->maxEntities; i++, pEdict++ )
{
if ( pEdict->free ) // Not in use
continue;

if ( flagMask && !(pEdict->v.flags & flagMask) ) // Does it meet the criteria?
continue;

if ( mins.x > pEdict->v.absmax.x ||
mins.y > pEdict->v.absmax.y ||
mins.z > pEdict->v.absmax.z ||
maxs.x < pEdict->v.absmin.x ||
maxs.y < pEdict->v.absmin.y ||
maxs.z < pEdict->v.absmin.z )
continue;

pEntity = CBaseEntity::Instance(pEdict);
if ( !pEntity )
continue;

pList[ count ] = pEntity;
count++;

if ( count >= listMax )
return count;
}

return count;
}
What is this?

Last edited by AlexALX; 09-08-2010 at 17:31.
AlexALX is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-08-2010 , 17:35   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #172

It searches entities in a box.

PHP Code:
int UTIL_EntitiesInBoxCBaseEntity **pListint listMax, const Vector &mins, const Vector &maxsint flagMask )
{
    
edict_t        *pEdict g_engfuncs.pfnPEntityOfEntIndex);
    
CBaseEntity *pEntity;
    
int            count;

    
count 0;

    if ( !
pEdict )
        return 
count;

    for ( 
int i 1gpGlobals->maxEntitiesi++, pEdict++ )
    {
        if ( 
pEdict->free )    // Not in use
            
continue;
        
        if ( 
flagMask && !(pEdict->v.flags flagMask) )    // Does it meet the criteria?
            
continue;

        if ( 
mins.pEdict->v.absmax.||
             
mins.pEdict->v.absmax.||
             
mins.pEdict->v.absmax.||
             
maxs.pEdict->v.absmin.||
             
maxs.pEdict->v.absmin.||
             
maxs.pEdict->v.absmin.)
             continue;

        
pEntity CBaseEntity::Instance(pEdict);
        if ( !
pEntity )
            continue;

        
pListcount ] = pEntity;
        
count++;

        if ( 
count >= listMax )
            return 
count;
    }

    return 
count;

__________________
Arkshine is offline
AlexALX
Senior Member
Join Date: Apr 2009
Old 09-08-2010 , 18:02   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #173

I was pretty strange that there's no this function in amxmodx, but here, too, checking through absmun absmax and not suitable to me.
AlexALX is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 09-08-2010 , 18:41   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #174

Quote:
None of these functions makes it impossible to check a player to be SOLID_NOT in the trigger or not. EngFunc_FindEntityInSphere find entity with absmin absmax and not suitable for the purpose of determining in entite (if few Brashes as one entity). EngFunc_TraceLine and etc do not detect triggers (and solid_not).
It doesn't matter if your entity has the SOLID_NOT flag, EngFunc_FindEntityInSphere whill find your entity and doesn't work like you said. Did you tried at least the function ??!
__________________
Arkshine is offline
Old 09-08-2010, 19:01
Seta00
This message has been deleted by Seta00. Reason: >_>
AlexALX
Senior Member
Join Date: Apr 2009
Old 09-09-2010 , 10:28   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #175

Quote:
Originally Posted by Arkshine View Post
It doesn't matter if your entity has the SOLID_NOT flag, EngFunc_FindEntityInSphere whill find your entity and doesn't work like you said. Did you tried at least the function ??!
EngFunc_FindEntityInSphere find method - pev_absmin pev_absmax, and when 2 brash add to one entity - have bug... see test map for my plugin [DeathRun] Triggers & Entites Fix v1.1.1 [UPDATE 09/09/10]
AlexALX is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 09-09-2010 , 10:54   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #176

This thread should be made as a sticky becoz of its importance
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-09-2010 , 19:23   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #177

@ot_207

http://forums.alliedmods.net/showthr...473#post913473

PHP Code:
ExecuteHamB(Ham_TraceAttackattackerhitdamagedirectionptrDMG_NEVERGIB DMG_BULLET
That wont be...

PHP Code:
ExecuteHamB(Ham_TraceAttackhitattackerdamagedirectionptrDMG_NEVERGIB DMG_BULLET
?
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 09-09-2010 , 22:39   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #178

You're right Metalicross
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 09-09-2010 , 23:47   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #179

Quote:
Originally Posted by joropito View Post
You're right Metalicross
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS is offline
ot_207
Veteran Member
Join Date: Jan 2008
Location: Romania The Love Country
Old 09-16-2010 , 20:04   Re: [INFO] Fakemeta & Ham detailed function descriptions and examples
Reply With Quote #180

Quote:
Originally Posted by Seta00 View Post
http://wiki.alliedmods.net/FakeMeta_...d_Descriptions

Please do not mess with the page. Contribute only if you know what are you doing.
I like it. Thanks a lot!!!

Quote:
Originally Posted by meTaLiCroSS View Post
Crabs for you too. Fixed and thanks!
__________________
My approved plug-ins | Good for newbies! | Problems?

Back, will come around when I have time.
ot_207 is offline
Reply


Thread Tools
Display Modes

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 12:05.


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