Here's simple stock for it
PHP Code:
stock is_origin_in_cube( Float:origin[3], Float:cubeorigin[3], Float:mins[3], Float:maxs[s] )
{
static a, c
for( a = 0; a < 3; a++ )
{
if( origin[a] > cubeorigin[a] + maxs[a] ) return 0
if( origin[a < cubeorigin[a] + mins[a] ) return 0
}
return 1
}
using:
PHP Code:
static Float:o[3] // player origin
pev( id, pev_origin, o )
static Float:o2[3] // cube origin ( I wont be setting cube origin so it will be in the middle )
static mins[3], maxs[3]
mins[0] = -10.0 // box x min side
mins[1] = -10.0 // box y min side
mins[2] = 0.0 // box z min side
maxs[0] = 10.0 // box x max side
maxs[1] = 10.0 // box y max side
maxs[2] = 20.0 // box z max side
// box size will be 20.0
if( is_origin_in_cube( o, o2, mins, maxs) ) // is inside the cube