If I understand correctly ... the easiest way would be to check point-contents of the players origin when the no-clip expires.
Here's a little demo; add noclip onto yourself and then say /start in chat and then move in and out of boxes, walls, underground, and high in the sky outside of the maps upper boundary.
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Check if Stuck"
#define VERSION "1.0"
#define AUTHOR "bugsy"
public plugin_init()
{
register_plugin( PLUGIN , VERSION , AUTHOR );
register_clcmd( "say /start" , "DoStart" );
}
public DoStart( id )
{
set_task( 0.5 , "Stuck" , id , _ ,_, "b" );
}
public Stuck( id )
{
static Float: fOrigin[ 3 ];
pev( id , pev_origin , fOrigin );
if ( engfunc( EngFunc_PointContents , fOrigin ) == CONTENTS_SOLID )
client_print( id , print_chat , "Stuck in object" );
else
client_print( id , print_chat , "Can move freely" );
}
__________________