Advertisement
Guest User

Untitled

a guest
Jan 17th, 2020
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <engine>
  4.  
  5. #define FLAG_A (1<<0)
  6. #define FLAG_B (1<<1)
  7. #define FLAG_C (1<<2)
  8. #define FLAG_D (1<<3)
  9. #define FLAG_E (1<<4)
  10. #define FLAG_K (1<<10)
  11.  
  12. native zv_get_user_flags(Player)
  13.  
  14. new bool:Jump[33], JumpNum[33];
  15.  
  16. public client_PreThink(id)
  17. {
  18. if(!is_user_alive(id) || !is_vip(id))
  19. return;
  20.  
  21. new a = get_user_button(id);
  22. new b = get_user_oldbutton(id);
  23.  
  24. if((a & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(b & IN_JUMP))
  25. {
  26. if(JumpNum[id] < 3)
  27. {
  28. Jump[id] = true;
  29. JumpNum[id]++;
  30. }
  31. }
  32.  
  33. if((a & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
  34. JumpNum[id] = 0;
  35. }
  36.  
  37. public client_PostThink(id)
  38. {
  39. if(!is_user_alive(id) || !is_vip(id))
  40. return;
  41.  
  42. if(Jump[id])
  43. {
  44. new Float:vel[3];
  45. entity_get_vector(id, EV_VEC_velocity, vel);
  46. vel[2] = random_float(265.0, 285.0);
  47. entity_set_vector(id, EV_VEC_velocity, vel);
  48. }
  49. }
  50.  
  51. stock is_vip(Player)
  52. {
  53. new f = zv_get_user_flags(Player);
  54.  
  55. if(f & FLAG_A || f & FLAG_B || f & FLAG_C || f & FLAG_D || f & FLAG_E || f & FLAG_K)
  56. return true;
  57. return false;
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement