Advertisement
iFenomenal

parasuta de mata. :))

Sep 7th, 2019
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.74 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <engine>
  3.  
  4. public client_PreThink(id)
  5. {
  6.     if(!is_user_alive(id))
  7.         return
  8.  
  9.     new Float:fallspeed = 100.0 * -1.0
  10.  
  11.     new button = get_user_button(id)
  12.     if(button & IN_USE)
  13.     {
  14.         new Float:velocity[3]
  15.         entity_get_vector(id, EV_VEC_velocity, velocity)
  16.         if (velocity[2] < 0.0)
  17.         {
  18.             entity_set_int(id, EV_INT_sequence, 3)
  19.             entity_set_int(id, EV_INT_gaitsequence, 1)
  20.             entity_set_float(id, EV_FL_frame, 1.0)
  21.             entity_set_float(id, EV_FL_framerate, 1.0)
  22.  
  23.             velocity[2] = (velocity[2] + 40.0 < fallspeed) ? velocity[2] + 40.0 : fallspeed
  24.             entity_set_vector(id, EV_VEC_velocity, velocity)
  25.         }
  26.     }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement