This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

No Clip - Stuck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 07-26-2009 , 13:42   Re: No Clip - Stuck
Reply With Quote #1

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_pluginPLUGIN VERSION AUTHOR );
    
register_clcmd"say /start" "DoStart" );
}

public 
DoStartid )
{
    
set_task0.5 "Stuck" id ,_"b" );
}

public 
Stuckid )
{
    static 
FloatfOrigin];
    
pevid pev_origin fOrigin );
    
    if ( 
engfuncEngFunc_PointContents fOrigin ) == CONTENTS_SOLID )
        
client_printid print_chat "Stuck in object" );
    else
        
client_printid print_chat "Can move freely" );

__________________

Last edited by Bugsy; 07-26-2009 at 13:50.
Bugsy is online now
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 15:06.


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