Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. static Float:Velocity[3];pev(id,pev_velocity,Velocity)
  2. static Float:len ;len=floatsqroot(Velocity[0]*Velocity[0]+Velocity[1]*Velocity[1])
  3. if(pev(id, pev_flags) & FL_DUCKING){
  4. if(len>Attack_Speed_duck){
  5. Velocity[0]=Velocity[0]/len*Attack_Speed_duck
  6. Velocity[1]=Velocity[1]/len*Attack_Speed_duck
  7. set_pev(id,pev_velocity,Velocity)
  8. }
  9. }
  10. else{
  11. if(len>Attack_Speed){
  12. Velocity[0]=Velocity[0]/len*Attack_Speed
  13. Velocity[1]=Velocity[1]/len*Attack_Speed
  14. set_pev(id,pev_velocity,Velocity)
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement