Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <codmod_frakcje>
  4. #include <engine>
  5. #include <hamsandwich>
  6. #include <fakemeta>
  7. #include <fun>
  8.  
  9. new const nazwa[] = "Rumcajs";
  10. new const opis[] = "Posiada: Double Jump, Grawitacja 600/800, Dostฤ™p od - 100LVL";
  11. new const bronie = (1<<CSW_HEGRENADE)|(1<<CSW_GALIL)|(1<<CSW_DEAGLE);
  12. new const zdrowie = 10;
  13. new const kondycja = 20;
  14. new const inteligencja = 10;
  15. new const wytrzymalosc = 10;
  16.  
  17. new const frakcja[] = "Od levela.";
  18.  
  19. new skoki[33];
  20.  
  21. new ma_klase[33];
  22.  
  23. public plugin_init()
  24. {
  25. register_plugin(nazwa, "1.0", "amxx.pl");
  26.  
  27. cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc, frakcja);
  28. RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1);
  29.  
  30.  
  31. register_forward(FM_CmdStart, "fwCmdStart_MultiJump");
  32.  
  33. }
  34.  
  35. public cod_class_enabled(id)
  36. {
  37.  
  38. entity_set_float(id, EV_FL_gravity, 600.0/800.0);
  39. give_item(id, "weapon_hegrenade");
  40. ma_klase[id] = true;
  41.  
  42. cod_class_enabled(id)
  43. {
  44. if(cod_get_max_lvl(id)< 100_Poziom )
  45. {
  46. client_print[color=#666600]([/color]id[color=#666600],[/color] print_chat[color=#666600],[/color] "[HeRoS] Jest dostepny od 100_Poziom LVL")
  47. return COD_STOP;
  48. }
  49. ma_klase[id] = true;
  50. return COD_CONTINUE;
  51. }
  52.  
  53. }
  54.  
  55. public cod_class_disabled(id)
  56. {
  57.  
  58. entity_set_float(id, EV_FL_gravity, 1.0);
  59. ma_klase[id] = false;
  60.  
  61. }
  62.  
  63. public fwSpawn_Grawitacja(id)
  64. {
  65. if(ma_klase[id])
  66. entity_set_float(id, EV_FL_gravity, 600.0/800.0);
  67. }
  68.  
  69.  
  70. public fwCmdStart_MultiJump(id, uc_handle)
  71. {
  72. if(!is_user_alive(id) || !ma_klase[id])
  73. return FMRES_IGNORED;
  74.  
  75. new flags = pev(id, pev_flags);
  76.  
  77. if((get_uc(uc_handle, UC_Buttons) & IN_JUMP) && !(flags & FL_ONGROUND) && !(pev(id, pev_oldbuttons) & IN_JUMP) && skoki[id])
  78. {
  79. skoki[id]--;
  80. new Float:velocity[3];
  81. pev(id, pev_velocity,velocity);
  82. velocity[2] = random_float(265.0,285.0);
  83. set_pev(id, pev_velocity,velocity);
  84. }
  85. else if(flags & FL_ONGROUND)
  86. skoki[id] = 2;
  87.  
  88. return FMRES_IGNORED;
  89. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement