Raised This Month: $ Target: $400
 0% 

Heal When Not Moving?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-03-2009 , 09:23   Re: Heal When Not Moving?
Reply With Quote #5

PHP Code:
new g_MaxPlayers;

public 
plugin_init() 
{
    
g_MaxPlayers get_maxplayers();
    
    
set_task1.0 "CheckMoving" 1029 __"b" );
}

public 
CheckMoving()
{
    static 
iStillCounter[33];
    static 
FloatfVelocity[3];
    static 
id;
    
    for ( 
id id <= g_MaxPlayers id++ )
    {
        if ( 
is_user_aliveid ) )
        {
            
pevid pev_velocity fVelocity );
    
            if ( 
fVelocity[0] || fVelocity[1] || fVelocity[2] )
            {
                
client_printid print_chat "You are moving" );
                
                
iStillCounter[id] = 0;
            }
            else
            {
                
client_printid print_chat "You are standing still" );
                
                if ( ++
iStillCounter[id] >= )
                {
                    
client_printid print_chat "Give health" );
                }
            }
        }
    }

__________________

Last edited by Bugsy; 06-04-2009 at 09:55.
Bugsy is offline
 



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 14:01.


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