Raised This Month: $ Target: $400
 0% 

If class x have own hp , grav and etc


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 10-03-2009 , 13:55   If class x have own hp , grav and etc
Reply With Quote #1

If class x have own hp , grav , speed

PHP Code:
    new const ZombieClass[][] = {
    
"0",
    
"1",
    
"2"
    
};

   public 
fw_PlayerPreThink(id
   { 
        if(!
is_user_alive(id)) 
            return 
FMRES_IGNORED
     
        static 
Floatvelocity[3], FloatTime 
        
static buttonflag 
        button 
pev(idpev_button
        
flag pev(idpev_flags
        
Time get_gametime() 
     
        if (
g_zombie[id] && PlayerClass[id] == 0
        { 
            if ( (!
g_infreezetime) && (button IN_DUCK) && (button IN_ATTACK) && (flag FL_ONGROUND)) 
            { 
                    static 
FloatcooldownFloatlheightlforce 
                    cooldown 
get_pcvar_float(cvar_cooldown
                    
lforce get_pcvar_num(cvar_lforce
                    
lheight get_pcvar_float(cvar_lheight
                    if (
Time cooldown g_LastLeap[id]) 
                        {  
                        
emit_sound(idCHAN_ITEMhunter_leap1.0ATTN_NORM0PITCH_NORM); 
                        
set_pev(idpev_buttonbutton & ~IN_ATTACK
                        
velocity_by_aim(idlforcevelocity
                        
velocity[2] = lheight 
                        set_pev
(idpev_velocityvelocity
                        
g_LastLeap[id] = Time 
                        

            } 
        } 
        if (!
g_infreezetime && g_zombie[id] && ZombieClass[id] == 0
        { 
        
set_user_maxspeed(id280.0)
        
set_user_health(id600)
        
set_user_gravity(id0.7)
        } 
        else if (!
g_infreezetime && g_zombie[id] && PlayerClass[id] == 1
        { 
        
set_user_maxspeed(id255.0)
        
set_user_health(id700)
        
set_user_gravity(id0.8)
        } 
        else if (!
g_infreezetime && g_zombie[id] && PlayerClass[id] == 2
        { 
        
set_user_maxspeed(id250.0)
        
set_user_health(id300)
        
set_user_gravity(id0.9)
        } 
     
        return 
FMRES_IGNORED 
    

DoviuX is offline
Send a message via Skype™ to DoviuX
 



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 22:39.


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