Advertisement
Guest User

Untitled

a guest
Nov 21st, 2012
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <codmod>
  4. #include <engine>
  5. #include <hamsandwich>
  6.  
  7. new const nazwa[] = "Umarly";
  8. new const opis[] = "1/5 odrodzenia sie po śmierci";
  9. new const bronie = (1<<CSW_FIVESEVEN)|(1<<CSW_AK47);
  10. new const zdrowie = 20;
  11. new const kondycja = 20;
  12. new const inteligencja = 0;
  13. new const wytrzymalosc = 10;
  14.  
  15. new ma_klase[33];
  16. public plugin_init()
  17. {
  18. register_plugin(nazwa, "1.0", "amxx.pl");
  19. cod_register_class(nazwa, opis, bronie, zdrowie, kondycja, inteligencja, wytrzymalosc);
  20.  
  21. RegisterHam(Ham_Spawn, "player", "fwSpawn_Grawitacja", 1);
  22. RegisterHam(Ham_Killed, "player", "fwKill", 1);
  23. }
  24.  
  25. public cod_class_enabled(id)
  26. {
  27. entity_set_float(id, EV_FL_gravity, 780.0/800.0);
  28. ma_klase[id] = true;
  29. }
  30.  
  31. public cod_class_disabled(id)
  32. {
  33. entity_set_float(id, EV_FL_gravity, 1.0);
  34. ma_klase[id] = false;
  35. }
  36.  
  37. public fwSpawn_Grawitacja(id)
  38. {
  39. if(ma_klase[id])
  40. entity_set_float(id, EV_FL_gravity, 780.0/800.0);
  41. }
  42.  
  43. public fwKill(id)
  44. if(is_user_connected(id) && random_num(1, 5) == 1)
  45. set_task(0.5, "respawn", id+1551);
  46.  
  47. public respawn(id)
  48. ExecuteHamB(Ham_CS_RoundRespawn, id-1551);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement