HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /************************************************
  2. No Zombie Footsteps
  3. Author: Rabid Baboon
  4. Version: 1.4
  5. Mod: Zombie Panic
  6. Requires: AMX mod X v1.01
  7. Required Modules: Fun and Engine
  8. Description:
  9. Disables footstep sounds for zombies.
  10.  
  11. Fixes:
  12. v1.4
  13. Made code more efficient.
  14. v1.3
  15. Fixed minor console error.
  16. v1.2
  17. Fixed first zombie footstep problem.
  18. ************************************************/
  19. #include <amxmodx>
  20. #include <fun>
  21. #include <zp_const>
  22. /************************************************
  23. Main Functions
  24. ************************************************/
  25. /************************************************
  26. plugin_modules()
  27. Required modules listed here. Plugin will not work if they are not loaded.
  28. ************************************************/
  29. public plugin_modules()
  30. {
  31. require_module("fun");
  32. }
  33. /************************************************
  34. plugin_init()
  35. Initializes the plugin.
  36. ************************************************/
  37. public plugin_init()
  38. {
  39. register_plugin("No Zombie Footsteps", "v1.4", "Rabid Baboon");
  40. register_event("RoundStatus", "NoFootStepSound", "a");
  41. }
  42. /************************************************
  43. NoFootStepSound()
  44. Disables footstep sounds for zombies
  45. ************************************************/
  46. public NoFootStepSound()
  47. {
  48. for(new id = 1; id < 33; id++)
  49. {
  50. if(is_user_connected(id))
  51. {
  52. if(get_user_team(id, "Undead") == ZOMBIES)
  53. {
  54. set_user_footsteps(id, 1);
  55. }
  56. else
  57. {
  58. set_user_footsteps(id, 0);
  59. }
  60. }
  61. }
  62. }