Raised This Month: $ Target: $400
 0% 

How to check if entity is in zone?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
GasmoN
Member
Join Date: Jul 2014
Old 03-12-2018 , 13:03   Re: How to check if entity is in zone?
Reply With Quote #6

I have no idea how to do this.

EDIT: This is what i tried.

PHP Code:
is_user_in_zone(idi)
{
    new 
Float:fOrigin[3];
    
pev(idpev_originfOrigin)

    for(new 
iiMAXENTSi++)
    {
        
pev(g_iOwnedEnt[i], pev_originfOrigin);
        
        if(
g_flZoneMin[i][0] <= fOrigin[0] <= g_flZoneMax[i][0] && g_flZoneMin[i][1] <= fOrigin[1] <= g_flZoneMax[i][1] && g_flZoneMin[i][2] <= fOrigin[2] <= g_flZoneMax[i][2]) 
        {
            
engfuncEngFunc_SetOriginiFloat:{ 0.00.00.0 } );
            
CheckEnt true
        
}
        else
        {
            
CheckEnt false
        
}
    }

    return 
CheckEnt;


Last edited by GasmoN; 03-12-2018 at 13:06.
GasmoN 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 20:26.


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