Raised This Month: $ Target: $400
 0% 

ClipBlock


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ex3cuTioN
Member
Join Date: May 2010
Old 07-26-2010 , 09:25   Re: ClipBlock
Reply With Quote #1

That's soo nice, but i really don't understand nothing from the .sma

PHP Code:
InsideZoneorigin[] )
{
    new 
ijnInsideIdx = (-1)
    new 
bool:bInsidePoint[3] = false

    
for( 0g_nNumLoadedZones*2i+=)
    {
        for( 
03j++ )
        {
            if( 
g_nZonePoints[i][j] < g_nZonePoints[i+1][j] )
            {
                if( (
g_nZonePoints[i][j]-1) <= origin[j] <= (g_nZonePoints[i+1][j]+1) )
                    
bInsidePoint[j] = true
            
}else
            {
                if( (
g_nZonePoints[i+1][j]-1) <= origin[j] <= (g_nZonePoints[i][j]+1) )
                    
bInsidePoint[j] = true
            
}
        }

        if( 
bInsidePoint[0] && bInsidePoint[1] && bInsidePoint[2] )
        {
            
nInsideIdx = (2)
            break
        }else 
bInsidePoint[0] = bInsidePoint[1] = bInsidePoint[2] = false
    
}

    return 
nInsideIdx

Ex3cuTioN is offline
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 07-26-2010 , 09:43   Re: ClipBlock
Reply With Quote #2

Quote:
Originally Posted by Ex3cuTioN View Post
That's soo nice, but i really don't understand nothing from the .sma

PHP Code:
InsideZoneorigin[] )
{
    new 
ijnInsideIdx = (-1)
    new 
bool:bInsidePoint[3] = false

    
for( 0g_nNumLoadedZones*2i+=)
    {
        for( 
03j++ )
        {
            if( 
g_nZonePoints[i][j] < g_nZonePoints[i+1][j] )
            {
                if( (
g_nZonePoints[i][j]-1) <= origin[j] <= (g_nZonePoints[i+1][j]+1) )
                    
bInsidePoint[j] = true
            
}else
            {
                if( (
g_nZonePoints[i+1][j]-1) <= origin[j] <= (g_nZonePoints[i][j]+1) )
                    
bInsidePoint[j] = true
            
}
        }

        if( 
bInsidePoint[0] && bInsidePoint[1] && bInsidePoint[2] )
        {
            
nInsideIdx = (2)
            break
        }else 
bInsidePoint[0] = bInsidePoint[1] = bInsidePoint[2] = false
    
}

    return 
nInsideIdx

If you retrieve the origins of the beginning of the tunnel, you can use that:

PHP Code:
if( InsideOriginOrigin ) )
{
     
//whatever

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
Reply



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


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