AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ClipBlock (https://forums.alliedmods.net/showthread.php?t=133517)

Ex3cuTioN 07-26-2010 09:08

ClipBlock
 
Like in mapping when you make a block with texture "clip" it's invisibile and you can not pass.

How can i make a invisibile solid and put it at some origins ?

Eg:I want on map dust2, players not to enter in tunel...

And i saw another thing on a server, when i go in some place under radar says the location.Like in zbot, how can i do that ?

GXLZPGX 07-26-2010 09:12

Re: ClipBlock
 
Quote:

Originally Posted by Ex3cuTioN (Post 1251969)
Like in mapping when you make a block with texture "clip" it's invisibile and you can not pass.

How can i make a invisibile solid and put it at some origins ?

Eg:I want on map dust2, players not to enter in tunel...

And i saw another thing on a server, when i go in some place under radar says the location.Like in zbot, how can i do that ?

http://forums.alliedmods.net/showthr...estricted+Area

Not exactly what you wanted, but something to take a look at. You can use the same method he used to check if a player is going into a tunnel, instead of a restricted area.

xPaw 07-26-2010 09:18

Re: ClipBlock
 
WalkGuard

Ex3cuTioN 07-26-2010 09:25

Re: ClipBlock
 
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



GXLZPGX 07-26-2010 09:43

Re: ClipBlock
 
Quote:

Originally Posted by Ex3cuTioN (Post 1251978)
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



Ex3cuTioN 07-26-2010 11:06

Re: ClipBlock
 
Thanks for the walk guard :D


All times are GMT -4. The time now is 00:12.

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