Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static Float:Velocity[3];pev(id,pev_velocity,Velocity)
- static Float:len ;len=floatsqroot(Velocity[0]*Velocity[0]+Velocity[1]*Velocity[1])
- if(pev(id, pev_flags) & FL_DUCKING){
- if(len>Attack_Speed_duck){
- Velocity[0]=Velocity[0]/len*Attack_Speed_duck
- Velocity[1]=Velocity[1]/len*Attack_Speed_duck
- set_pev(id,pev_velocity,Velocity)
- }
- }
- else{
- if(len>Attack_Speed){
- Velocity[0]=Velocity[0]/len*Attack_Speed
- Velocity[1]=Velocity[1]/len*Attack_Speed
- set_pev(id,pev_velocity,Velocity)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement