Raised This Month: $ Target: $400
 0% 

Speed Problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-14-2010 , 15:26   Speed Problem
Reply With Quote #1

I have a problem on a plugin first when connect speed okey like set but when died or new round, speed is back to 250 (default) for all classes.

PreThink Code:

PHP Code:
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_RELOAD) && (flag FL_ONGROUND))
            {
                if (
get_pcvar_num(cvar_leap))
                {
                    static 
FloatcooldownFloatlheightlforce
                    cooldown 
get_pcvar_float(cvar_leapcd)
                    
lforce get_pcvar_num(cvar_lforce)
                    
lheight get_pcvar_float(cvar_lheight)
                    if (
Time cooldown g_LastLeap[id])
                    { 
                        
set_pev(idpev_buttonbutton & ~IN_RELOAD)
                        
velocity_by_aim(idlforcevelocity)
                        
velocity[2] = lheight
                        set_pev
(idpev_velocityvelocity)
                        
g_LastLeap[id] = Time
                    
}
                }
            }
            else if ( (!
g_infreezetime) && (button IN_ATTACK) && (button IN_ATTACK2))
            {
                if (
get_pcvar_num(cvar_fleshthrow))
                {
                    if(
Time 1.1 g_LastFthrow[id])
                    {
                        
clcmd_throw(id)
                        
g_LastFthrow[id] = Time
                    
}
                }
            }
            else if (!
g_infreezetime)
            {
                static 
Float:zaspeedzaspeed get_pcvar_float(cvar_zombie_speed1)
                
set_pev(idpev_maxspeedzaspeed)
            }
        
        }
        else if (!
g_zombie[id])
        {
            if ( (
button IN_BACK)    && (flag FL_ONGROUND) )
            {
                
pev(idpev_velocityvelocity)
                
xs_vec_mul_scalar(velocityHUMAN_BACKSPEEDvelocity)
                
set_pev(idpev_velocityvelocity)
            }
        }

        if (
g_zombie[id] && PlayerClass[id] == 1)
        {
            if ( (!
g_infreezetime) && (button IN_ATTACK) && (button IN_ATTACK2))
            {
                if (
get_pcvar_num(cvar_fleshthrow))
                {
                    if(
Time 1.1 g_LastFthrow[id])
                    {
                        
clcmd_throw(id)
                        
g_LastFthrow[id] = Time
                    
}
                }
            }
            else if (!
g_infreezetime)
            {
                static 
Float:zmspeedzmspeed get_pcvar_float(cvar_zombie_speed2)
                
set_pev(idpev_maxspeedzmspeed)
            }
        }

        if (
g_zombie[id] && PlayerClass[id] == 2)
        {
            if ( (!
g_infreezetime) && (button IN_ATTACK) && (button IN_ATTACK2))
            {
                if (
get_pcvar_num(cvar_fleshthrow))
                {
                    if(
Time 1.1 g_LastFthrow[id])
                    {
                        
clcmd_throw(id)
                        
g_LastFthrow[id] = Time
                    
}
                }
            }
            else if (!
g_infreezetime)
            {
                static 
Float:zspeedzspeed get_pcvar_float(cvar_zombie_speed3)
                
set_pev(idpev_maxspeedzspeed)
            }
        }

        if (
g_zombie[id] && PlayerClass[id] == 3)
        {
            if ( (!
g_infreezetime) && (button IN_ATTACK) && (button IN_ATTACK2))
            {
                if (
get_pcvar_num(cvar_fleshthrow))
                {
                    if(
Time 1.1 g_LastFthrow[id])
                    {
                        
clcmd_throw(id)
                        
g_LastFthrow[id] = Time
                    
}
                }
            }
            else if (!
g_infreezetime)
            {
                static 
Float:aspeedaspeed get_pcvar_float(cvar_zombie_speed4)
                
set_pev(idpev_maxspeedaspeed)
            }
        }
        return 
FMRES_IGNORED

DoviuX is offline
Send a message via Skype™ to DoviuX
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-14-2010 , 15:33   Re: Speed Problem
Reply With Quote #2

Change speed in CurWeapon and Infect or change events.
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
DoviuX
Senior Member
Join Date: Jun 2009
Location: Lithuania
Old 03-15-2010 , 12:18   Re: Speed Problem
Reply With Quote #3

It's zombie swarm when there was 1 zombie speed was in prethink and it worked now i made classes and it doesn't work.
DoviuX is offline
Send a message via Skype™ to DoviuX
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 08:42.


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