Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.47 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <ccsplayer>
  3. #include <sdktools>
  4. #include <sdkhooks>
  5. #pragma semicolon 1
  6. #pragma newdecls required
  7. #define DEBUG
  8. #define PLUGIN_AUTHOR ""
  9. #define PLUGIN_VERSION "0.00"
  10.  
  11. enum TenManSpecialStatus{
  12. DISABLED = 0,
  13. CT_ONLY,
  14. T_ONLY,
  15. ENABLED
  16. };
  17.  
  18. public Plugin myinfo =
  19. {
  20. name = "",
  21. author = PLUGIN_AUTHOR,
  22. description = "",
  23. version = PLUGIN_VERSION,
  24. url = ""
  25. };
  26. ConVar ExoBootsToggle;
  27. ConVar BumpMineToggle;
  28. ConVar ShieldToggle;
  29. ConVar BreachChargeToggle;
  30. ConVar MediShotToggle;
  31. ConVar MediShotNum;
  32.  
  33. public void OnPluginStart()
  34. {
  35. RegConsoleCmd("sm_bumpy", Command_bumpy);
  36. HookEvent("round_start", Event_RoundStart);
  37. HookEvent("round_end", Event_RoundEnd);
  38.  
  39. ExoBootsToggle = CreateConVar("sm_10man_toggle_exoboots", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
  40. BumpMineToggle = CreateConVar("sm_10man_toggle_bumpmine", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
  41. ShieldToggle = CreateConVar("sm_10man_toggle_shield", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
  42. BreachChargeToggle = CreateConVar("sm_10man_toggle_breachcharge", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
  43. MediShotToggle = CreateConVar("sm_10man_toggle_medishot", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
  44. MediShotNum = CreateConVar("sm_10man_num_medishot", "1", "Amount of MediShots", _, true, 0.0, true, 5.0);
  45. AutoExecConfig(true, "plugin.fancytenman");
  46. }
  47.  
  48. public Action Command_bumpy(int client, int args){
  49. PrintToChatAll("bumpy bumpy");
  50. }
  51.  
  52. public void Event_RoundStart(Event event, const char[] name, bool dontbroadcast){
  53. if(BumpMineToggle.IntValue == view_as<int>(CT_ONLY)){
  54. CCSPlayer p;
  55. while(CCSPlayer.Next(p)){
  56. if(p.InGame && p.Alive){
  57. if(p.Team == CS_TEAM_CT){
  58. GivePlayerWeapon(p, "weapon_bumpmine");
  59. }
  60. }
  61. }
  62. }
  63. else if(BumpMineToggle.IntValue == view_as<int>(T_ONLY)){
  64. CCSPlayer p;
  65. while(CCSPlayer.Next(p)){
  66. if(p.InGame && p.Alive){
  67. if(p.Team == CS_TEAM_T){
  68. GivePlayerWeapon(p, "weapon_bumpmine");
  69. }
  70. }
  71. }
  72. }
  73. else if(BumpMineToggle.IntValue == view_as<int>(ENABLED)){
  74. CCSPlayer p;
  75. while(CCSPlayer.Next(p)){
  76. if(p.InGame && p.Alive){
  77. GivePlayerWeapon(p, "weapon_bumpmine");
  78. }
  79. }
  80. }
  81. if(ShieldToggle.IntValue == view_as<int>(DISABLED)){
  82. CCSPlayer p;
  83. while(CCSPlayer.Next(p)){
  84. }
  85. }
  86. else if(ShieldToggle.IntValue == view_as<int>(CT_ONLY)){
  87. CCSPlayer p;
  88. while(CCSPlayer.Next(p)){
  89. if(p.InGame && p.Alive){
  90. if(p.Team == CS_TEAM_CT){
  91. GivePlayerWeapon(p, "weapon_shield");
  92. }
  93. }
  94. }
  95. }
  96. else if(ShieldToggle.IntValue == view_as<int>(T_ONLY)){
  97. CCSPlayer p;
  98. while(CCSPlayer.Next(p)){
  99. if(p.Team == CS_TEAM_T){
  100. if(p.InGame && p.Alive){
  101. GivePlayerWeapon(p, "weapon_shield");
  102. }
  103. }
  104. }
  105. }
  106. else if(ShieldToggle.IntValue == view_as<int>(ENABLED)){
  107. CCSPlayer p;
  108. while(CCSPlayer.Next(p)){
  109. if(p.InGame && p.Alive){
  110. GivePlayerWeapon(p, "weapon_shield");
  111. }
  112. }
  113. }
  114. if(BreachChargeToggle.IntValue == view_as<int>(DISABLED)){
  115. CCSPlayer p;
  116. while(CCSPlayer.Next(p)){
  117. if(p.InGame && p.Alive){
  118. }
  119. }
  120. }
  121. else if(BreachChargeToggle.IntValue == view_as<int>(CT_ONLY)){
  122. CCSPlayer p;
  123. while(CCSPlayer.Next(p)){
  124. if(p.InGame && p.Alive){
  125. if(p.Team == CS_TEAM_CT){
  126. GivePlayerWeapon(p, "weapon_breachcharge");
  127. }
  128. }
  129. }
  130. }
  131. else if(BreachChargeToggle.IntValue == view_as<int>(T_ONLY)){
  132. CCSPlayer p;
  133. while(CCSPlayer.Next(p)){
  134. if(p.InGame && p.Alive){
  135. if(p.Team == CS_TEAM_T){
  136. GivePlayerWeapon(p, "weapon_breachcharge");
  137. }
  138. }
  139. }
  140. }
  141. else if(BreachChargeToggle.IntValue == view_as<int>(ENABLED)){
  142. CCSPlayer p;
  143. while(CCSPlayer.Next(p)){
  144. if(p.InGame && p.Alive){
  145. GivePlayerWeapon(p, "weapon_breachcharge");
  146. }
  147. }
  148. }
  149. if(MediShotToggle.IntValue == view_as<int>(DISABLED)){
  150. CCSPlayer p;
  151. while(CCSPlayer.Next(p)){
  152. }
  153. }
  154. else if(MediShotToggle.IntValue == view_as<int>(CT_ONLY)){
  155. CCSPlayer p;
  156. while(CCSPlayer.Next(p)){
  157. if(p.InGame && p.Alive){
  158. if(p.Team == CS_TEAM_CT){
  159. for(int num = 1; num <= MediShotNum.IntValue; num++){
  160. GivePlayerWeapon(p, "weapon_healthshot");
  161. }
  162. }
  163. }
  164. }
  165. }
  166. else if(MediShotToggle.IntValue == view_as<int>(T_ONLY)){
  167. CCSPlayer p;
  168. while(CCSPlayer.Next(p)){
  169. if(p.InGame && p.Alive){
  170. if(p.Team == CS_TEAM_T){
  171. for(int num = 1; num <= MediShotNum.IntValue; num++){
  172. GivePlayerWeapon(p, "weapon_healthshot");
  173. }
  174. }
  175. }
  176. }
  177. }
  178. else if(MediShotToggle.IntValue == view_as<int>(ENABLED)){
  179. CCSPlayer p;
  180. while(CCSPlayer.Next(p)){
  181. if(p.InGame && p.Alive){
  182. for(int num = 1; num <= MediShotNum.IntValue; num++){
  183. GivePlayerWeapon(p, "weapon_healthshot");
  184. }
  185. }
  186. }
  187. }
  188. PrintToChatAll("MediShot Check");
  189. if(ExoBootsToggle.IntValue == view_as<int>(DISABLED)){
  190. CCSPlayer p;
  191. while(CCSPlayer.Next(p)){
  192. if(p.InGame && p.Alive){
  193. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
  194. }
  195. }
  196. }
  197. else if(ExoBootsToggle.IntValue == view_as<int>(CT_ONLY)){
  198. CCSPlayer p;
  199. while(CCSPlayer.Next(p)){
  200. if(p.InGame && p.Alive){
  201. if(p.Team == CS_TEAM_CT){
  202. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
  203. }
  204. else{
  205. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
  206. }
  207. }
  208. }
  209. }
  210. else if(ExoBootsToggle.IntValue == view_as<int>(T_ONLY)){
  211. CCSPlayer p;
  212. while(CCSPlayer.Next(p)){
  213. if(p.InGame && p.Alive){
  214. if(p.Team == CS_TEAM_T){
  215. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
  216. }
  217. else{
  218. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
  219. }
  220. }
  221. }
  222. }
  223. else if(ExoBootsToggle.IntValue == view_as<int>(ENABLED)){
  224. CCSPlayer p;
  225. while(CCSPlayer.Next(p)){
  226. if(p.InGame && p.Alive){
  227. SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
  228. }
  229. }
  230. }
  231. PrintToChatAll("ExoBoots Check");
  232. }
  233.  
  234. public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast){
  235. /*
  236. CCSPlayer p;
  237. while(CCSPlayer.Next(p)){
  238. if(p.InGame && p.Alive){
  239. CWeapon wep = p.GetWeapon(CS_SLOT_C4);
  240. char weaponClassName[32];
  241. wep.GetClassname(weaponClassName, sizeof(weaponClassName));
  242. PrintToChatAll(weaponClassName);
  243. if(StrEqual(weaponClassName, "weapon_bumpmine")||StrEqual(weaponClassName, "weapon_breachcharge")){
  244. p.RemoveItem(wep);
  245. wep.Kill();
  246. }
  247. }
  248. }
  249. */
  250. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement