HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /* Rats Fixer
  2. About:
  3. This plugin fixes a few balance issues in de_rats , cs_rats2_final , de_rats_2001. And stops the ability for teammates to hurt their own team
  4. either via drowning them, or gassing them.
  5.  
  6. Modules required: engine
  7.  
  8. Plugin forum thread: http://www.amxmodx.org/forums/viewtopic.php?t=17066
  9.  
  10. Credits:
  11. Ops in #AMXmodx @ Quakenet for alot of help ( + AssKicR & CheesyPeteza )
  12.  
  13. Changelog:
  14.  
  15.  1.0.1
  16. Fixed: Bad CT Spawnpoint on de_rats
  17.  
  18.  1.0.0
  19. First public release
  20. */
  21. #include <amxmodx>
  22. #include <engine>
  23.  
  24. #define define_cs_rats2_final 0
  25. #define define_de_rats_2001 1
  26. #define define_de_rats 2
  27.  
  28. #define MapsInList 3
  29.  
  30. new gs_MapList[3][32] = {"cs_rats2_final","de_rats_2001","de_rats"}
  31. new g_MaxEnts
  32.  
  33. public plugin_init()
  34. {
  35. register_plugin("Rats Fixer", "1.0.2","EKS")
  36.  
  37. g_MaxEnts = get_global_int(GL_maxEntities)
  38.  
  39. new MapName[32]
  40. get_mapname(MapName,31)
  41.  
  42. for(new i=0;i<MapsInList;i++)
  43. {
  44. if(equali(gs_MapList[i],MapName))
  45. FixMap(i)
  46. }
  47. }
  48.  
  49. stock FixMap(WhatMap)
  50. {
  51. new class[32],Float:Origin[3]
  52. new MaxPlayers = get_maxplayers() + 1
  53. if(WhatMap == define_de_rats_2001)
  54. {
  55. for(new i=MaxPlayers;i<=g_MaxEnts;i++) if(is_valid_ent(i))
  56. {
  57. entity_get_string(i,EV_SZ_classname,class,31)
  58. entity_get_vector(i,EV_VEC_origin,Origin)
  59. if(equal(class,"func_pushable") || equal(class,"trigger_relay") && ( Origin[2] == 239.00 || Origin[2] == 255.00 ))
  60. {
  61. remove_entity(i)
  62. }
  63. }
  64. }
  65. else if(WhatMap == define_cs_rats2_final)
  66. {
  67. for(new i=MaxPlayers;i<=g_MaxEnts;i++) if(is_valid_ent(i))
  68. {
  69. entity_get_string(i,EV_SZ_classname,class,31)
  70. if( equal(class,"func_rot_button"))
  71. {
  72. remove_entity(i)
  73. }
  74. }
  75. }
  76. else if(WhatMap == define_de_rats)
  77. {
  78. new ButtonsRemove=0
  79. //new Float:Org1[3] = {-397.0,181.0,-40.0}
  80. //new Float:Org2[3] = {-637.0,400.0,92.0}
  81. //new Float:Org3[3] = {-498.0,183.0,-40.0}
  82.  
  83. for(new i=MaxPlayers;i<=g_MaxEnts;i++) if(is_valid_ent(i))
  84. {
  85. /*
  86. //entity_get_vector(i,EV_VEC_origin,Origin)
  87. entity_get_string(i,EV_SZ_classname,class,31)
  88. if(equal(class,"func_button") && ButtonsRemove < 4)
  89. {
  90. remove_entity(i)
  91. ButtonsRemove++
  92. }
  93. if(equal(class,"info_player_start"))
  94. {
  95. if(Origin[0] == -576 && Origin[1] == 400)
  96. entity_set_vector(i,EV_VEC_origin,Org1)
  97. else if(Origin[0] == -384 && Origin[1] == 488)
  98. entity_set_vector(i,EV_VEC_origin,Org2)
  99. else if(Origin[0] == -416 && Origin[1] == 384)
  100. entity_set_vector(i,EV_VEC_origin,Org3)
  101. }
  102. else
  103. */
  104. if( equal(class,"func_door"))
  105. {
  106. remove_entity(i)
  107. }
  108. }
  109. }
  110. }