HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /********************************************************************************
  2. * AMX Mod X script.
  3. *
  4. * AMX Super (amx_super.sma)
  5. * Copyright (C) 2006-2007 Bmann_420 / Bo0m!
  6. *
  7. * This program is free software; you can redistribute it and/or
  8. * modify it under the terms of the GNU General Public License
  9. * as published by the Free Software Foundation; either version 2
  10. * of the License, or (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  20. *
  21. * In addition, as a special exception, the author gives permission to
  22. * link the code of this program with the Half-Life Game Engine ("HL
  23. * Engine") and Modified Game Libraries ("MODs") developed by Valve,
  24. * L.L.C ("Valve"). You must obey the GNU General Public License in all
  25. * respects for all of the code used other than the HL Engine and MODs
  26. * from Valve. If you modify this file, you may extend this exception
  27. * to your version of the file, but you are not obligated to do so. If
  28. * you do not wish to do so, delete this exception statement from your
  29. * version.
  30. *
  31. *********************************************************************************
  32. *
  33. * AMXX Super All-In-One Commands v3.7
  34. * Last Update: 8/03/2007
  35. * Plugin Count: 46
  36. *
  37. * by Bmann_420 & Bo0m!
  38. * Link: http://forums.alliedmods.net/forumdisplay.php?f=111
  39. *
  40. *
  41. *********************************************************************************
  42. *
  43. * +| Plugins |+
  44. * -) ADMIN HEAL v0.9.3 by f117bomb, revised by JTP10181 -- Gives health to players.
  45. * -) ADMIN ARMOR v1.0 by JTP10181 -- Gives armor to players.
  46. * -) ADMIN REVIVE II v0.1 by SniperBeamer, revised by Bo0m! -- Revives dead players.
  47. * -) ADMIN NOCLIP v1.0 by Bo0m! -- Gives players noclip.
  48. * -) ADMIN GODMODE v1.0 by Bo0m! -- Give players godmode.
  49. * -) ADMIN TELEPORT v0.9.3 by f117bomb, revised by JTP10181-- Teleport to a certain spot x y z
  50. * -) ADMIN STACK v0.9.3 by f117bomb -- Stacks all players on someone's head.
  51. * -) ADMIN ALLTALK v1.0 by BigBaller -- Sets alltalk.
  52. * -) ADMIN GRAVITY v0.2 by JustinHoMi -- Sets gravity.
  53. * -) ADMIN BURY v0.9.3 by f117bomb, revised by Bo0m! -- Buries players in the ground.
  54. * -) ADMIN DISARM v1.1 by mike_cao, revised by Bo0m! -- Strips players of their weapons.
  55. * -) ADMIN UBER SLAP v0.9.3 by BarMan (Skullz.NET) -- Slaps players through the air until they have 1 health (and probably die from a fall).
  56. * -) ADMIN SLAY 2 v0.9.3 by f117bomb, revised by JTP10181 -- Like slay, only with special effects!
  57. * -) ADMIN ROCKET v1.3 by f117bomb, revised by JTP10181 -- Turns players into rockets!
  58. * -) ADMIN MONEY v1.0 by XxAvalanchexX with additions from Bo0m! -- Gives (or takes) money from players.
  59. * -) ADMIN FIRE v1.0.0 by f117bomb -- Sets players on fire!
  60. * -) ADMIN WEAPON II Build 6.5 by SniperBeamer\Girthesniper\Meatwad, revised by Bo0m! -- Gives players weapons.
  61. * -) ADMIN EXEC 2 v0.3 by v3x -- Executes commands on players.
  62. * -) ADMIN STATUS by Zor -- Shows detailed player information in a MOTD window.
  63. * -) ADMIN SERVER PASSWORD v1.0 by Sparky911 -- Sets a server password.
  64. * -) ADMIN QUIT v1.0 by Bo0m! -- Forces players to close their game.
  65. * -) ADMIN GAG v1.8.3 by EKS -- Gags players from speaking or using the voicecomm.
  66. * -) ADMIN FLASH v1.0 by AssKicR, rewritten by Bo0m! -- Flashbangs players.
  67. * -) ADMIN SERVER SHUTDOWN v1.0 by Remo Williams, revised by Bo0m! -- Shuts off the server and makes players reconnect for quick fixes.
  68. * -) ADMIN TEAM LOCK v1.3 by Bmann_420, revised by Doombringer/Deviance -- Allows teams to be locked
  69. * -) ADMIN TRANSFER v1.0 by Deviance -- Transfer players to diff teams, swap teams, and swap players
  70. * -) ADMIN AMMO v1.0 by V3x, revised by Doombringer/Deviance -- Give/Take Unlimited Ammo
  71. * -) ADMIN CHECK v1.15 by OneEyed -- Type /admin to see what admins are in the server
  72. * -) ADMIN MAP EXTEND v1.1 by JSauce -- amx_extend the current map
  73. * -) ADMIN LISTEN v2.3 by Psychoguard, rewritten by Maxim and ported by Oj@eKiLLzZz deb/urandom
  74. * -) ADMIN VOCOM v1.3 by toazron1 Revised by X-olent
  75. * -) ADMIN DRUG v1.0 by X-olent
  76. * -) ADMIN SPEED vv1.0 by X-olent (Turbo)
  77. * -) ADMIN BAD AIM 1.3 by Twistedeuphoria
  78.  
  79. * -) CHANGE TO SPEC AND BACK v1.0 Origional code by Regalis, Revised by Exolent
  80. * -) ENTER/LEAVE MESSAGES v1.0 by by [Kindzhon] China Revised by Bmann_420 and X-olent
  81. * -) DAMAGE DONE v0.4 by Manip, revised by JTP10181 and Vittu -- Shows how much damage you did to enemies by your crosshair.
  82. * -) DEAD CHAT v2.1 by SuicideDog -- Talk to the other team via voicecomm while dead.
  83. * -) LOADING SOUNDS v1.0 by [OSA]Odin/White Panther -- Plays music as players connect.
  84. * -) SPECTATOR BUG FIX v1.0 by ]FUSION[ Gray Death -- Fixes the bug when ducking and being killed.
  85. * -) "SHOWNDEAD" SCOREBOARD FIX v0.9.4 by EJ/Vantage/Mouse -- Fixes connecting players from showing up on a team.
  86. * -) FIX ECHO SOUNDS v1.0 by Throstur -- Fixes echo sounds on some maps.
  87. * -) AFK BOMB TRANSFER v1.4 by VEN, revised by Doombringer/Deviance-- Transfers the Bomb to another player if AFK
  88. * -) C4 TIMER v1.1 by Cheat_Suit
  89. * -) STATS MARQUEE v1.2 by Travo
  90. * -) SPAWN PROTECTION v7.1 by Peli Revised for Glow On/Off by KaszpiR Some code change by Bmann_420
  91. *
  92. * +| 46 Plugins Total |+
  93. *
  94. *********************************************************************************
  95. *
  96. * Big Thanks To:
  97. *
  98. * (AMX Super Team)
  99. * Bmann_420, Bo0m!, Doombringer/Deviance, X-olent
  100. *
  101. * (Plugin Support/Main References)
  102. * BigBaller, Iceman, JTP10181, Kensai
  103. * f117bomb, XxAvalanchexX, VEN, Sether
  104. * and all the fine users of this plugin.
  105. *
  106. *
  107. *********************************************************************************
  108. *
  109. * For any problems with this plugin visit
  110. * http://forums.alliedmods.net/forumdisplay.php?f=111
  111. * for support.
  112. *
  113. *********************************************************************************
  114. */
  115.  
  116.  
  117. // Includes
  118. #include <amxmodx>
  119. #include <amxmisc>
  120. #include <cstrike>
  121. #include <fun>
  122. #include <engine>
  123. #include <csx>
  124. #include <fakemeta>
  125.  
  126. // Plugin Info
  127. new const PLUGIN[] = "AMX Super"
  128. new const VERSION[] = "3.7"
  129. new const AUTHOR[] = "Bmann_420 & Bo0m!"
  130.  
  131. /*
  132. ///
  133. ///// You may edit these Defines if you deem neccessary =)
  134. ///
  135. */
  136.  
  137. #define ADMIN_CHECK ADMIN_KICK // For Admin Check
  138. #define LOADINGSOUNDS 14 // Number of loading songs
  139. #define GAG_TIME 600 // Default Gag Time
  140. #define DAMAGE_RECIEVED // Comment out this define to show only damage done, otherwise this will show damage recieved also.
  141. #define TE 0 ///////////////////
  142. #define CT 1 // Team Locker
  143. #define AUTO 4 // Teams
  144. #define SPEC 5 ///////////////////
  145. #define EXTENDMAX 9 // Maximum number of times a map may be extended by anyone.
  146. #define EXTENDTIME 15 // Maximum amount of time any map can be extended at once.
  147. #define MAX_MAPS 32 // Change this if you have more than 32 maps in mapcycle.
  148. //#define MAPCYCLE // Check mapcycle to prevent non mapcycle files from being extended.
  149. #define MAX_SPRITES 2 // C4 Plugin max Sprites
  150. #define FL_ONGROUND (1<<9) // C4 Timer
  151.  
  152. //C4 Bomb message
  153. new const g_message[] = "Detonation time intiallized....."
  154.  
  155. new const g_timersprite[MAX_SPRITES][] = { "bombticking", "bombticking1" }
  156.  
  157. // Loading Sounds List
  158. new soundlist[LOADINGSOUNDS][] = {"Half-Life01","Half-Life02","Half-Life03","Half-Life04","Half-Life06","Half-Life08","Half-Life10","Half-Life11","Half-Life12","Half-Life13","Half-Life14","Half-Life15","Half-Life16","Half-Life17"}
  159.  
  160. static const COLOR[] = "^x04" //ADMIN CHECK chat color - green
  161.  
  162. //defines for speak flags, ADMIN helps tell speak apart easier
  163. #define SPEAK_MUTED2 0
  164. #define SPEAK_NORMAL2 1
  165. #define SPEAK_ALL 2
  166. #define SPEAK_ADMIN 5
  167.  
  168. /*
  169. ///
  170. ///// End of the Defines
  171. ///
  172. */
  173.  
  174. // Team Locker Team Names
  175. new const Teamnames[6][] = {
  176. "Terrorists",
  177. "Counter-Terrorists",
  178. "",
  179. "",
  180. "Auto",
  181. "Spectator"
  182. }
  183.  
  184. //Glow Information
  185. new g_iColors[30][3] = {
  186. {255, 0, 0},
  187. {255, 190, 190},
  188. {165, 0, 0},
  189. {255, 100, 100},
  190. {0, 0, 255},
  191. {0, 0, 136},
  192. {95, 200, 255},
  193. {0, 150, 255},
  194. {0, 255, 0},
  195. {180, 255, 175},
  196. {0, 155, 0},
  197. {150, 63, 0},
  198. {205, 123, 64},
  199. {255, 255, 255},
  200. {255, 255, 0},
  201. {189, 182, 0},
  202. {255, 255, 109},
  203. {255, 150, 0},
  204. {255, 190, 90},
  205. {222, 110, 0},
  206. {243, 138, 255},
  207. {255, 0, 255},
  208. {150, 0, 150},
  209. {100, 0, 100},
  210. {200, 0, 0},
  211. {220, 220, 0},
  212. {192, 192, 192},
  213. {190, 100, 10},
  214. {114, 114, 114},
  215. {0, 0, 0}
  216. }
  217.  
  218. new g_sColors[30][] = {
  219. "red",
  220. "pink",
  221. "darkred",
  222. "lightred",
  223. "blue",
  224. "darkblue",
  225. "lightblue",
  226. "aqua",
  227. "green",
  228. "lightgreen",
  229. "darkgreen",
  230. "brown",
  231. "lightbrown",
  232. "white",
  233. "yellow",
  234. "darkyellow",
  235. "lightyellow",
  236. "orange",
  237. "lightorange",
  238. "darkorange",
  239. "lightpurple",
  240. "purple",
  241. "darkpurple",
  242. "violet",
  243. "maroon",
  244. "gold",
  245. "silver",
  246. "bronze",
  247. "grey",
  248. "off"
  249. }
  250.  
  251. // Bools
  252. new bool:g_restart_attempt[33]
  253. new bool:g_freezetime = true
  254. new bool:g_spawn
  255. new bool:g_planting
  256. new bool:HasPermGod[33]
  257. new bool:HasPermNoclip[33]
  258. new bool:HasPermGlow[33]
  259. new bool:g_speed[33]
  260. new bool:blockjoining[6]
  261. new bool:unammo[33]
  262. new bool:badaim[33] = false
  263. new bool:autoban[33] = false
  264. new bool:count[32][32]
  265.  
  266. // PCvars
  267. new revivemsg, deadchat, bulletdamage, loadsong, soundfixon, allowsoundfix, leavemessage, autobantimed, autobanall
  268. new flashsound, transferspawn, transfertime, allowcatchfire, cvar_showteam, adminlisten, leavemessage_enable
  269. new cvar_flash, cvar_sprite, cvar_msg, statsm, cvPlrAmt, cvFullTime, cvTimeBetw, cvVertLoc, ba_followimmunity
  270. new statsmarquee, sv_sp, sv_sptime, sv_spmessage, sv_spshellthick, sv_spglow, entermessage, joinleave_message, admincheck
  271.  
  272. // Variables
  273. new gmsgDamage
  274. new gmsg_SetFOV
  275. new mflash, smoke, blueflare2, white, light
  276. new gmsg_TeamInfo
  277. new gMsgScreenFade
  278. new g_MsgSync
  279. new g_carrier
  280. new g_pos[33][3]
  281. new g_time[33]
  282. new gReloadTime[33]
  283. new g_maxplayers
  284. new maxplayers
  285. new gmsgSayText
  286. new user_limit = 0
  287. new SpecName[16]
  288. new g_gagged[33]
  289. new g_wasgagged[33][32]
  290. new g_gagflags[33]
  291. new g_c4timer
  292. new mp_c4timer
  293. new g_msg_showtimer
  294. new g_msg_roundtime
  295. new g_msg_scenario
  296. new g_name[33][32]
  297. new g_playerspk[33]
  298. new g_admin[33]
  299. new g_glow[33][4]
  300. new players[32]
  301. new pCount
  302. new g_voicemask[33]
  303.  
  304. #if defined DAMAGE_RECIEVED
  305. new g_MsgSync2
  306. #endif
  307.  
  308. public plugin_init()
  309. {
  310. register_plugin(PLUGIN, VERSION, AUTHOR)
  311. register_cvar("amx_super",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
  312. register_dictionary("amx_super.txt")
  313.  
  314. //Client Commands
  315. register_clcmd("say /gravity","check_gravity")
  316. register_clcmd("say /fixsound","cmdStopsound")
  317. register_clcmd("say /spec", "cmd_spec")
  318. register_clcmd("say /unspec", "cmd_unspec")
  319. register_clcmd("say /admins", "show_admins")
  320. register_clcmd("say /admin", "show_admins")
  321.  
  322. register_clcmd("say","block_gagged")
  323. register_clcmd("say_team","block_gagged")
  324. register_clcmd("jointeam", "join_team")
  325. register_clcmd("fullupdate","fullupdate")
  326.  
  327. //Admin Commands
  328. register_concmd("amx_heal","admin_heal",ADMIN_LEVEL_A,"<nick, #userid, authid or @team> <HP to give>")
  329. register_concmd("amx_armor","admin_armor",ADMIN_LEVEL_A,"<nick, #userid, authid or @team> <armor to give>")
  330. register_concmd("amx_teleport","admin_teleport",ADMIN_LEVEL_A,"<nick, #userid or authid> [x] [y] [z]")
  331. register_concmd("amx_userorigin","admin_userorigin",ADMIN_LEVEL_A,"<nick, #userid or authid")
  332. register_concmd("amx_stack","admin_stack",ADMIN_LEVEL_A,"<nick, #userid or authid> [0|1|2]")
  333. register_concmd("amx_alltalk","admin_alltalk",ADMIN_LEVEL_A,"[1 = ON | 0 = OFF]")
  334. register_concmd("amx_gravity","admin_gravity",ADMIN_LEVEL_A,"<gravity #>")
  335. register_concmd("amx_bury","admin_bury",ADMIN_LEVEL_B,"<nick, #userid, authid or @team>")
  336. register_concmd("amx_unbury","admin_unbury",ADMIN_LEVEL_B,"<nick, #userid, authid or @team>")
  337. register_concmd("amx_disarm","admin_disarm",ADMIN_LEVEL_B,"<nick, #userid, authid or @team>")
  338. register_concmd("amx_slay2","admin_slay",ADMIN_LEVEL_B,"<nick, #userid, authid or @team> [1-Lightning|2-Blood|3-Explode]")
  339. register_concmd("amx_rocket","admin_rocket",ADMIN_LEVEL_B,"<nick, #userid, authid or @team>")
  340. register_concmd("amx_fire","admin_fire",ADMIN_LEVEL_B,"<nick, #userid or authid>")
  341. register_concmd("amx_uberslap","admin_slap",ADMIN_LEVEL_B,"<nick, #userid or authid>")
  342. register_concmd("amx_exec","admin_exec",ADMIN_BAN,"<nick or @team> <command>")
  343. register_concmd("amx_pass", "admin_pass", ADMIN_PASSWORD, "<server password> - Sets the server password")
  344. register_concmd("amx_nopass", "admin_nopass", ADMIN_PASSWORD, "- Removes the server password")
  345. register_concmd("amx_revive","admin_revive",ADMIN_LEVEL_C,"<nick, #userid, authid or @team>")
  346. register_concmd("amx_quit","admin_quit",ADMIN_KICK,"<nick, #userid, authid or @team>")
  347. register_concmd("amx_gag","admin_gag",ADMIN_KICK,"<nick, #userid or authid> <a|b|c> <time> - Flags: a = Normal Chat | b = Team Chat | c = Voicecomm")
  348. register_concmd("amx_ungag","admin_ungag",ADMIN_KICK,"<nick, #userid or authid>")
  349. register_concmd("amx_weapon","admin_weapon",ADMIN_LEVEL_C,"<nick, #userid, authid or @team> <weapon #>")
  350. register_concmd("amx_shutdown","admin_shutdown",ADMIN_BAN," - Shuts Down Server/Reconnect Players")
  351. register_concmd("amx_givemoney","admin_givemoney",ADMIN_KICK," <nick, #userid or authid> <amount> - gives specified player money")
  352. register_concmd("amx_takemoney","admin_takemoney",ADMIN_KICK," <nick, #userid or authid> <amount> - takes specified player money")
  353. register_concmd("amx_godmode","admin_godmode",ADMIN_LEVEL_C,"<nick, #userid or @team> [0|1|2] - 0=OFF 1=ON 2=ON + ON EACH ROUND")
  354. register_concmd("amx_noclip","admin_noclip",ADMIN_LEVEL_C,"<nick, #userid, authid or @team> [0|1|2] - 0=OFF 1=ON 2=ON + ON EACH ROUND")
  355. register_concmd("amx_drug","cmd_drug",ADMIN_LEVEL_C,"<@all, @team, nick, #userid, authid or @team>")
  356. register_concmd("amx_speed","cmd_speed",ADMIN_LEVEL_C,"<nick, #userid, authid or @team> [0|1] -- gives/takes turbo running")
  357. register_concmd("amx_glow", "cmd_glow", ADMIN_KICK, "<nick, #userid, authid, or @team/@all> <color> (or) <rrr> <ggg> <bbb> <aaa> -- lasts 1 round")
  358. register_concmd("amx_glow2", "cmd_glow", ADMIN_KICK, "<nick, #userid, authid, or @team/@all> <color> (or) <rrr> <ggg> <bbb> <aaa> -- lasts forever")
  359. register_concmd("amx_glowcolors", "cmd_glowcolors", ADMIN_KICK, "shows a list of colors for amx_glow and amx_glow2")
  360. register_concmd("amx_flash","admin_flash",ADMIN_LEVEL_B,"<nick, #userid, authid or @team> - Flashes player(s)")
  361. register_concmd("amx_lock", "admin_lock", ADMIN_BAN,"- <CT/T/Auto/Spec> - Locks selected team")
  362. register_concmd("amx_unlock", "admin_unlock", ADMIN_BAN,"- <CT/T/Auto/Spec> - Unlocks selected team")
  363. register_concmd("amx_transfer", "cmd_transfer", ADMIN_CVAR,"- <name> <CT/T/Spec> Transfers that player to the specified team")
  364. register_concmd("amx_team", "cmd_transfer", ADMIN_CVAR,"- <name> <CT/T/Spec> Transfers that player to the specified team")
  365. register_concmd("amx_swap", "cmd_swap", ADMIN_CVAR,"- <name 1> <name 2> Swaps two players with eachother")
  366. register_concmd("amx_teamswap", "cmd_teamswap", ADMIN_CVAR,"- Swaps two teams with eachother")
  367. register_concmd("amx_unammo", "admin_unammo", ADMIN_LEVEL_A, "<nick, #userid or @team> [0|1] - 0=OFF 1=ON")
  368. register_concmd("amx_extend","admin_extend",ADMIN_LEVEL_A,"<added time to extend> : ex. 5, if you want to extend it five more minutes.")
  369. register_concmd("amx_sptime", "cmd_sptime", ADMIN_CVAR, "1 through 10 to set Spawn Protection time")
  370. register_concmd("amx_spmessage", "cmd_spmessage", ADMIN_CVAR, "1 = Turn Spawn Protection Message on , 0 = Turn Spawn Protection message off")
  371. register_concmd("amx_spshellthickness", "cmd_spshellthickness", ADMIN_CVAR, "1 through 100 to set Glow Shellthickness")
  372. register_concmd("amx_spglow", "cmd_spglow", ADMIN_CVAR, "1 = turn on glow, 0 =turn off glow")
  373. register_clcmd("amx_status", "admin_status", ADMIN_ADMIN, "- Shows a detailed list of info on players")
  374. register_concmd("amx_badaim","bad_aim",ADMIN_KICK,"<player> <On/off or length of time: 1|0|time> <Save?: 1|0>: Turn on/off bad aim on a player.")
  375. register_clcmd("+adminvoice", "vocomStart")
  376. register_clcmd("-adminvoice", "vocomStop")
  377.  
  378. //Server Commands
  379. register_srvcmd("soundfix","fRemove")
  380.  
  381. //Events
  382. register_event("DeathMsg","event_death","a")
  383. register_event("ResetHUD","event_hud_reset","be")
  384. register_event("CurWeapon", "changeWeapon", "be", "1=1")
  385. register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")
  386. register_event("TextMsg", "event_restart_attempt", "a", "2=#Game_will_restart_in")
  387. register_event("ResetHUD", "sp_on", "be")
  388. register_event("SayText","catch_say","b")
  389. register_event("DeathMsg","death_hook","a")
  390. register_event("VoiceMask","voice_hook","b")
  391.  
  392. //Cvars
  393. revivemsg = register_cvar("amx_revivemsg","1")
  394. deadchat = register_cvar("amx_deadchat","1")
  395. bulletdamage = register_cvar("bullet_damage","1")
  396. loadsong = register_cvar("amx_loadsong","1")
  397. soundfixon = register_cvar("amx_soundfix","1")
  398. allowsoundfix = register_cvar("amx_soundfix_pallow","1")
  399. flashsound = register_cvar("amx_flashsound","1")
  400. transferspawn = register_cvar("afk_bombtransfer_spawn", "7")
  401. transfertime = register_cvar("afk_bombtransfer_time", "15")
  402. allowcatchfire = register_cvar("allow_catchfire", "1")
  403. cvar_showteam = register_cvar("amx_showc4timer", "3")
  404. cvar_flash = register_cvar("amx_showc4flash", "0")
  405. cvar_sprite = register_cvar("amx_showc4sprite", "1")
  406. cvar_msg = register_cvar("amx_showc4msg", "0")
  407. mp_c4timer = get_cvar_pointer("mp_c4timer")
  408. cvPlrAmt = register_cvar("amx_marqplayeramount","40");
  409. cvVertLoc = register_cvar("amx_marqvertlocation","2");
  410. cvFullTime = register_cvar("amx_marqfulltime","600.0");
  411. cvTimeBetw = register_cvar("amx_marqtimebetween","6.0");
  412. statsmarquee = register_cvar("stats_marquee","1")
  413. sv_sp = register_cvar("sv_sp", "1")
  414. sv_sptime = register_cvar("sv_sptime", "5")
  415. sv_spmessage = register_cvar("sv_spmessage", "1")
  416. sv_spshellthick = register_cvar("sv_spshellthick", "25")
  417. sv_spglow = register_cvar("sv_spglow", "0")
  418. adminlisten = register_cvar("amx_adminlisten","1")
  419. leavemessage_enable = register_cvar("amx_leavemessage_enable","1")
  420. entermessage = register_cvar("amx_enter_message", "%name% has joined!\nEnjoy the Server!\nCurrent Ranking is %rankpos%")
  421. leavemessage = register_cvar("amx_leave_message", "%name% has left!\nHope to see you back sometime.")
  422. joinleave_message = register_cvar("amx_join_leave", "1")
  423. autobantimed = register_cvar("amx_autobantimed", "1")
  424. autobanall = register_cvar("amx_autobanall", "1")
  425. ba_followimmunity = register_cvar("amx_ba_follow_immunity", "1")
  426. admincheck = register_cvar("amx_admin_check", "1");
  427.  
  428. // Execute main configuration file (amx_super.cfg)
  429. new configsDir[64]
  430. get_configsdir(configsDir, 63)
  431. server_cmd("exec %s/amx_super.cfg", configsDir)
  432.  
  433. // Variables Set
  434. maxplayers = get_maxplayers()
  435. gmsgSayText = get_user_msgid("SayText")
  436. gmsgDamage = get_user_msgid("Damage")
  437. gMsgScreenFade = get_user_msgid("ScreenFade")
  438. gmsg_TeamInfo = get_user_msgid("TeamInfo")
  439. gmsg_SetFOV = get_user_msgid("SetFOV")
  440. g_MsgSync = CreateHudSyncObj()
  441. #if defined DAMAGE_RECIEVED
  442. g_MsgSync2 = CreateHudSyncObj()
  443. #endif
  444.  
  445. //Speed Fix
  446. server_cmd("sv_maxspeed 9999999");
  447.  
  448. //Voice Comm Admin
  449. register_forward(FM_Voice_SetClientListening, "fm_mute_forward")
  450.  
  451. //C4 Timer Display
  452. g_msg_showtimer = get_user_msgid("ShowTimer")
  453. g_msg_roundtime = get_user_msgid("RoundTime")
  454. g_msg_scenario = get_user_msgid("Scenario")
  455.  
  456. register_event("HLTV", "event_hltv", "a", "1=0", "2=0")
  457. register_logevent("logevent_plantedthebomb", 3, "2=Planted_The_Bomb")
  458.  
  459. // Team Locker
  460. register_menucmd(register_menuid("Team_Select",1), (1<<0)|(1<<1)|(1<<4)|(1<<5), "team_select")
  461.  
  462. // ShownDead Spectator Team Name
  463. copy(SpecName,15,"SPECTATOR")
  464.  
  465. // Fix Echo Sounds Task
  466. set_task(0.1,"fRemove")
  467.  
  468. //Stats Marquee
  469. set_task(15.0,"displayplr",0,"",0,"a",1);
  470.  
  471. // Event to keep speed
  472. register_event( "CurWeapon", "event_weapon", "be", "1=1" )
  473.  
  474. // AFK Bomb Transfer Events
  475. register_event("WeapPickup", "event_got_bomb", "be", "1=6")
  476. register_event("BarTime", "event_bar_time", "be")
  477. register_event("TextMsg", "event_bomb_drop", "bc", "2=#Game_bomb_drop")
  478. register_event("TextMsg", "event_bomb_drop", "a", "2=#Bomb_Planted")
  479. register_event("HLTV", "event_new_round", "a", "1=0", "2=0")
  480.  
  481. // AFK Bomb Transfer Logevents
  482. register_logevent("logevent_round_start", 2, "1=Round_Start")
  483.  
  484. // AFK Bomb Transfer Task
  485. set_task(1.0, "task_afk_check", _, _, _, "b") // AFK Bomb Transfer core loop
  486. g_maxplayers = get_maxplayers()
  487.  
  488. // AMX MAP EXTEND
  489. #if defined MAPCYCLE
  490. new map[64], i, line = 0
  491. get_mapname(map,63)
  492. while ( gNum < MAX_MAPS && read_file("mapcycle.txt",line++,gMap,63,i) )
  493. {
  494. if ( gMap[0] == ';' ) continue
  495.  
  496. if (equali(gMap,map))
  497. {
  498. cyclerfile = true
  499. break
  500. }
  501. ++gNum
  502. } return PLUGIN_CONTINUE
  503. #endif
  504. if (!find_ent_by_class(-1, "func_bomb_target"))
  505. return
  506. }
  507.  
  508. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  509. //Change to spec 1.0 by Exolent
  510. //==========================================================================================================
  511. new CsTeams:team[33]
  512. public cmd_spec( id )
  513. {
  514. if( !team[id] && get_cvar_num( "allow_spectators" ) > 0 )
  515. {
  516. if( is_user_alive( id ) )
  517. {
  518. client_cmd( id, "kill" )
  519. cs_set_user_deaths( id, cs_get_user_deaths( id ) - 1 )
  520. set_user_frags( id, get_user_frags( id ) + 1 )
  521. }
  522. team[id] = cs_get_user_team( id )
  523. cs_set_user_team( id, CS_TEAM_SPECTATOR, CS_DONTCHANGE )
  524. }
  525. return PLUGIN_HANDLED;
  526. }
  527.  
  528. public cmd_unspec( id )
  529. {
  530. if( team[id] )
  531. cs_set_user_team( id, team[id] )
  532. team[id] = CS_TEAM_UNASSIGNED
  533. return PLUGIN_HANDLED;
  534. }
  535.  
  536. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  537. //AFK BOMB TRANSFER v1.4 by VEN
  538. //Revised by Doombringer/Deviance
  539. //==========================================================================================================
  540. public event_new_round() {
  541. g_freezetime = true
  542. g_spawn = true
  543. g_planting = false
  544. g_carrier = 0
  545. }
  546.  
  547. public event_got_bomb(id) {
  548. g_carrier = id
  549. }
  550.  
  551. public event_bar_time(id) {
  552. if (id == g_carrier) {
  553. g_planting = bool:read_data(1)
  554. get_user_origin(id, g_pos[id])
  555. g_time[id] = 0
  556. }
  557. }
  558.  
  559. public event_bomb_drop() {
  560. g_spawn = false
  561. g_planting = false
  562. g_carrier = 0
  563. }
  564.  
  565. public logevent_round_start() {
  566. new id[32], num
  567. get_players(id, num, "ae", "TERRORIST")
  568.  
  569. if (!num) // is server empty?
  570. return
  571.  
  572. g_freezetime = false
  573.  
  574. // update afk timers and current positions
  575. new x
  576. for (new i = 0; i < num; ++i) {
  577. x = id[i]
  578. get_user_origin(x, g_pos[x])
  579. g_time[x] = 0
  580. }
  581. }
  582.  
  583. public task_afk_check() {
  584. if (g_freezetime) // is freezetime right now?
  585. return
  586.  
  587. // afk check
  588. new id[32], num, x, origin[3]
  589. get_players(id, num, "ae", "TERRORIST")
  590. for (new i = 0; i < num; ++i) {
  591. x = id[i]
  592. get_user_origin(x, origin)
  593. if (origin[0] != g_pos[x][0] || origin[1] != g_pos[x][1] || (x == g_carrier && g_planting)) {
  594. g_time[x] = 0
  595. g_pos[x][0] = origin[0]
  596. g_pos[x][1] = origin[1]
  597. if (g_spawn && x == g_carrier)
  598. g_spawn = false
  599. }
  600. else
  601. g_time[x]++
  602. }
  603.  
  604. // is bomb not currently carried or Ts number less than 2?
  605. if (!g_carrier || num < 2)
  606. return
  607.  
  608. new max_time = get_pcvar_num(g_spawn ? transferspawn : transfertime)
  609.  
  610. // is plugin disabled (cvar <= 0) or carrier isn't afk?
  611. if (max_time <= 0 || g_time[g_carrier] < max_time)
  612. return
  613.  
  614. // find who from non-afk Ts is the closest to the afk carrier
  615. get_user_origin(g_carrier, origin)
  616. new min_dist = 999999, dist, recipient, origin2[3]
  617. for (new i = 0; i < num; ++i) {
  618. x = id[i]
  619. if (g_time[x] < max_time) {
  620. get_user_origin(x, origin2)
  621. dist = get_distance(origin, origin2)
  622. if (dist < min_dist) {
  623. min_dist = dist
  624. recipient = x
  625. }
  626. }
  627. }
  628.  
  629. if (!recipient) // is all Ts afk?
  630. return
  631.  
  632. new carrier = g_carrier
  633. engclient_cmd(carrier, "drop", "weapon_c4") // drop the backpack
  634. new c4 = find_ent_by_class(-1, "weapon_c4") // find weapon_c4 entity
  635. if (!c4)
  636. return
  637.  
  638. new backpack = entity_get_edict(c4, EV_ENT_owner) // get backpack entity
  639. if (backpack <= g_maxplayers)
  640. return
  641.  
  642. // my backpack transfer trick (improved)
  643. entity_set_int(backpack, EV_INT_flags, entity_get_int(backpack, EV_INT_flags) | FL_ONGROUND)
  644. fake_touch(backpack, recipient)
  645.  
  646. // hud messages stuff below
  647. set_hudmessage(0, 255, 0, 0.35, 0.8, _, _, 7.0)
  648. new message[128], c_name[32], r_name[32]
  649. get_user_name(carrier, c_name, 31)
  650. get_user_name(recipient, r_name, 31)
  651. format(message, 127, "%L", LANG_PLAYER, "AMX_SUPER_BOMB_TRANSFER", r_name, c_name)
  652. for (new i = 0; i < num; ++i)
  653. show_hudmessage(id[i], "%s", message)
  654.  
  655. set_hudmessage(255, 255, 0, 0.42, 0.3, _, _, 7.0, _, _, 3)
  656. show_hudmessage(recipient, "You got the bomb!")
  657. }
  658.  
  659.  
  660. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  661. //PLAYER SPAWN FILTERS BY VEN
  662. //==========================================================================================================
  663. public fullupdate(id) {
  664. return PLUGIN_HANDLED_MAIN
  665. }
  666.  
  667. public event_restart_attempt() {
  668. new players[32], num
  669. get_players(players, num, "a")
  670. for (new i; i < num; ++i)
  671. g_restart_attempt[players[i]] = true
  672. }
  673.  
  674. public event_hud_reset(id) {
  675. if (g_restart_attempt[id]) {
  676. g_restart_attempt[id] = false
  677. return
  678. }
  679. event_spawned(id)
  680.  
  681. if(HasPermGod[id])
  682. {
  683. set_user_godmode(id, 1)
  684. }
  685. }
  686.  
  687. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  688. //FIX ECHO SOUNDS v1.0 by Throstur
  689. //==========================================================================================================
  690. public fRemove() {
  691. if(get_pcvar_num(soundfixon) != 1)
  692. return PLUGIN_HANDLED
  693.  
  694. new Echo = find_ent_by_class(0,"env_sound")
  695. while(Echo)
  696. {
  697. remove_entity(Echo)
  698. Echo = find_ent_by_class(Echo,"env_sound")
  699. }
  700. return PLUGIN_HANDLED
  701. }
  702.  
  703. public cmdStopsound(id)
  704. {
  705. if(get_pcvar_num(allowsoundfix) == 1)
  706. {
  707. client_cmd(id,"stopsound;room_type 00")
  708. client_cmd(id,"stopsound")
  709. client_print(id,print_chat,"%L", id, "AMX_SUPER_SOUNDFIX")
  710. }
  711. else
  712. {
  713. client_print(id,print_chat,"%L", id, "AMX_SUPER_SOUNDFIX_DISABLED")
  714. return PLUGIN_HANDLED
  715. }
  716. return PLUGIN_CONTINUE
  717. }
  718.  
  719.  
  720. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  721. //DAMAGE DONE v0.4 by Manip
  722. //Revised by JTP10181 and Vittu
  723. //==========================================================================================================
  724. public on_damage(id)
  725. {
  726. if(!get_pcvar_num(bulletdamage))
  727. return PLUGIN_HANDLED
  728.  
  729. new attacker = get_user_attacker(id)
  730. #if defined DAMAGE_RECIEVED
  731.  
  732. if ( is_user_connected(id) && is_user_connected(attacker) )
  733. {
  734. new damage = read_data(2)
  735.  
  736. set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
  737. ShowSyncHudMsg(id, g_MsgSync2, "%i^n", damage)
  738. #else
  739. if ( is_user_connected(attacker) )
  740. {
  741. new damage = read_data(2)
  742. #endif
  743. set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
  744. ShowSyncHudMsg(attacker, g_MsgSync, "%i^n", damage)
  745. }
  746. return PLUGIN_CONTINUE
  747. }
  748.  
  749. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  750. //BAD AIM 1.3 by TwistedEuphoria
  751. //==========================================================================================================
  752. public death_hook()
  753. {
  754. new killer = read_data(1)
  755. new victim = read_data(2)
  756.  
  757. if(badaim[killer] && (killer != victim))
  758. {
  759. if(autoban[killer])
  760. {
  761. new kuid = get_user_userid(killer)
  762. new name[32]
  763. get_user_name(killer,name,31)
  764.  
  765. server_cmd("amx_ban #%d 0 Got a kill while affected by bad aim.",kuid)
  766. client_print(0,print_chat, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_KILLED",name)
  767. }
  768. }
  769. return PLUGIN_CONTINUE
  770. }
  771.  
  772. public client_PreThink(id)
  773. {
  774. if(badaim[id])
  775. {
  776. new Float:badvec[3] = {100.0,100.0,100.0}
  777. for(new j = 0;j<6;j++)
  778. {
  779. entity_set_vector(id,EV_VEC_punchangle,badvec)
  780. entity_set_vector(id,EV_VEC_punchangle,badvec)
  781. entity_set_vector(id,EV_VEC_punchangle,badvec) //Three's a charm!
  782. }
  783. }
  784. return PLUGIN_CONTINUE
  785. }
  786.  
  787. public bad_aim(id,level,cid)
  788. {
  789. if(!cmd_access(id,level,cid,2))
  790. return PLUGIN_HANDLED
  791.  
  792. new target[32],tid
  793.  
  794. if(read_argc() == 2)
  795. {
  796. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_CONSOLE")
  797. return PLUGIN_HANDLED
  798. }
  799.  
  800. read_argv(1,target,31)
  801.  
  802. if(get_pcvar_num(ba_followimmunity))
  803. tid = cmd_target(id,target,1)
  804. else
  805. tid = cmd_target(id,target,2)
  806. if(!tid)
  807. return PLUGIN_HANDLED
  808.  
  809. new decstr[8]
  810. read_argv(2,decstr,7)
  811. new decnum
  812. decnum = str_to_num(decstr)
  813. new name[32]
  814.  
  815. get_user_name(tid,name,31)
  816.  
  817. switch(decnum)
  818. {
  819. case 0:
  820. {
  821. if(!badaim[tid])
  822. {
  823. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_NO_BADAIM",name)
  824. return PLUGIN_HANDLED
  825. }
  826.  
  827. badaim[tid] = false
  828. autoban[tid] = false
  829.  
  830. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_UNDO",name)
  831.  
  832. remove_bad_vault(tid)
  833. }
  834. case 1:
  835. {
  836. if(badaim[tid])
  837. {
  838. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_CURRENT",name)
  839. return PLUGIN_HANDLED
  840. }
  841.  
  842. if(get_pcvar_num(autobanall))
  843. autoban[tid] = true
  844. badaim[tid] = true
  845.  
  846. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_WORSE",name)
  847. }
  848. default:
  849. {
  850. if(decnum < 0)
  851. {
  852. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_BADTIME")
  853.  
  854. return PLUGIN_HANDLED
  855. }
  856. if(badaim[tid])
  857.  
  858. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_MESSAGE1",name,decnum)
  859. else
  860. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_MESSAGE2",name,decnum)
  861.  
  862. badaim[tid] = true
  863.  
  864. if (get_pcvar_num(autobantimed) && get_pcvar_num(autobanall))
  865. autoban[tid] = true
  866.  
  867. new pstr[3]
  868. pstr[0] = id
  869. pstr[1] = tid
  870. set_task(float(decnum),"unbad",4554+tid,pstr,2)
  871. }
  872. }
  873.  
  874. new savestr[2]
  875. read_argv(3,savestr,1)
  876. new savenum = str_to_num(savestr)
  877.  
  878. if(savenum)
  879. {
  880. if((decnum != 1) && (decnum != 0))
  881.  
  882. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_BAN")
  883. else
  884. bad_vault(tid)
  885. }
  886. new aname[32], authid[32]
  887. get_user_name(id, aname, 31)
  888. get_user_authid(id, authid, 31)
  889.  
  890. log_amx( "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_LOG", aname, authid, badaim[tid] == true? "set" : "removed", name)
  891. return PLUGIN_HANDLED
  892. }
  893.  
  894. public unbad(pstr[])
  895. {
  896. new id = pstr[0]
  897. new tid = pstr[1]
  898. new name[32]
  899.  
  900. get_user_name(tid,name,31)
  901.  
  902. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_BADAIM_NO_BADAIM_MESSAGE",name)
  903. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_BADAIM_NO_BADAIM_MESSAGE_CONSOLE",name)
  904.  
  905. badaim[tid] = false
  906. autoban[tid] = false
  907. }
  908.  
  909. public bad_vault(id)
  910. {
  911. new sid[35]
  912. get_user_authid(id,sid,34)
  913. new vaultkey[51]
  914.  
  915. format(vaultkey,50,"BADAIM_%s",sid)
  916.  
  917. if(vaultdata_exists(vaultkey))
  918. remove_vaultdata(vaultkey)
  919. set_vaultdata(vaultkey,"1")
  920. }
  921.  
  922. public remove_bad_vault(id)
  923. {
  924. new sid[35]
  925. get_user_authid(id,sid,34)
  926. new vaultkey[51]
  927.  
  928. format(vaultkey,50,"BADAIM_%s",sid)
  929.  
  930. if(vaultdata_exists(vaultkey))
  931. remove_vaultdata(vaultkey)
  932. }
  933.  
  934. public check_bad_vault(id)
  935. {
  936. new sid[35]
  937. get_user_authid(id,sid,34)
  938. new vaultkey[51]
  939.  
  940. format(vaultkey,50,"BADAIM_%s",sid)
  941.  
  942. if(vaultdata_exists(vaultkey))
  943. {
  944. badaim[id] = true
  945. if(get_pcvar_num(autobanall))
  946. autoban[id] = true
  947. }
  948. }
  949.  
  950. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  951. //ADMIN DRUG by Exolent
  952. //==========================================================================================================
  953. public cmd_drug( id, level, cid )
  954. {
  955. if( !cmd_access( id, level, cid, 2 ) )
  956. return PLUGIN_HANDLED
  957.  
  958. new arg[32]
  959. read_argv( 1, arg, 31 )
  960. if( arg[0] == '@' )
  961. {
  962. new players[32], pnum
  963. if( arg[1] == 'a' || arg[1] == 'A' )
  964. {
  965. formatex( arg, 31, "everyone" )
  966. get_players( players, pnum, "a" )
  967. }
  968. else if( arg[1] == 'c' || arg[1] == 'C' )
  969. {
  970. formatex( arg, 31, "all CTs" )
  971. get_players( players, pnum, "ae", "CT" )
  972. }
  973. else if( arg[1] == 't' || arg[1] == 'T' )
  974. {
  975. formatex( arg, 31, "all Ts" )
  976. get_players( players, pnum, "ae", "TERRORIST" )
  977. }
  978. else return PLUGIN_HANDLED
  979.  
  980. if( !pnum ) return PLUGIN_HANDLED
  981.  
  982. for( new i = 0; i < pnum; i++ )
  983. {
  984. message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, players[i] )
  985. write_byte( 180 )
  986. message_end( )
  987. }
  988. new name[32], authid[32]
  989.  
  990. get_user_name( id, name, 31 )
  991. get_user_authid( id, authid, 31 )
  992.  
  993. switch( get_cvar_num( "amx_show_activity" ) )
  994. {
  995. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_DRUG_TEAM_CASE2", name, arg )
  996. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_DRUG_TEAM_CASE1", arg )
  997. }
  998.  
  999. console_print( id, "%L", id, "AMX_SUPER_DRUG_TEAM_MSG", arg )
  1000. log_amx( "%L", LANG_SERVER, "AMX_SUPER_DRUG_TEAM_LOG", name, authid, arg )
  1001. }
  1002. else
  1003. {
  1004. new flags = 7
  1005.  
  1006. if( get_user_flags( id ) & ADMIN_IMMUNITY )
  1007. flags--
  1008. new player = cmd_target( id, arg, flags )
  1009.  
  1010. if( !player ) return PLUGIN_HANDLED
  1011.  
  1012. message_begin( MSG_ONE, gmsg_SetFOV, { 0, 0, 0 }, player )
  1013. write_byte( 180 )
  1014. message_end( )
  1015.  
  1016. new name[32], authid[32]
  1017. new name2[32], authid2[32]
  1018.  
  1019. get_user_name( id, name, 31 )
  1020. get_user_authid( id, authid, 31 )
  1021.  
  1022. get_user_name( player, name2, 31 )
  1023. get_user_authid( player, authid2, 31 )
  1024.  
  1025. switch( get_cvar_num( "amx_show_activity" ) )
  1026. {
  1027. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_DRUG_PLAYER_CASE2", name, name2 )
  1028. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_DRUG_PLAYER_CASE1",name2 )
  1029. }
  1030.  
  1031. console_print( id, "%L", id, "AMX_SUPER_DRUG_PLAYER_MSG", name2 )
  1032. log_amx( "%L", LANG_SERVER, "AMX_SUPER_DRUG_PLAYER_LOG", name, authid, name2, authid2 )
  1033. }
  1034. return PLUGIN_HANDLED
  1035. }
  1036.  
  1037. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1038. //ADMIN SPEED by Exolent
  1039. //==========================================================================================================
  1040. public cmd_speed( id, level, cid )
  1041. {
  1042. if( !cmd_access( id, level, cid, 3 ) )
  1043. return PLUGIN_HANDLED
  1044.  
  1045. new arg[32]
  1046. new arg2[32], bool:num = false
  1047.  
  1048. read_argv( 1, arg, 31 )
  1049. read_argv( 2, arg2, 31 )
  1050.  
  1051. if( str_to_num( arg2 ) == 1 )
  1052. num = true
  1053. if( arg[0] == '@' )
  1054. {
  1055. new players[32], pnum
  1056. if( arg[1] == 'a' || arg[1] == 'A' )
  1057. {
  1058. formatex( arg, 31, "everyone" )
  1059. get_players( players, pnum, "a" )
  1060. }
  1061. else if( arg[1] == 'c' || arg[1] == 'C' )
  1062. {
  1063. formatex( arg, 31, "all CTs" )
  1064. get_players( players, pnum, "ae", "CT" )
  1065. }
  1066. else if( arg[1] == 't' || arg[1] == 'T' )
  1067. {
  1068. formatex( arg, 31, "all Ts" )
  1069. get_players( players, pnum, "ae", "TERRORIST" )
  1070. }
  1071. else return PLUGIN_HANDLED
  1072.  
  1073. if( !pnum ) return PLUGIN_HANDLED
  1074.  
  1075. if( num ) formatex( arg2, 31, "on" )
  1076.  
  1077. else formatex( arg2, 31, "off" )
  1078.  
  1079. new pid;
  1080. for( new i = 0; i < pnum; i++ )
  1081. {
  1082. pid = players[i]
  1083. g_speed[pid] = num
  1084. event_weapon(pid)
  1085. }
  1086.  
  1087. new name[32], authid[32]
  1088.  
  1089. get_user_name( id, name, 31 )
  1090. get_user_authid( id, authid, 31 )
  1091.  
  1092. switch( get_cvar_num( "amx_show_activity" ) )
  1093. {
  1094. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPEED_TEAM_CASE2", name, arg2, arg )
  1095. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPEED_TEAM_CASE1", arg2, arg )
  1096. }
  1097.  
  1098. console_print( id, "%L", id, "AMX_SUPER_SPEED_TEAM_MSG", arg )
  1099. log_amx( "%L", LANG_SERVER, "AMX_SUPER_SPEED_TEAM_LOG", name, authid, arg )
  1100. }
  1101. else
  1102. {
  1103. new flags = 7
  1104.  
  1105. if( get_user_flags( id ) & ADMIN_IMMUNITY )
  1106. flags--
  1107. new player = cmd_target( id, arg, flags )
  1108. if( !player ) return PLUGIN_HANDLED
  1109.  
  1110. g_speed[player] = num
  1111. formatex( arg2, 31, "off" )
  1112.  
  1113. if( g_speed[player] )
  1114. {
  1115. formatex( arg2, 31, "on" )
  1116. }
  1117.  
  1118. event_weapon(player);
  1119.  
  1120. new name[32], name2[32], authid[32], authid2[32]
  1121.  
  1122. get_user_name( id, name, 31 )
  1123. get_user_authid( id, authid, 31 )
  1124.  
  1125. get_user_name( player, name2, 31 )
  1126. get_user_authid( player, authid2, 31 )
  1127.  
  1128. switch( get_cvar_num( "amx_show_activity" ) )
  1129. {
  1130. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPEED_PLAYER_CASE2", name, arg2, name2 )
  1131. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPEED_PLAYER_CASE1", arg2, name2 )
  1132. }
  1133.  
  1134. console_print( id, "%L", id, "AMX_SUPER_SPEED_PLAYER_MSG", name2 )
  1135. log_amx( "%L", LANG_SERVER, "AMX_SUPER_SPEED_PLAYER_LOG", name, authid, name2, authid2 )
  1136. }
  1137. return PLUGIN_HANDLED
  1138. }
  1139.  
  1140. public event_weapon(id)
  1141. {
  1142. new Float:maxspeed;
  1143. pev(id, pev_maxspeed, maxspeed);
  1144. if(maxspeed != 1.0)
  1145. {
  1146. if(g_speed[id])
  1147. {
  1148. maxspeed *= 3.0;
  1149. }
  1150. else if(!g_freezetime) {
  1151. switch(read_data(2)) {
  1152. case CSW_SCOUT: maxspeed=260.0
  1153. case CSW_P90: maxspeed=245.0
  1154. case CSW_XM1014,CSW_AUG,CSW_GALIL,CSW_FAMAS: maxspeed=240.0
  1155. case CSW_SG552 : maxspeed=235.0
  1156. case CSW_M3,CSW_M4A1 : maxspeed=230.0
  1157. case CSW_AK47 : maxspeed=221.0
  1158. case CSW_M249 : maxspeed=220.0
  1159. case CSW_AWP,CSW_SG550,CSW_G3SG1 : maxspeed=210.0
  1160. default : maxspeed=250.0
  1161. }
  1162. }
  1163. set_pev(id, pev_maxspeed, maxspeed);
  1164. }
  1165. }
  1166.  
  1167. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1168. //STATS MARQUEE v1.2 by Travo
  1169. //==========================================================================================================
  1170. public displayplr()
  1171. {
  1172. if (!get_pcvar_num(statsmarquee))
  1173. {
  1174. set_task(60.0,"displayplr",0,"",0,"a",1)
  1175. return PLUGIN_HANDLED
  1176. }
  1177. new Stats[8], Body[8], Name[31], Float:VertLoc2
  1178. new PlrAmt = get_pcvar_num(cvPlrAmt)
  1179. new VertLoc = get_pcvar_num(cvVertLoc)
  1180. new Float:FullTime = get_pcvar_float(cvFullTime)
  1181. new Float:TimeBetw = get_pcvar_float(cvTimeBetw)
  1182.  
  1183. if(VertLoc==1)
  1184. VertLoc2 = -0.74
  1185. else
  1186. VertLoc2 = 0.77
  1187.  
  1188. get_stats(statsm, Stats, Body, Name, 31)
  1189.  
  1190. statsm++
  1191.  
  1192. set_hudmessage(0, 240, 10, 0.70, VertLoc2, 0, TimeBetw, TimeBetw, 0.5, 0.15, -1)
  1193. show_hudmessage(0,"Server Top %d^n%s^nRank %d %d kills %d deaths", PlrAmt, Name, statsm, Stats[0], Stats[1])
  1194.  
  1195. if(statsm >= PlrAmt)
  1196. {
  1197. statsm = 0
  1198. set_task(FullTime,"displayplr",0,"",0,"a",1)
  1199. }
  1200. else
  1201. {
  1202. set_task(TimeBetw,"displayplr",0,"",0,"a",1)
  1203. }
  1204.  
  1205. return PLUGIN_CONTINUE
  1206. }
  1207.  
  1208. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1209. //ADMIN LISTEN v2.3 by Psychoguard, rewritten by Maxim and ported by Oj@eKiLLzZz deb/urandom
  1210. //==========================================================================================================
  1211. public catch_say()
  1212. {
  1213. if (!get_pcvar_num(adminlisten))
  1214. return PLUGIN_CONTINUE;
  1215.  
  1216. new reciever = read_data(0)
  1217. new sender = read_data(1)
  1218. new message[151]
  1219. new channel[151]
  1220. new sender_name[32]
  1221.  
  1222. if (is_running("czero")||is_running("cstrike"))
  1223. {
  1224. read_data(2,channel,150)
  1225. read_data(4,message,150)
  1226. get_user_name(sender, sender_name, 31)
  1227.  
  1228. } else {
  1229.  
  1230. read_data(2,message,150)
  1231. }
  1232.  
  1233. count[sender][reciever] = true
  1234.  
  1235. if (sender == reciever)
  1236. {
  1237. new player_count = get_playersnum()
  1238. new players[32]
  1239.  
  1240. get_players(players, player_count, "c")
  1241.  
  1242. for (new i = 0; i < player_count; i++)
  1243. {
  1244.  
  1245. if (get_user_flags(players[i]) & ADMIN_LEVEL_B)
  1246. {
  1247.  
  1248. if (!count[sender][players[i]])
  1249. {
  1250. message_begin(MSG_ONE, get_user_msgid("SayText"),{0,0,0},players[i])
  1251.  
  1252. write_byte(sender)
  1253.  
  1254. if (is_running("czero")||is_running("cstrike"))
  1255. {
  1256. write_string(channel)
  1257. write_string(sender_name)
  1258. }
  1259. write_string(message)
  1260. message_end()
  1261. }
  1262. }
  1263. count[sender][players[i]] = false
  1264. }
  1265. }
  1266.  
  1267. return PLUGIN_CONTINUE
  1268. }
  1269.  
  1270. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1271. //Enter/Leave Message v1.0 by by [Kindzhon] China Revised by Bmann_420 and Exolent
  1272. //==========================================================================================================
  1273. public client_putinserver(id)
  1274. {
  1275. new param[1]
  1276.  
  1277. param[0] = id
  1278. g_name[id][0] = 0
  1279.  
  1280. get_user_name(id, g_name[id], 31)
  1281.  
  1282. set_task(2.0, "enter_msg", 0, param, 1)
  1283.  
  1284. badaim[id] = false
  1285. autoban[id] = false
  1286. check_bad_vault(id)
  1287.  
  1288.  
  1289. // -- CHECK IF LEFT TO DODGE GAG
  1290. // ------------------------------
  1291. new authid[32]
  1292.  
  1293. get_user_authid( id, authid, 31 )
  1294.  
  1295. g_gagged[id] = 0
  1296. for( new i = 0; i < 33; i++ )
  1297. {
  1298. if( equali( authid, g_wasgagged[i] ) )
  1299. {
  1300. new temp[32]
  1301. switch( g_gagflags[i] )
  1302. {
  1303. case 1: formatex( temp, 31, "a" )
  1304. case 2: formatex( temp, 31, "b" )
  1305. case 3: formatex( temp, 31, "ab" )
  1306. case 4: formatex( temp, 31, "c" )
  1307. case 5: formatex( temp, 31, "ac" )
  1308. case 6: formatex( temp, 31, "bc" )
  1309. case 7: formatex( temp, 31, "abc" )
  1310. }
  1311. new flags = read_flags( temp )
  1312.  
  1313. g_gagged[id] = flags
  1314. if( flags & 4 )
  1315. set_speak( id, SPEAK_MUTED )
  1316.  
  1317. new name[32]
  1318.  
  1319. get_user_name( id, name, 31 )
  1320.  
  1321. client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_CONNECTED", name )
  1322.  
  1323. new ungagid[1]
  1324.  
  1325. ungagid[0] = id
  1326. g_wasgagged[i][0] = 0
  1327.  
  1328. set_task( float( GAG_TIME ), "task_ungag", id, ungagid, 1 )
  1329. break;
  1330. }
  1331. }
  1332.  
  1333. return PLUGIN_CONTINUE
  1334. }
  1335.  
  1336. public leave_msg(param[])
  1337. {
  1338. if (get_pcvar_num(joinleave_message) == 1 && get_pcvar_num(leavemessage_enable) == 1)
  1339. {
  1340. new id = param[0]
  1341.  
  1342. if(is_user_bot(id)) return PLUGIN_HANDLED
  1343.  
  1344. new message[192], hostname[64]
  1345.  
  1346. get_pcvar_string(leavemessage, message, 191)
  1347. get_cvar_string("hostname", hostname, 63)
  1348.  
  1349. replace(message, 191, "%hostname%", hostname)
  1350. replace(message, 191, "%name%", g_name[id])
  1351.  
  1352. replace_all(message, 191, "\n", "^n")
  1353.  
  1354. set_hudmessage(255, 0, 255, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
  1355. show_hudmessage(0, message)
  1356. }
  1357.  
  1358. return PLUGIN_CONTINUE
  1359. }
  1360.  
  1361. public enter_msg(param[])
  1362. {
  1363. if (get_pcvar_num(joinleave_message) == 1)
  1364. {
  1365. new id = param[0]
  1366.  
  1367. if(is_user_bot(id)) return PLUGIN_HANDLED
  1368.  
  1369. new message[192], hostname[64]
  1370.  
  1371. get_pcvar_string(entermessage, message, 191)
  1372.  
  1373. get_cvar_string("hostname", hostname, 63)
  1374. replace(message,191, "%hostname%", hostname)
  1375.  
  1376. if (cvar_exists("csstats_reset"))
  1377. {
  1378. new data[8], rankpos[8], pos
  1379.  
  1380. pos = get_user_stats(id, data, data)
  1381.  
  1382. num_to_str(pos, rankpos, 7)
  1383.  
  1384. replace(message, 191, "%rankpos%", rankpos)
  1385. replace(message, 191, "%name%", g_name[id])
  1386.  
  1387. replace_all(message, 191, "\n", "^n")
  1388.  
  1389. if (get_user_flags(id) & ADMIN_RESERVATION) {
  1390.  
  1391. set_hudmessage(255, 0, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
  1392. show_hudmessage(0, message)
  1393.  
  1394. client_cmd(0,"spk buttons/blip1.wav")
  1395. return PLUGIN_HANDLED
  1396.  
  1397. }
  1398. else
  1399. {
  1400.  
  1401. set_hudmessage(0, 255, 0, 0.10, 0.55, 0, 6.0, 6.0, 0.5, 0.15, 3)
  1402. show_hudmessage(0, message)
  1403. }
  1404. }
  1405. }
  1406.  
  1407. return PLUGIN_CONTINUE
  1408. }
  1409.  
  1410. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1411. //VOCOM ADMIN v1.3 by Nut
  1412. //==========================================================================================================
  1413. public client_authorized(id) {
  1414.  
  1415. if (get_user_flags(id) & ADMIN_RESERVATION) {
  1416. g_admin[id] = 1
  1417. }
  1418. }
  1419.  
  1420. public voice_hook(id) {
  1421. g_voicemask[id]=read_data(2)
  1422. }
  1423.  
  1424. public fm_mute_forward(receiver, sender, listen) {
  1425.  
  1426. if (receiver == sender) return FMRES_IGNORED
  1427. if (get_user_speak(sender) == SPEAK_ADMIN) {
  1428.  
  1429. if (g_admin[receiver] == 1) {
  1430. engfunc(EngFunc_SetClientListening, receiver, sender, SPEAK_NORMAL2)
  1431. }else{
  1432. engfunc(EngFunc_SetClientListening, receiver, sender, SPEAK_MUTED2)
  1433. }
  1434.  
  1435. return FMRES_SUPERCEDE
  1436. }
  1437. else if(g_voicemask[receiver] & 1<<(sender-1)) {
  1438. engfunc(EngFunc_SetClientListening, receiver, sender, SPEAK_MUTED)
  1439. forward_return(FMV_CELL,false)
  1440. }
  1441. return FMRES_IGNORED
  1442. }
  1443.  
  1444. public set_user_speak(id,listen) {
  1445. g_playerspk[id] = listen
  1446. }
  1447.  
  1448. public get_user_speak(id) {
  1449. return g_playerspk[id]
  1450. }
  1451.  
  1452. public vocomStart(id) {
  1453.  
  1454. if (!g_admin[id]) {
  1455.  
  1456. client_print(id,print_chat, "%L", LANG_PLAYER, "AMX_SUPER_VOCOM_NO_ACCESS")
  1457. return PLUGIN_HANDLED
  1458. }
  1459.  
  1460. client_cmd(id,"+voicerecord")
  1461.  
  1462. set_user_speak(id,SPEAK_ADMIN)
  1463.  
  1464. new name[33]
  1465.  
  1466. get_user_name(id,name,32)
  1467.  
  1468. get_players(players, pCount, "c")
  1469.  
  1470. for (new i = 0; i < pCount; i++) {
  1471. if (g_admin[i]) {
  1472. if (i != id) {
  1473.  
  1474. client_print(i,print_chat, "%L", LANG_PLAYER, "AMX_SUPER_VOCOM_SPEAKING1",name)
  1475. }
  1476. }
  1477. }
  1478.  
  1479. client_print(id,print_chat, "%L", LANG_PLAYER, "AMX_SUPER_VOCOM_SPEAKING2",name)
  1480. return PLUGIN_HANDLED
  1481. }
  1482.  
  1483. public vocomStop(id) {
  1484.  
  1485. if(is_user_connected(id)) {
  1486.  
  1487. client_cmd(id,"-voicerecord")
  1488. if(get_user_speak(id) == SPEAK_ADMIN) {
  1489.  
  1490. set_user_speak(id,SPEAK_NORMAL2)
  1491. }
  1492. }
  1493. return PLUGIN_HANDLED
  1494. }
  1495.  
  1496.  
  1497. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1498. //Ultra Glow v1.1 by Remo Williams
  1499. //Rewritten by Exolent
  1500. //==========================================================================================================
  1501. public cmd_glow(id, level, cid)
  1502. {
  1503. if(!cmd_access(id, level, cid, 3))
  1504. return PLUGIN_HANDLED
  1505.  
  1506. new command[16], arg1[32], arg2[32], arg3[32], arg4[32], arg5[32]
  1507. read_argv(0, command, 15)
  1508. read_argv(1, arg1, 31)
  1509. read_argv(2, arg2, 31)
  1510. read_argv(3, arg3, 31)
  1511. read_argv(4, arg4, 31)
  1512. read_argv(5, arg5, 31)
  1513.  
  1514. new bool:isPermGlow = false
  1515. if(command[8] == '2')
  1516. isPermGlow = true
  1517.  
  1518. new name[32], authid[32]
  1519. get_user_name(id, name, 31)
  1520. get_user_authid(id, authid, 31)
  1521.  
  1522. if(!color_check(arg2)&&!strlen(arg3))
  1523. {
  1524. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_GLOW_INVALID_COLOR")
  1525. return PLUGIN_HANDLED
  1526. }
  1527.  
  1528. new num, bool:valid = false
  1529. for(num = 0; num < 30; num++)
  1530. {
  1531. if(equali(g_sColors[num],arg2))
  1532. {
  1533. valid = true
  1534. break;
  1535. }
  1536. }
  1537. new rnum, gnum, bnum, anum, bool:isOff = false;
  1538. if(valid)
  1539. {
  1540. if(equali(arg2, "off")) isOff = true;
  1541. rnum = g_iColors[num][0]
  1542. gnum = g_iColors[num][1]
  1543. bnum = g_iColors[num][2]
  1544. anum = 255
  1545. }
  1546. else if(!valid && strlen(arg5))
  1547. {
  1548. rnum = str_to_num(arg2)
  1549. gnum = str_to_num(arg3)
  1550. bnum = str_to_num(arg4)
  1551. anum = str_to_num(arg5)
  1552. if(rnum == 0 && gnum == 0 && bnum == 0 && anum == 255) isOff = true;
  1553. }
  1554. else
  1555. {
  1556. console_print(id, "[AMXX] Please include the correct parameters.")
  1557. console_print(id, "Usage: amx_glow(2) <nick, #userid, or authid> <color>")
  1558. console_print(id, "Usage: amx_glow(2) <nick, #userid, or authid> <rrr> <ggg> <bbb> <aaa>")
  1559. return PLUGIN_HANDLED;
  1560. }
  1561. if(rnum > 255) rnum = 255
  1562. else if(rnum < 0) rnum = 0
  1563. if(gnum > 255) gnum = 255
  1564. else if(gnum < 0) gnum = 0
  1565. if(bnum > 255) bnum = 255
  1566. else if(bnum < 0) bnum = 0
  1567. if(anum > 255) anum = 255
  1568. else if(anum < 0) anum = 0
  1569.  
  1570. new pid, activity = get_cvar_num("amx_show_activity")
  1571. if(arg1[0] == '@')
  1572. {
  1573. new players[32], pnum
  1574. if(equali("T",arg1[1])) copy( arg1[1], 31, "TERRORIST" )
  1575. if(equali("ALL",arg1[1])) get_players( players, pnum, "a" )
  1576. else get_players( players, pnum, "ae", arg1[1] )
  1577.  
  1578. if(!pnum) return PLUGIN_HANDLED
  1579. for( new i = 0; i < pnum; i++ )
  1580. {
  1581. pid = players[i]
  1582. HasPermGlow[pid] = isPermGlow
  1583. if(isPermGlow)
  1584. {
  1585. g_glow[pid][0] = rnum
  1586. g_glow[pid][1] = gnum
  1587. g_glow[pid][2] = bnum
  1588. g_glow[pid][3] = anum
  1589. }
  1590. else
  1591. {
  1592. for(new j = 0; j < 4; j++ )
  1593. g_glow[pid][j] = 0
  1594. }
  1595. set_user_rendering(pid, kRenderFxGlowShell, rnum, gnum, bnum, kRenderTransAlpha, anum)
  1596. }
  1597. switch(activity)
  1598. {
  1599. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, isOff? "AMX_SUPER_GLOW_TEAM_OFF_CASE2" : "AMX_SUPER_GLOW_TEAM_CASE2", name, arg1[1])
  1600. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, isOff? "AMX_SUPER_GLOW_TEAM_OFF_CASE1" : "AMX_SUPER_GLOW_TEAM_CASE1", arg1[1])
  1601. }
  1602. console_print(id, "%L", id, "AMX_SUPER_GLOW_TEAM_MSG", arg1[1])
  1603. log_amx("%L", LANG_SERVER, "AMX_SUPER_GLOW_TEAM_LOG", name, authid, arg1[1])
  1604. return PLUGIN_HANDLED
  1605. }
  1606. pid = cmd_target(id, arg1, 2)
  1607. if(!pid) return PLUGIN_HANDLED
  1608.  
  1609. new pname[32], pauthid[32]
  1610.  
  1611. get_user_name(pid, pname, 31)
  1612. get_user_authid(pid, pauthid, 31)
  1613.  
  1614. HasPermGlow[pid] = isPermGlow
  1615. if(isPermGlow)
  1616. {
  1617. g_glow[pid][0] = rnum
  1618. g_glow[pid][1] = gnum
  1619. g_glow[pid][2] = bnum
  1620. g_glow[pid][3] = anum
  1621. }
  1622. else
  1623. {
  1624. for( new j = 0; j < 4; j++ )
  1625. g_glow[pid][j] = 0
  1626. }
  1627. set_user_rendering(pid, kRenderFxGlowShell, rnum, gnum, bnum, kRenderTransAlpha, anum)
  1628. switch(activity)
  1629. {
  1630. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, isOff? "AMX_SUPER_GLOW_PLAYER_OFF_CASE2" : "AMX_SUPER_GLOW_PLAYER_CASE2", name, pname)
  1631. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, isOff? "AMX_SUPER_GLOW_PLAYER_OFF_CASE1" : "AMX_SUPER_GLOW_PLAYER_CASE1", pname)
  1632. }
  1633. console_print(id, "%L", id, "AMX_SUPER_GLOW_PLAYER_MSG", pname)
  1634. log_amx("%L", LANG_SERVER, "AMX_SUPER_GLOW_PLAYER_LOG", name, authid, pname, pauthid)
  1635. return PLUGIN_HANDLED
  1636. }
  1637.  
  1638. public cmd_glowcolors(id, level, cid)
  1639. {
  1640. if(!cmd_access(id, level, cid, 0))
  1641. return PLUGIN_HANDLED;
  1642.  
  1643. new sColors[192], i
  1644. for(i = 0; i < 30; i += 5)
  1645. {
  1646. if(i == 0) formatex(sColors, 191, "Colors: %s,",g_sColors[0])
  1647. else formatex(sColors, 191, "%s,", g_sColors[i])
  1648. color_print(id, i + 1, sColors)
  1649. }
  1650. console_print(id, "Example: amx_glow ^"jimmy^" ^"red^"")
  1651. return PLUGIN_HANDLED
  1652. }
  1653.  
  1654. public color_print(id, num, string[])
  1655. {
  1656. for(new max = num + 4; num < max; num++)
  1657. formatex(string, 191, "%s %s,", string, g_sColors[num])
  1658. console_print(id, "%s", string)
  1659. }
  1660.  
  1661. stock color_check(color[])
  1662. {
  1663. new bool:valid = false
  1664. for(new i = 0; i < 30; i++)
  1665. {
  1666. if(equali(g_sColors[i],color))
  1667. {
  1668. valid = true
  1669. break;
  1670. }
  1671. }
  1672. return valid;
  1673. }
  1674.  
  1675. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1676. //SPAWN PROTECTION v7.1 by Peli Revised for Glow On/Off by KaszpiR Revised by Bmann_420
  1677. //==========================================================================================================
  1678. public cmd_sptime(id, level, cid)
  1679. {
  1680. if(!cmd_access(id, level, cid, 2))
  1681. return PLUGIN_HANDLED
  1682.  
  1683. new arg_str[3]
  1684. read_argv(1, arg_str, 3)
  1685. new arg = str_to_num(arg_str)
  1686.  
  1687. if(arg > 10 || arg < 1)
  1688. {
  1689. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_BADTIME")
  1690. return PLUGIN_HANDLED
  1691. }
  1692.  
  1693. else if (arg > 0 || arg < 11)
  1694. {
  1695. set_pcvar_num(sv_sptime, arg)
  1696. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_TIME_SET", arg)
  1697. return PLUGIN_HANDLED
  1698. }
  1699. return PLUGIN_CONTINUE
  1700. }
  1701.  
  1702. public cmd_spmessage(id, level, cid)
  1703. {
  1704. if (!cmd_access(id, level, cid, 2))
  1705. {
  1706. return PLUGIN_HANDLED
  1707. }
  1708.  
  1709. new sp[3]
  1710. read_argv(1, sp, 2)
  1711.  
  1712. if (sp[0] == '1')
  1713. {
  1714. set_pcvar_num(sv_spmessage, 1)
  1715. }
  1716.  
  1717. else if (sp[0] == '0')
  1718. {
  1719. set_pcvar_num(sv_spmessage, 0)
  1720. }
  1721.  
  1722. else if (sp[0] != '1' || sp[0] != '0')
  1723. {
  1724.  
  1725. console_print(id, "Usage : amx_spmessage 1 = Messages ON | 0 = Messages OFF")
  1726. return PLUGIN_HANDLED
  1727.  
  1728. }
  1729.  
  1730. return PLUGIN_HANDLED
  1731. }
  1732.  
  1733. public cmd_spshellthickness(id, level, cid)
  1734. {
  1735. if(!cmd_access(id, level, cid, 2))
  1736. return PLUGIN_HANDLED
  1737.  
  1738. new arg_str[3]
  1739. read_argv(1, arg_str, 3)
  1740. new arg = str_to_num(arg_str)
  1741.  
  1742. if(arg > 100 || arg < 1)
  1743. {
  1744.  
  1745. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_BADSHELL")
  1746. return PLUGIN_HANDLED
  1747.  
  1748. }
  1749.  
  1750. else if (arg > 0 || arg < 101)
  1751. {
  1752. set_pcvar_num(sv_spshellthick, arg)
  1753. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_SHELL_SET", arg)
  1754. return PLUGIN_HANDLED
  1755. }
  1756. return PLUGIN_CONTINUE
  1757. }
  1758.  
  1759. public cmd_spglow(id, level, cid)
  1760. {
  1761. if(!cmd_access(id, level, cid, 2))
  1762. return PLUGIN_HANDLED
  1763.  
  1764. new arg_str[3]
  1765. read_argv(1, arg_str, 3)
  1766. new arg = str_to_num(arg_str)
  1767.  
  1768.  
  1769. if (arg > 0)
  1770. {
  1771. arg = 1
  1772. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_GLOW_ON")
  1773. }
  1774. else
  1775. {
  1776. arg = 0
  1777. client_print(id, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_GLOW_OFF")
  1778. }
  1779. set_pcvar_num(sv_spglow, arg)
  1780.  
  1781. return PLUGIN_CONTINUE
  1782. }
  1783.  
  1784. public sp_on(id)
  1785. {
  1786. if (get_pcvar_num(sv_sp) == 1)
  1787. {
  1788. set_task(0.1, "protect", id)
  1789. }
  1790.  
  1791. return PLUGIN_CONTINUE
  1792. }
  1793.  
  1794. public protect(id)
  1795. {
  1796. new Float:SPTime = get_pcvar_float(sv_sptime)
  1797. new SPSecs = get_pcvar_num(sv_sptime)
  1798. new FTime = get_cvar_num("mp_freezetime")
  1799. new SPShell = get_pcvar_num(sv_spshellthick)
  1800. set_user_godmode(id, 1)
  1801.  
  1802. if(get_pcvar_num(sv_spglow)) {
  1803.  
  1804. if(get_user_team(id) == 1)
  1805. {
  1806. set_user_rendering(id, kRenderFxGlowShell, 255, 0, 0, kRenderNormal, SPShell)
  1807. }
  1808.  
  1809. if(get_user_team(id) == 2)
  1810. {
  1811. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 255, kRenderNormal, SPShell)
  1812. }
  1813. }
  1814.  
  1815. if(get_pcvar_num(sv_spmessage) == 1)
  1816. {
  1817.  
  1818. set_hudmessage(255, 1, 1, -1.0, -1.0, 0, 6.0, SPTime+FTime, 0.1, 0.2, 4)
  1819. show_hudmessage(id, "%L", LANG_PLAYER, "AMX_SUPER_SPAWN_PROTECTION_MESSAGE", SPSecs)
  1820.  
  1821. }
  1822.  
  1823. set_task(SPTime+FTime, "sp_off", id)
  1824. return PLUGIN_HANDLED
  1825. }
  1826.  
  1827. public sp_off(id)
  1828. {
  1829. if(!is_user_connected(id))
  1830. {
  1831.  
  1832. return PLUGIN_HANDLED
  1833.  
  1834. }
  1835. else if( HasPermGlow[id] )
  1836. {
  1837. set_user_rendering( id, kRenderFxGlowShell, g_glow[id][0], g_glow[id][1], g_glow[id][2], kRenderTransAlpha, g_glow[id][3] )
  1838. }
  1839.  
  1840. else
  1841. {
  1842. set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 255)
  1843. }
  1844. set_user_godmode(id, 0)
  1845. return PLUGIN_HANDLED
  1846. }
  1847.  
  1848.  
  1849. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1850. //ADMIN EXTEND v1.1 by JSauce
  1851. //==========================================================================================================
  1852. public admin_extend(id,level,cid)
  1853. {
  1854. if (!cmd_access(id,level,cid,2))
  1855. return PLUGIN_HANDLED
  1856.  
  1857. new arg[32],name[32]
  1858. read_argv(1,arg,31)
  1859. get_user_name(id,name,31)
  1860. #if defined MAPCYCLE
  1861. if (!cyclerfile)
  1862. {
  1863. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXTEND_NOMAPCYCLE")
  1864. return PLUGIN_HANDLED
  1865. }
  1866. #endif
  1867. if (arg[0])
  1868. {
  1869. if(containi(arg,"-") != -1)
  1870. {
  1871. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXTEND_BAD_NUMBER")
  1872. return PLUGIN_HANDLED
  1873. }
  1874. new tlimit = str_to_num(arg)
  1875. if (user_limit >= EXTENDMAX)
  1876. {
  1877. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXTEND_EXTENDMAX",EXTENDMAX)
  1878. return PLUGIN_HANDLED
  1879. }
  1880. if (tlimit > EXTENDTIME)
  1881. {
  1882. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXTEND_EXTENDTIME",EXTENDTIME)
  1883. tlimit = EXTENDTIME
  1884. }
  1885. set_cvar_float("mp_timelimit",get_cvar_float("mp_timelimit") + tlimit)
  1886. client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXTEND_SUCCESS",name,tlimit)
  1887. ++user_limit
  1888. return PLUGIN_HANDLED
  1889. }
  1890.  
  1891. return PLUGIN_HANDLED
  1892. }
  1893.  
  1894.  
  1895. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1896. //C4 Timer v1.1 by Cheap_Suit
  1897. //==========================================================================================================
  1898. public event_hltv()
  1899. g_c4timer = get_pcvar_num(mp_c4timer)
  1900.  
  1901. public logevent_plantedthebomb()
  1902. {
  1903. new showtteam = get_pcvar_num(cvar_showteam)
  1904.  
  1905. static players[32], num, i
  1906. switch(showtteam)
  1907. {
  1908. case 1: get_players(players, num, "ace", "TERRORIST")
  1909. case 2: get_players(players, num, "ace", "CT")
  1910. case 3: get_players(players, num, "ac")
  1911. default: return
  1912. }
  1913. for(i = 0; i < num; ++i) set_task(1.0, "update_timer", players[i])
  1914. }
  1915.  
  1916. public update_timer(id)
  1917. {
  1918. message_begin(MSG_ONE_UNRELIABLE, g_msg_showtimer, _, id)
  1919. message_end()
  1920.  
  1921. message_begin(MSG_ONE_UNRELIABLE, g_msg_roundtime, _, id)
  1922. write_short(g_c4timer)
  1923. message_end()
  1924.  
  1925. message_begin(MSG_ONE_UNRELIABLE, g_msg_scenario, _, id)
  1926. write_byte(1)
  1927. write_string(g_timersprite[clamp(get_pcvar_num(cvar_sprite), 0, (MAX_SPRITES - 1))])
  1928. write_byte(150)
  1929. write_short(get_pcvar_num(cvar_flash) ? 20 : 0)
  1930. message_end()
  1931.  
  1932. if(get_pcvar_num(cvar_msg))
  1933. {
  1934. set_hudmessage(255, 180, 0, 0.44, 0.87, 2, 6.0, 6.0)
  1935. show_hudmessage(id, g_message)
  1936. }
  1937. }
  1938. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1939. //ADMIN CHECK v1.15 by OneEyed
  1940. //==========================================================================================================
  1941. public show_admins(user)
  1942. {
  1943. new message[256]
  1944. if(get_pcvar_num(admincheck))
  1945. {
  1946. new adminnames[33][32]
  1947. new contactinfo[256], contact[112]
  1948. new id, count, x, len
  1949.  
  1950. for(id = 1 ; id <= maxplayers ; id++)
  1951. if(is_user_connected(id))
  1952. if(get_user_flags(id) & ADMIN_CHECK)
  1953. get_user_name(id, adminnames[count++], 31)
  1954.  
  1955. len = format(message, 255, "%s ADMINS ONLINE: ",COLOR)
  1956. if(count > 0) {
  1957. for(x = 0 ; x < count ; x++) {
  1958. len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
  1959. if(len > 96 ) {
  1960. print_message(user, message)
  1961. len = format(message, 255, "%s ",COLOR)
  1962. }
  1963. }
  1964. print_message(user, message)
  1965. }
  1966. else {
  1967. len += format(message[len], 255-len, "No admins online.")
  1968. print_message(user, message)
  1969. }
  1970.  
  1971. get_cvar_string("amx_contactinfo", contact, 63)
  1972. if(contact[0]) {
  1973. format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
  1974. print_message(user, contactinfo)
  1975. }
  1976. }
  1977. else
  1978. {
  1979. formatex(message, 255, "^x04 Admin Check is currently DISABLED.")
  1980. print_message(user, message)
  1981. }
  1982. }
  1983.  
  1984. print_message(id, msg[]) {
  1985. message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
  1986. write_byte(id)
  1987. write_string(msg)
  1988. message_end()
  1989. }
  1990.  
  1991. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  1992. //ADMIN FLASH v1.0 by AssKicR
  1993. //Rewritten by Bo0m!
  1994. //==========================================================================================================
  1995. public admin_flash(id,level,cid) {
  1996. if (!cmd_access(id,level,cid,2))
  1997. return PLUGIN_HANDLED
  1998.  
  1999. new arg[32]
  2000. new name[32], name2[32], authid[35], authid2[35]
  2001. read_argv(1,arg,31)
  2002. get_user_name(id,name,31)
  2003. get_user_authid(id,authid,34)
  2004.  
  2005. if (arg[0]=='@'){
  2006. new players[32], inum
  2007. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  2008. if (equali("ALL",arg[1])) get_players(players,inum)
  2009. else get_players(players,inum,"e",arg[1])
  2010.  
  2011. if (inum == 0) {
  2012. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2013. return PLUGIN_HANDLED
  2014. }
  2015.  
  2016. for(new a = 0;a < inum; a++) {
  2017. if (get_user_flags(players[a]) & ADMIN_IMMUNITY) {
  2018. get_user_name(players[a],name2,31)
  2019. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",name2)
  2020. continue
  2021. }
  2022.  
  2023. Flash(players[a])
  2024. }
  2025.  
  2026. switch(get_cvar_num("amx_show_activity")) {
  2027. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_TEAM_CASE2",name,arg[1])
  2028. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_TEAM_CASE1",arg[1])
  2029. }
  2030.  
  2031. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_TEAM_MSG",arg[1])
  2032. log_amx("%L", LANG_SERVER, "AMX_SUPER_FLASH_TEAM_LOG", name,authid,arg[1])
  2033. }
  2034. else {
  2035.  
  2036. new player = cmd_target(id,arg,7)
  2037. if (!player) return PLUGIN_HANDLED
  2038.  
  2039. Flash(player)
  2040.  
  2041. get_user_name(player,name2,31)
  2042. get_user_authid(player,authid2,34)
  2043.  
  2044. switch(get_cvar_num("amx_show_activity")) {
  2045. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_PLAYER_CASE2",name,name2)
  2046. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_PLAYER_CASE1",name2)
  2047. }
  2048.  
  2049. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_FLASH_PLAYER_MSG",name2)
  2050. log_amx("%L", LANG_SERVER, "AMX_SUPER_FLASH_PLAYER_LOG", name,authid,name2,authid2)
  2051. }
  2052. return PLUGIN_HANDLED
  2053. }
  2054.  
  2055. public Flash(id) {
  2056. message_begin(MSG_ONE,gMsgScreenFade,{0,0,0},id)
  2057. write_short( 1<<15 )
  2058. write_short( 1<<10 )
  2059. write_short( 1<<12 )
  2060. write_byte( 255 )
  2061. write_byte( 255 )
  2062. write_byte( 255 )
  2063. write_byte( 255 )
  2064. message_end()
  2065.  
  2066. if(get_pcvar_num(flashsound) == 1)
  2067. emit_sound(id,CHAN_BODY, "weapons/flashbang-2.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
  2068. }
  2069.  
  2070. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2071. //ADMIN UNLIMITED AMMO v1.0 by regalis ripped from Superhero Punisher by {HOJ} Batman
  2072. //==========================================================================================================
  2073. public admin_unammo(id, level, cid)
  2074. {
  2075. if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED
  2076.  
  2077. new arg1[32], arg2[2]
  2078. read_argv(1, arg1, 31)
  2079. read_argv(2, arg2, 1)
  2080. new setting = str_to_num(arg2)
  2081. new name[32], authid[36]
  2082.  
  2083. get_user_name(id, name, 31)
  2084. get_user_authid(id, authid, 35)
  2085.  
  2086. if(equali(arg1, "@", 1))
  2087. {
  2088. new players[32], num
  2089.  
  2090. if(containi(arg1, "ALL") != -1)
  2091. {
  2092. get_players(players, num)
  2093. formatex(arg1[1], 30, "players");
  2094. }
  2095. else get_players(players, num, "e", !equali(arg1, "CT") ? "TERRORIST":"CT")
  2096.  
  2097. if(!num)
  2098. {
  2099. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2100. return PLUGIN_HANDLED
  2101. }
  2102. for(new i = 0; i < num; i++)
  2103. {
  2104. switch(setting)
  2105. {
  2106. case 0:{unammo[players[i]] = false;}
  2107. case 1:{unammo[players[i]] = true;}
  2108. }
  2109. }
  2110. switch(get_cvar_num("amx_show_activity"))
  2111. {
  2112. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_TEAM_CASE2", name, arg1[1], setting)
  2113. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_TEAM_CASE1", arg1[1], setting)
  2114. }
  2115. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_TEAM_MSG", arg1[1], setting)
  2116. log_amx("%L", LANG_SERVER, "AMX_SUPER_AMMO_TEAM_LOG", name, authid, arg1[1], setting)
  2117. }
  2118. else
  2119. {
  2120. new name2[32], authid2[36]
  2121. new player = cmd_target(id, arg1, 2)
  2122.  
  2123. if(!player) return PLUGIN_HANDLED
  2124.  
  2125. get_user_name(player, name2, 31)
  2126. get_user_authid(player, authid2, 35)
  2127. switch(setting)
  2128. {
  2129. case 0:{unammo[player] = false;}
  2130. case 1:{unammo[player] = true;}
  2131. }
  2132. switch(get_cvar_num("amx_show_activity"))
  2133. {
  2134. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_PLAYER_CASE2", name, name2, setting)
  2135. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_PLAYER_CASE1", name2, setting)
  2136. }
  2137. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_AMMO_PLAYER_MSG", name2, setting)
  2138. log_amx("%L", LANG_SERVER, "AMX_SUPER_AMMO_PLAYER_LOG", name, authid, name2, authid2, setting)
  2139. }
  2140. return PLUGIN_HANDLED
  2141. }
  2142.  
  2143. public reloadAmmo(id)
  2144. {
  2145. if (!is_user_connected(id)) return;
  2146.  
  2147. if (gReloadTime[id] >= get_systime() - 1) return;
  2148. gReloadTime[id] = get_systime();
  2149.  
  2150. new clip, ammo, wpn[32];
  2151. new wpnid = get_user_weapon(id, clip, ammo);
  2152.  
  2153. if (wpnid == CSW_C4 || wpnid == CSW_KNIFE || wpnid == 0) return;
  2154. if (wpnid == CSW_HEGRENADE || wpnid == CSW_SMOKEGRENADE || wpnid == CSW_FLASHBANG) return;
  2155.  
  2156. if (clip == 0)
  2157. {
  2158. get_weaponname(wpnid,wpn,31);
  2159. new iWPNidx = -1;
  2160. while((iWPNidx = find_ent_by_class(iWPNidx, wpn)) != 0)
  2161. {
  2162. if(id == entity_get_edict(iWPNidx, EV_ENT_owner))
  2163. {
  2164. cs_set_weapon_ammo(iWPNidx, getMaxClipAmmo(wpnid));
  2165. break;
  2166. }
  2167. }
  2168. }
  2169. }
  2170.  
  2171. stock getMaxClipAmmo(wpnid)
  2172. {
  2173. new clipammo = 0;
  2174. switch (wpnid)
  2175. {
  2176. case CSW_P228 : clipammo = 13;
  2177. case CSW_SCOUT : clipammo = 10;
  2178. case CSW_HEGRENADE : clipammo = 0;
  2179. case CSW_XM1014 : clipammo = 7;
  2180. case CSW_C4 : clipammo = 0;
  2181. case CSW_MAC10 : clipammo = 30;
  2182. case CSW_AUG : clipammo = 30;
  2183. case CSW_SMOKEGRENADE : clipammo = 0;
  2184. case CSW_ELITE : clipammo = 15;
  2185. case CSW_FIVESEVEN : clipammo = 20;
  2186. case CSW_UMP45 : clipammo = 25;
  2187. case CSW_SG550 : clipammo = 30;
  2188. case CSW_GALI : clipammo = 35;
  2189. case CSW_FAMAS : clipammo = 25;
  2190. case CSW_USP : clipammo = 12;
  2191. case CSW_GLOCK18 : clipammo = 20;
  2192. case CSW_AWP : clipammo = 10;
  2193. case CSW_MP5NAVY : clipammo = 30;
  2194. case CSW_M249 : clipammo = 100;
  2195. case CSW_M3 : clipammo = 8;
  2196. case CSW_M4A1 : clipammo = 30;
  2197. case CSW_TMP : clipammo = 30;
  2198. case CSW_G3SG1 : clipammo = 20;
  2199. case CSW_FLASHBANG : clipammo = 0;
  2200. case CSW_DEAGLE : clipammo = 7;
  2201. case CSW_SG552 : clipammo = 30;
  2202. case CSW_AK47 : clipammo = 30;
  2203. case CSW_KNIFE : clipammo = 0;
  2204. case CSW_P90 : clipammo = 50;
  2205. }
  2206. return clipammo;
  2207. }
  2208.  
  2209.  
  2210. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2211. //TEAM/PLAYER TRANSFER v1.0 by Doombringer/Deviance
  2212. //==========================================================================================================
  2213. public cmd_transfer(id, level, cid)
  2214. {
  2215. if (!cmd_access(id, level, cid, 2))
  2216. return PLUGIN_HANDLED
  2217.  
  2218. new arg1[32], arg2[32]
  2219.  
  2220. read_argv(1, arg1, 31)
  2221. read_argv(2, arg2, 31)
  2222.  
  2223. new player = cmd_target(id, arg1, 2)
  2224.  
  2225. if(!player)
  2226. return PLUGIN_HANDLED
  2227.  
  2228. new teamname[32]
  2229.  
  2230. if(!strlen(arg2))
  2231. {
  2232. cs_set_user_team(player, cs_get_user_team(player) == CS_TEAM_CT ? CS_TEAM_T:CS_TEAM_CT)
  2233. teamname = cs_get_user_team(player) == CS_TEAM_CT ? "Counter-Terrorists":"Terrorists"
  2234. }
  2235. else
  2236. {
  2237. if(equali(arg2, "T"))
  2238. {
  2239. cs_set_user_team(player, CS_TEAM_T)
  2240. teamname = "Terrorists"
  2241. spawn(player)
  2242. }
  2243. else if(equali(arg2, "CT"))
  2244. {
  2245. cs_set_user_team(player, CS_TEAM_CT)
  2246. teamname = "Counter-Terrorists"
  2247. spawn(player)
  2248. }
  2249. else if(equali(arg2, "SPEC"))
  2250. {
  2251. user_silentkill(player)
  2252. cs_set_user_team(player, CS_TEAM_SPECTATOR)
  2253.  
  2254. teamname = "Spectator"
  2255. }
  2256. else
  2257. {
  2258. client_print(id, print_console, "[AMX_SUPER] Invalid team specified!")
  2259. return PLUGIN_HANDLED
  2260. }
  2261. }
  2262.  
  2263. new name[32], admin[32], steamid[38]
  2264.  
  2265. get_user_name(id, admin, 31)
  2266. get_user_name(player, name, 31)
  2267.  
  2268. get_user_authid(id, steamid, 37)
  2269.  
  2270. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER", name, teamname)
  2271. client_print(player, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_TEAM", teamname)
  2272.  
  2273. log_amx("%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_LOG", admin, steamid, name, teamname)
  2274.  
  2275. return PLUGIN_HANDLED
  2276. }
  2277.  
  2278. public cmd_swap(id, level, cid)
  2279. {
  2280. if (!cmd_access(id, level, cid, 3))
  2281. return PLUGIN_HANDLED
  2282.  
  2283. new arg1[32], arg2[32]
  2284.  
  2285. read_argv(1, arg1, 31)
  2286. read_argv(2, arg2, 31)
  2287.  
  2288. new player = cmd_target(id, arg1, 2)
  2289. new player2 = cmd_target(id, arg2, 2)
  2290.  
  2291. if(!player || !player2)
  2292. return PLUGIN_HANDLED
  2293.  
  2294. new CsTeams:team = cs_get_user_team(player)
  2295. new CsTeams:team2 = cs_get_user_team(player2)
  2296.  
  2297. if(team == team2)
  2298. {
  2299. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_ERROR_CASE1")
  2300. return PLUGIN_HANDLED
  2301. }
  2302.  
  2303. if(team == CS_TEAM_UNASSIGNED || team2 == CS_TEAM_UNASSIGNED)
  2304. {
  2305. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_ERROR_CASE2")
  2306. return PLUGIN_HANDLED
  2307. }
  2308.  
  2309. if(team == CS_TEAM_SPECTATOR)
  2310. user_silentkill(player2)
  2311.  
  2312. else if(team2 == CS_TEAM_SPECTATOR)
  2313. user_silentkill(player)
  2314.  
  2315. cs_set_user_team(player, team2)
  2316. spawn(player)
  2317. cs_set_user_team(player2, team)
  2318. spawn(player2)
  2319.  
  2320. new name[32], name2[32], admin[32], steamid[38]
  2321.  
  2322. get_user_name(id, admin, 31)
  2323. get_user_name(player, name, 31)
  2324. get_user_name(player2, name2, 31)
  2325.  
  2326. get_user_authid(id, steamid, 37)
  2327.  
  2328. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_SWAP_PLAYERS_SUCCESS", name, name2)
  2329.  
  2330. client_print(player, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_SWAP_PLAYERS_MESSAGE1", name2)
  2331. client_print(player2, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_SWAP_PLAYERS_MESSAGE2", name)
  2332.  
  2333. log_amx("[AMX_Super] TEAMTRANSFER: ^"%s<%s>^" swapped ^"%s^" with ^"%s^"", admin, steamid, name, name2)
  2334.  
  2335. return PLUGIN_HANDLED
  2336. }
  2337.  
  2338. public cmd_teamswap(id, level, cid)
  2339. {
  2340. if (!cmd_access(id, level, cid, 1))
  2341. return PLUGIN_HANDLED
  2342.  
  2343. new players[32], num
  2344. get_players(players, num)
  2345.  
  2346. new player
  2347. for(new i = 0; i < num; i++)
  2348. {
  2349. player = players[i]
  2350. cs_set_user_team(player, cs_get_user_team(player) == CS_TEAM_T ? CS_TEAM_CT:CS_TEAM_T)
  2351. spawn(player)
  2352. }
  2353.  
  2354. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_SWAP_TEAM_SUCCESS")
  2355.  
  2356. new name[32], steamid[38]
  2357.  
  2358. get_user_name(id, name, 31)
  2359. get_user_authid(id, steamid, 37)
  2360.  
  2361. log_amx("%L", LANG_PLAYER, "AMX_SUPER_TRANSFER_PLAYER_LOG", name, steamid)
  2362. return PLUGIN_HANDLED
  2363. }
  2364.  
  2365. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2366. //TEAM LOCKER v1.3 by Bmann_420
  2367. //Revised by Doombringer/Deviance
  2368. //==========================================================================================================
  2369. public admin_unlock(id, level, cid)
  2370. {
  2371. if(!cmd_access(id, level, cid, 2))
  2372. return PLUGIN_HANDLED
  2373.  
  2374. new Arg1[6]
  2375.  
  2376. read_argv(1, Arg1, 5)
  2377.  
  2378. if(!equali(Arg1, "T") && !equali(Arg1, "CT") && !equali(Arg1, "Auto") && !equali(Arg1, "Spec"))
  2379. {
  2380. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TEAM_INVALID")
  2381. return PLUGIN_HANDLED
  2382. }
  2383.  
  2384. new team
  2385.  
  2386. if(equali(Arg1, "T"))
  2387. team = TE
  2388. else if(equali(Arg1, "CT"))
  2389. team = CT
  2390. else if(equali(Arg1, "Auto"))
  2391. team = AUTO
  2392. else if(equali(Arg1, "Spec"))
  2393. team = SPEC
  2394.  
  2395. if(blockjoining[team] == false)
  2396. {
  2397. client_print(id, print_console,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_UNLOCKED", Teamnames[team])
  2398. return PLUGIN_HANDLED
  2399. }
  2400.  
  2401. blockjoining[team] = false
  2402.  
  2403. new name[32], steamid[38]
  2404.  
  2405. get_user_name(id, name, 31)
  2406. get_user_authid(id, steamid, 37)
  2407.  
  2408. log_amx("%L", LANG_SERVER, "AMX_SUPER_UNLOCK_TEAMS_LOG", name, steamid, Teamnames[team])
  2409.  
  2410. client_print(id, print_console,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_UNLOCK", Teamnames[team])
  2411. return PLUGIN_HANDLED
  2412. }
  2413.  
  2414. public admin_lock(id, level, cid)
  2415. {
  2416. if(!cmd_access(id, level, cid, 2))
  2417. return PLUGIN_HANDLED
  2418.  
  2419. new Arg1[6]
  2420.  
  2421. read_argv(1, Arg1, 5)
  2422.  
  2423. if(!equali(Arg1, "T") && !equali(Arg1, "CT") && !equali(Arg1, "Auto") && !equali(Arg1, "Spec"))
  2424. {
  2425. client_print(id, print_console, "%L", LANG_PLAYER, "AMX_SUPER_TEAM_INVALID")
  2426. return PLUGIN_HANDLED
  2427. }
  2428.  
  2429. new team
  2430.  
  2431. if(equali(Arg1, "T"))
  2432. team = TE
  2433. else if(equali(Arg1, "CT"))
  2434. team = CT
  2435. else if(equali(Arg1, "Auto"))
  2436. team = AUTO
  2437. else if(equali(Arg1, "Spec"))
  2438. team = SPEC
  2439.  
  2440. if(blockjoining[team] == true)
  2441. {
  2442. client_print(id, print_console,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_LOCKED", Teamnames[team])
  2443. return PLUGIN_HANDLED
  2444. }
  2445.  
  2446. blockjoining[team] = true
  2447.  
  2448. new name[32], steamid[38]
  2449.  
  2450. get_user_name(id, name, 31)
  2451. get_user_authid(id, steamid, 37)
  2452.  
  2453. log_amx("%L", LANG_SERVER, "AMX_SUPER_LOCK_TEAMS_LOG", name, steamid, Teamnames[team])
  2454.  
  2455. client_print(id, print_console,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_LOCK", Teamnames[team])
  2456. return PLUGIN_HANDLED
  2457. }
  2458.  
  2459. public team_select(id, key)
  2460. {
  2461. if ( blockjoining[key] == true )
  2462. {
  2463. engclient_cmd(id, "chooseteam")
  2464. return PLUGIN_HANDLED
  2465. }
  2466.  
  2467. return PLUGIN_CONTINUE
  2468. }
  2469.  
  2470. public join_team(id)
  2471. {
  2472. if (get_user_flags(id) & ( ADMIN_KICK | ADMIN_LEVEL_A ))
  2473. {
  2474. remove_task(id)
  2475. return PLUGIN_CONTINUE
  2476. }
  2477.  
  2478. new arg[2]
  2479. read_argv(1, arg, 1)
  2480.  
  2481. if (blockjoining[str_to_num(arg)-1] == true)
  2482. {
  2483. engclient_cmd(id, "chooseteam")
  2484. return PLUGIN_HANDLED
  2485. }
  2486.  
  2487. return PLUGIN_CONTINUE
  2488. }
  2489.  
  2490.  
  2491. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2492. //ADMIN REVIVE II v0.1 by SniperBeamer
  2493. //Revised by Bo0m!
  2494. //==========================================================================================================
  2495. public admin_revive(id,level,cid)
  2496. {
  2497. if (!cmd_access(id,level,cid,2))
  2498. return PLUGIN_HANDLED
  2499.  
  2500. new arg[32]
  2501. new aName[32], aAuthid[36], pAuthid[36]
  2502. read_argv(1,arg,31)
  2503.  
  2504. get_user_name(id,aName,31)
  2505. get_user_authid(id,aAuthid,35)
  2506.  
  2507. if (arg[0]=='@'){
  2508. new plist[32], pnum
  2509. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  2510. if (equali("ALL",arg[1])) get_players(plist,pnum)
  2511. else get_players(plist,pnum,"e",arg[1])
  2512.  
  2513. if (pnum == 0) {
  2514. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2515. return PLUGIN_HANDLED
  2516. }
  2517.  
  2518. for(new i=0; i<pnum; i++) {
  2519. if (!(get_user_flags(plist[i])&ADMIN_IMMUNITY))
  2520. {
  2521. new ids[3]
  2522. num_to_str(plist[i],ids,2)
  2523. spawn(plist[i])
  2524. set_task(0.1,"revivePl",0,ids,2)
  2525. }
  2526. }
  2527.  
  2528. switch(get_cvar_num("amx_show_activity")) {
  2529. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_TEAM_CASE2",aName,arg[1])
  2530. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_TEAM_CASE1",arg[1])
  2531. }
  2532.  
  2533. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_TEAM_MSG",arg[1])
  2534. log_amx("%L", LANG_SERVER, "AMX_SUPER_REVIVE_TEAM_LOG",aName,aAuthid,arg[1])
  2535.  
  2536. if (get_pcvar_num(revivemsg))
  2537. {
  2538. if (equali(arg[1],"CT")) set_hudmessage(0,20,220,-1.0,0.30,0,6.0,6.0,0.5,0.15,1)
  2539. else set_hudmessage(220,20,0,-1.0,0.30,0,6.0,6.0,0.5,0.15,1)
  2540. show_hudmessage(0,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_TEAM_HUD",arg[1])
  2541. }
  2542. }
  2543. else
  2544. {
  2545. new pName[32],player = cmd_target(id,arg,3)
  2546. if (!player) return PLUGIN_HANDLED
  2547. new ids[3]
  2548. num_to_str(player,ids,2)
  2549. spawn(player)
  2550. set_task(0.1,"revivePl",0,ids,2)
  2551.  
  2552. get_user_name(player,pName,31)
  2553. get_user_authid(player,pAuthid,35)
  2554.  
  2555. switch(get_cvar_num("amx_show_activity")) {
  2556. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_PLAYER_CASE2",aName,pName)
  2557. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_PLAYER_CASE1",pName)
  2558. }
  2559. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_PLAYER_MSG",pName)
  2560. log_amx("%L", LANG_SERVER, "AMX_SUPER_REVIVE_PLAYER_LOG",aName,aAuthid,pName,pAuthid)
  2561.  
  2562. if (get_pcvar_num(revivemsg))
  2563. {
  2564. set_hudmessage(0,200,0,-1.0,0.30,0,6.0,6.0,0.5,0.15,1)
  2565. show_hudmessage(0,"%L", LANG_PLAYER, "AMX_SUPER_REVIVE_PLAYER_HUD",pName)
  2566. }
  2567. }
  2568.  
  2569. return PLUGIN_HANDLED
  2570. }
  2571.  
  2572. public revivePl(ids[])
  2573. {
  2574. new id = str_to_num(ids)
  2575. spawn(id)
  2576. if (get_user_team(id)==1)
  2577. {
  2578. give_item(id,"weapon_knife")
  2579. give_item(id,"weapon_glock18")
  2580. give_item(id,"ammo_9mm")
  2581. give_item(id,"ammo_9mm")
  2582. }
  2583. else
  2584. {
  2585. give_item(id,"weapon_knife")
  2586. give_item(id,"weapon_usp")
  2587. give_item(id,"ammo_45acp")
  2588. give_item(id,"ammo_45acp")
  2589. }
  2590. }
  2591.  
  2592.  
  2593. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2594. //ADMIN TELEPORT v0.9.3 by f117bomb
  2595. //Revised by JTP10181
  2596. //==========================================================================================================
  2597. new g_savedOrigin[3] = {0,0,0}
  2598.  
  2599. public admin_teleport(id,level,cid)
  2600. {
  2601. if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
  2602.  
  2603. new arg[32], sx[8], sy[8], sz[8], origin[3]
  2604. new name[32], name2[32], authid[36], authid2[36]
  2605.  
  2606. read_argv(1,arg,31)
  2607. get_user_name(id,name,31)
  2608. get_user_authid(id,authid,35)
  2609.  
  2610. if (read_argc() > 2) {
  2611. read_argv(2,sx,7)
  2612. read_argv(3,sy,7)
  2613. read_argv(4,sz,7)
  2614. origin[0] = str_to_num(sx)
  2615. origin[1] = str_to_num(sy)
  2616. origin[2] = str_to_num(sz)
  2617. }
  2618. else {
  2619. origin = g_savedOrigin
  2620. }
  2621.  
  2622. new player = cmd_target(id,arg,7)
  2623. if (!player) return PLUGIN_HANDLED
  2624.  
  2625. set_user_origin(player, origin)
  2626.  
  2627. get_user_name(player,name2,31)
  2628. get_user_authid(player,authid2,35)
  2629.  
  2630. switch(get_cvar_num("amx_show_activity")) {
  2631. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TELEPORT_PLAYER_CASE2",name,name2)
  2632. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TELEPORT_PLAYER_CASE1",name2)
  2633. }
  2634.  
  2635. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TELEPORT_PLAYER_MSG",name2,origin[0],origin[1],origin[2])
  2636. log_amx("%L", LANG_SERVER, "AMX_SUPER_TELEPORT_PLAYER_LOG",name,authid,name2,authid2,origin[0],origin[1],origin[2])
  2637.  
  2638. return PLUGIN_HANDLED
  2639. }
  2640.  
  2641. public admin_userorigin(id,level,cid) {
  2642.  
  2643. if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
  2644.  
  2645. new arg[32], name[32]
  2646. read_argv(1,arg,31)
  2647.  
  2648. new player = cmd_target(id,arg,2)
  2649. if (!player) return PLUGIN_HANDLED
  2650.  
  2651. get_user_origin(player, g_savedOrigin)
  2652. get_user_name(player,name,31)
  2653.  
  2654. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TELEPORT_ORIGIN_SAVED",g_savedOrigin[0],g_savedOrigin[1],g_savedOrigin[2],name)
  2655.  
  2656. return PLUGIN_HANDLED
  2657. }
  2658.  
  2659.  
  2660. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2661. //ADMIN HEAL v0.9.3 by f117bomb
  2662. //Revised by JTP10181
  2663. //==========================================================================================================
  2664. public admin_heal(id,level,cid)
  2665. {
  2666. if (!cmd_access(id,level,cid,3))
  2667. return PLUGIN_HANDLED
  2668.  
  2669. new arg[32], arg2[8]
  2670. new name[32], name2[32], authid[36], authid2[36]
  2671. read_argv(1,arg,31)
  2672. read_argv(2,arg2,7)
  2673. get_user_name(id,name,31)
  2674. get_user_authid(id,authid,35)
  2675. new hpGive = str_to_num(arg2)
  2676.  
  2677. if (hpGive <= 0) {
  2678. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_AMOUNT_GREATER")
  2679. return PLUGIN_HANDLED
  2680. }
  2681.  
  2682. if (arg[0]=='@'){
  2683. new players[32], inum
  2684. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  2685. if (equali("ALL",arg[1])) get_players(players,inum)
  2686. else get_players(players,inum,"e",arg[1])
  2687.  
  2688. if (inum == 0) {
  2689. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2690. return PLUGIN_HANDLED
  2691. }
  2692.  
  2693. for(new a = 0;a < inum; a++) {
  2694. new user_health = get_user_health(players[a])
  2695. set_user_health(players[a], hpGive + user_health)
  2696. }
  2697.  
  2698. switch(get_cvar_num("amx_show_activity")) {
  2699. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_TEAM_CASE2",name,hpGive,arg[1])
  2700. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_TEAM_CASE1",hpGive,arg[1])
  2701. }
  2702.  
  2703. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_TEAM_MSG",hpGive,arg[1])
  2704. log_amx("%L", LANG_SERVER, "AMX_SUPER_HEAL_TEAM_LOG", name,authid,hpGive,arg[1])
  2705. }
  2706. else {
  2707.  
  2708. new player = cmd_target(id,arg,6)
  2709. if (!player) return PLUGIN_HANDLED
  2710.  
  2711. new user_health = get_user_health(player)
  2712. set_user_health(player, hpGive + user_health)
  2713.  
  2714. get_user_name(player,name2,31)
  2715. get_user_authid(player,authid2,35)
  2716.  
  2717. switch(get_cvar_num("amx_show_activity")) {
  2718. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_PLAYER_CASE2",name,hpGive,name2)
  2719. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_PLAYER_CASE1",hpGive,name2)
  2720. }
  2721.  
  2722. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_HEAL_PLAYER_MSG",hpGive,name2)
  2723. log_amx("%L", LANG_SERVER, "AMX_SUPER_HEAL_PLAYER_LOG", name,authid,hpGive,name2,authid2)
  2724. }
  2725. return PLUGIN_HANDLED
  2726. }
  2727.  
  2728.  
  2729. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2730. //ADMIN ARMOR v1.0 by JTP10181
  2731. //==========================================================================================================
  2732. public admin_armor(id,level,cid)
  2733. {
  2734. if (!cmd_access(id,level,cid,3))
  2735. return PLUGIN_HANDLED
  2736.  
  2737. new arg[32], arg2[8]
  2738. new name[32], name2[32], authid[36], authid2[36]
  2739. read_argv(1,arg,31)
  2740. read_argv(2,arg2,7)
  2741. get_user_name(id,name,31)
  2742. get_user_authid(id,authid,35)
  2743. new armorGive = str_to_num(arg2)
  2744.  
  2745. if (armorGive <= 0) {
  2746. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_AMOUNT_GREATER")
  2747. return PLUGIN_HANDLED
  2748. }
  2749.  
  2750. if (arg[0]=='@'){
  2751. new players[32], inum
  2752. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  2753. if (equali("ALL",arg[1])) get_players(players,inum)
  2754. else get_players(players,inum,"e",arg[1])
  2755.  
  2756. if (inum == 0) {
  2757. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2758. return PLUGIN_HANDLED
  2759. }
  2760.  
  2761. for(new a = 0;a < inum; a++) {
  2762. new user_armor = get_user_armor(players[a])
  2763.  
  2764. //Give the armor item first so CS knows the player has armor
  2765. if (user_armor <= 0) give_item(players[a], "item_assaultsuit")
  2766.  
  2767. //Set the armor to the new ammount
  2768. set_user_armor(players[a], armorGive + user_armor)
  2769. }
  2770.  
  2771. switch(get_cvar_num("amx_show_activity")) {
  2772. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_TEAM_CASE2",name,armorGive,arg[1])
  2773. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_TEAM_CASE1",armorGive,arg[1])
  2774. }
  2775.  
  2776. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_TEAM_MSG",armorGive,arg[1])
  2777. log_amx("%L", LANG_SERVER, "AMX_SUPER_ARMOR_TEAM_LOG", name,authid,armorGive,arg[1])
  2778. }
  2779. else {
  2780.  
  2781. new player = cmd_target(id,arg,6)
  2782. if (!player) return PLUGIN_HANDLED
  2783.  
  2784. new user_armor = get_user_armor(player)
  2785.  
  2786. //Give the armor item first so CS knows the player has armor
  2787. if (user_armor <= 0) give_item(player, "item_assaultsuit")
  2788.  
  2789. //Set the armor to the new ammount
  2790. set_user_armor(player, armorGive + user_armor)
  2791.  
  2792. get_user_name(player,name2,31)
  2793. get_user_authid(player,authid2,35)
  2794.  
  2795. switch(get_cvar_num("amx_show_activity")) {
  2796. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_PLAYER_CASE2",name,armorGive,name2)
  2797. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_PLAYER_CASE1",armorGive,name2)
  2798. }
  2799.  
  2800. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ARMOR_PLAYER_MSG",armorGive,name2)
  2801. log_amx("%L", LANG_SERVER, "AMX_SUPER_ARMOR_PLAYER_LOG", name,authid,armorGive,name2,authid2)
  2802. }
  2803. return PLUGIN_HANDLED
  2804. }
  2805.  
  2806.  
  2807. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2808. //ADMIN GODMODE v1.0 by Bo0m!
  2809. //Revised some by Doombringer/Deviance
  2810. //==========================================================================================================
  2811. public admin_godmode(id,level,cid)
  2812. {
  2813.  
  2814. if (!cmd_access(id,level,cid,3))
  2815. return PLUGIN_HANDLED
  2816.  
  2817. new arg[32], arg2[8], name2[32]
  2818.  
  2819. read_argv(1, arg, 31)
  2820. read_argv(2, arg2, 7)
  2821.  
  2822. new setting = str_to_num(arg2)
  2823.  
  2824. new name[32], authid[36]
  2825.  
  2826. get_user_name(id, name2, 31)
  2827. get_user_authid(id, authid, 35)
  2828.  
  2829. new bool:l_postRound = false;
  2830. if(str_to_num(arg2) == 2)
  2831.  
  2832. {
  2833. arg2 = "1";
  2834. l_postRound = true;
  2835. }
  2836.  
  2837. if (arg[0]=='@'){
  2838.  
  2839. new players[32], inum
  2840.  
  2841. if(!(arg[1]=='a' || arg[1]=='A' || arg[1]=='C' || arg[1]=='c' || arg[1]=='T' || arg[1]=='t'))
  2842. inum = 0
  2843.  
  2844. else
  2845.  
  2846. get_players(players,inum,"")
  2847.  
  2848. if (inum==0)
  2849. {
  2850. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2851. return PLUGIN_HANDLED
  2852. }
  2853.  
  2854. for(new a=0;a<inum;++a)
  2855. {
  2856. if((arg[1]=='a' || arg[1]=='A') || (cs_get_user_team(players[a]) == CS_TEAM_T && (arg[1]=='T' || arg[1]=='t')) || (cs_get_user_team(players[a]) == CS_TEAM_CT && (arg[1]=='C' || arg[1]=='c')))
  2857.  
  2858. {
  2859. set_user_godmode(players[a],str_to_num(arg2))
  2860. HasPermGod[players[a]] = l_postRound;
  2861. }
  2862.  
  2863. }
  2864. switch(get_cvar_num("amx_show_activity"))
  2865. {
  2866. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_TEAM_CASE2", name, setting, arg[1])
  2867. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_TEAM_CASE1", setting, arg[1])
  2868. }
  2869.  
  2870. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_TEAM_MSG", setting, arg[1])
  2871. log_amx("%L", LANG_SERVER, "AMX_SUPER_GODMODE_TEAM_LOG", name, authid, setting, arg[1])
  2872. }
  2873. else
  2874. {
  2875. new authid2[36]
  2876.  
  2877. new player = cmd_target(id, arg, 3)
  2878.  
  2879. if(!player)
  2880. return PLUGIN_HANDLED
  2881.  
  2882. get_user_name(player, name2, 31)
  2883. get_user_authid(player, authid2, 35)
  2884.  
  2885. set_user_godmode(player,str_to_num(arg2))
  2886. HasPermGod[player] = l_postRound;
  2887.  
  2888. switch(get_cvar_num("amx_show_activity"))
  2889. {
  2890. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_PLAYER_CASE2", name, setting, name2)
  2891. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_PLAYER_CASE1", setting, name2)
  2892. }
  2893.  
  2894. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_GODMODE_PLAYER_MSG", setting, name2)
  2895. log_amx("%L", LANG_SERVER, "AMX_SUPER_GODMODE_PLAYER_LOG", name, authid, setting, name2, authid2)
  2896. }
  2897. return PLUGIN_HANDLED
  2898. }
  2899.  
  2900.  
  2901.  
  2902. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2903. //ADMIN NOCLIP v1.0 by Bo0m!
  2904. //==========================================================================================================
  2905. public admin_noclip(id,level,cid)
  2906. {
  2907. if (!cmd_access(id,level,cid,3))
  2908. return PLUGIN_HANDLED
  2909.  
  2910. new arg[32], arg2[8]
  2911. new name[32], name2[32], authid[36], authid2[36]
  2912. read_argv(1,arg,31)
  2913. read_argv(2,arg2,7)
  2914. get_user_name(id,name,31)
  2915. get_user_authid(id,authid,35)
  2916.  
  2917. new noclipsetting = str_to_num(arg2)
  2918.  
  2919. new bool:PermNoclip = false
  2920. if(noclipsetting == 2)
  2921. {
  2922. arg2 = "1"
  2923. PermNoclip = true
  2924. }
  2925.  
  2926. if (arg[0]=='@'){
  2927. new players[32], inum
  2928. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  2929. if (equali("ALL",arg[1])) get_players(players,inum)
  2930. else get_players(players,inum,"e",arg[1])
  2931.  
  2932. if (inum == 0) {
  2933. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  2934. return PLUGIN_HANDLED
  2935. }
  2936.  
  2937. for(new a = 0;a < inum; a++) {
  2938. set_user_noclip(players[a],str_to_num(arg2))
  2939. HasPermNoclip[players[a]] = PermNoclip
  2940. }
  2941.  
  2942. switch(get_cvar_num("amx_show_activity")) {
  2943. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_TEAM_CASE2",name,noclipsetting,arg[1])
  2944. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_TEAM_CASE1",noclipsetting,arg[1])
  2945. }
  2946. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_TEAM_MSG",noclipsetting,arg[1])
  2947. log_amx("%L", LANG_SERVER, "AMX_SUPER_NOCLIP_TEAM_LOG", name,authid,noclipsetting,arg[1])
  2948. }
  2949. else {
  2950.  
  2951. new player = cmd_target(id,arg,7)
  2952. if (!player) return PLUGIN_HANDLED
  2953.  
  2954. get_user_name(player,name2,31)
  2955. get_user_authid(player,authid2,35)
  2956.  
  2957.  
  2958. set_user_noclip(player,str_to_num(arg2))
  2959. HasPermNoclip[player] = PermNoclip
  2960.  
  2961. switch(get_cvar_num("amx_show_activity")) {
  2962. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_PLAYER_CASE2",name,noclipsetting,name2)
  2963. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_PLAYER_CASE1",noclipsetting,name2)
  2964. }
  2965.  
  2966. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NOCLIP_PLAYER_MSG",noclipsetting,name2)
  2967. log_amx("%L", LANG_SERVER, "AMX_SUPER_NOCLIP_PLAYER_LOG", name,authid,noclipsetting,name2,authid2)
  2968. }
  2969. return PLUGIN_HANDLED
  2970. }
  2971.  
  2972.  
  2973. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  2974. //ADMIN STACK v0.9.3 by f117bomb
  2975. //==========================================================================================================
  2976. public admin_stack(id,level,cid)
  2977. {
  2978. if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
  2979.  
  2980. new arg[32]
  2981. new name[32], name2[32], authid[36], authid2[36]
  2982. read_argv(1,arg,31)
  2983. get_user_name(id,name,31)
  2984. get_user_authid(id,authid,35)
  2985.  
  2986. new player = cmd_target(id,arg,7)
  2987. if (!player) return PLUGIN_HANDLED
  2988.  
  2989. new sttype[2], origin[3], inum, players[32]
  2990. read_argv(2,sttype,1)
  2991. get_user_origin(player, origin)
  2992. get_players(players,inum,"a")
  2993.  
  2994. new offsety = 36, offsetz = 96
  2995. switch( str_to_num(sttype) ) {
  2996. case 0: offsety = 0
  2997. case 1: offsetz = 0
  2998. }
  2999.  
  3000. for(new a = 0 ; a < inum ; a++) {
  3001. if ((players[a] == player) || (get_user_flags(players[a])&ADMIN_IMMUNITY) ) continue
  3002. origin[1] += offsety
  3003. origin[2] += offsetz
  3004. set_user_origin(players[a], origin)
  3005. }
  3006.  
  3007. get_user_name(player,name2,32)
  3008. get_user_authid(player,authid2,35)
  3009.  
  3010. switch(get_cvar_num("amx_show_activity")) {
  3011. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_STACK_PLAYER_CASE2",name,name2)
  3012. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_STACK_PLAYER_CASE1",name2)
  3013. }
  3014.  
  3015. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_STACK_PLAYER_MSG", name2)
  3016. log_amx("%L", LANG_SERVER, "AMX_SUPER_STACK_PLAYER_LOG",name,authid,name2,authid2)
  3017.  
  3018. return PLUGIN_HANDLED
  3019. }
  3020.  
  3021.  
  3022. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3023. //ADMIN MONEY v1.0 by XxAvalanchexX with additions from Bo0m!
  3024. //==========================================================================================================
  3025. public admin_givemoney(id,level,cid)
  3026. {
  3027. if(!cmd_access(id,level,cid,3))
  3028. return PLUGIN_HANDLED
  3029.  
  3030. new arg[32], arg2[32]
  3031. read_argv(1,arg,32)
  3032. read_argv(2,arg2,31)
  3033.  
  3034. new adminAuthid[36], adminName[32]
  3035. get_user_authid(id,adminAuthid,35)
  3036. get_user_name(id,adminName,31)
  3037.  
  3038. new amount = str_to_num(arg2)
  3039. if(amount < 0) {
  3040. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_AMOUNT_GREATER")
  3041. return PLUGIN_HANDLED
  3042. }
  3043.  
  3044. if(arg[0] == '@')
  3045. {
  3046. new players[32], pnum, i;
  3047. if(containi(arg, "ALL") != -1) get_players(players, pnum)
  3048. else get_players(players, pnum, "ae", (containi(arg, "CT") != -1) ? "CT" : "TERRORIST");
  3049. if(!pnum) return PLUGIN_HANDLED;
  3050. new pid, money;
  3051. for(i = 0; i < pnum; i++)
  3052. {
  3053. pid = players[i];
  3054. money = amount + cs_get_user_money(pid);
  3055. if(money > 16000) money = 16000;
  3056. cs_set_user_money(pid, money)
  3057. }
  3058. switch(get_cvar_num("amx_show_activity"))
  3059. {
  3060. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_TEAM_CASE2", adminName, amount, arg[1]);
  3061. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_TEAM_CASE1", amount, arg[1]);
  3062. }
  3063. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_TEAM_MSG", amount, arg[1]);
  3064. log_amx("%L", LANG_SERVER, "AMX_SUPER_GIVEMONEY_TEAM_LOG", adminName, adminAuthid, amount, arg[1]);
  3065. }
  3066. else
  3067. {
  3068.  
  3069. new player = cmd_target(id,arg,2)
  3070. if(!player) return PLUGIN_HANDLED
  3071.  
  3072. new playerName[32]
  3073. get_user_name(player,playerName,31)
  3074.  
  3075. new playerAuthid[36]
  3076. get_user_authid(player,playerAuthid,35)
  3077.  
  3078. cs_set_user_money(player,cs_get_user_money(player)+amount)
  3079.  
  3080. switch(get_cvar_num("amx_show_activity"))
  3081. {
  3082. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_PLAYER_CASE2",adminName,amount,playerName)
  3083. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_PLAYER_CASE1",amount,playerName)
  3084. }
  3085.  
  3086. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_GIVEMONEY_PLAYER_MSG",amount,playerName,amount)
  3087. log_amx("%L", LANG_SERVER, "AMX_SUPER_GIVEMONEY_PLAYER_LOG",adminName,adminAuthid,amount,playerName,playerAuthid)
  3088.  
  3089. }
  3090. return PLUGIN_HANDLED
  3091. }
  3092.  
  3093. public admin_takemoney(id,level,cid)
  3094. {
  3095. if(!cmd_access(id,level,cid,3))
  3096. return PLUGIN_HANDLED
  3097.  
  3098. new arg[32], arg2[32]
  3099. read_argv(1,arg,32)
  3100. read_argv(2,arg2,31)
  3101.  
  3102. new player = cmd_target(id,arg,2)
  3103. if(!player) return PLUGIN_HANDLED
  3104.  
  3105. new playerName[32], adminName[32]
  3106. get_user_name(player,playerName,31)
  3107. get_user_name(id,adminName,31)
  3108.  
  3109. new playerAuthid[36], adminAuthid[36]
  3110. get_user_authid(player,playerAuthid,35)
  3111. get_user_authid(id,adminAuthid,35)
  3112.  
  3113. new amount = str_to_num(arg2)
  3114.  
  3115. if(amount < 0) {
  3116. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_AMOUNT_GREATER")
  3117. return PLUGIN_HANDLED
  3118. }
  3119.  
  3120. if (amount > cs_get_user_money(player)) {
  3121. cs_set_user_money(player,0)
  3122.  
  3123. switch(get_cvar_num("amx_show_activity"))
  3124. {
  3125. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_ALL_PLAYER_CASE2",adminName,playerName)
  3126. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_ALL_PLAYER_CASE1",playerName)
  3127. }
  3128.  
  3129. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_ALL_PLAYER_MSG",amount,playerName,amount)
  3130. log_amx("%L", LANG_SERVER, "AMX_SUPER_TAKEMONEY_ALL_PLAYER_LOG",adminName,adminAuthid,playerName,playerAuthid)
  3131.  
  3132. return PLUGIN_HANDLED
  3133. }
  3134.  
  3135. else {
  3136. cs_set_user_money(player,cs_get_user_money(player)-amount)
  3137.  
  3138. switch(get_cvar_num("amx_show_activity"))
  3139. {
  3140. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_PLAYER_CASE2",adminName,amount,playerName)
  3141. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_PLAYER_CASE1",amount,playerName)
  3142. }
  3143.  
  3144. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TAKEMONEY_PLAYER_MSG",amount,playerName,amount)
  3145. log_amx("%L", LANG_SERVER, "AMX_SUPER_TAKEMONEY_PLAYER_LOG",adminName,adminAuthid,amount,playerName,playerAuthid)
  3146.  
  3147. return PLUGIN_HANDLED
  3148. }
  3149. return PLUGIN_HANDLED
  3150. }
  3151.  
  3152.  
  3153. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3154. //ADMIN ALLTALK v1.0 by BigBaller
  3155. //==========================================================================================================
  3156. public admin_alltalk(id,level,cid)
  3157. {
  3158. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  3159.  
  3160. if (read_argc() < 2) {
  3161. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ALLTALK_STATUS",get_cvar_num("sv_alltalk"))
  3162. return PLUGIN_HANDLED
  3163. }
  3164.  
  3165. new alltalk[6]
  3166. read_argv(1,alltalk,6)
  3167. server_cmd("sv_alltalk %s",alltalk)
  3168.  
  3169. new name[32], authid[36]
  3170. get_user_name(id,name,31)
  3171. get_user_authid(id,authid,35)
  3172.  
  3173. switch(get_cvar_num("amx_show_activity")){
  3174. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ALLTALK_SET_CASE2",name,alltalk)
  3175. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ALLTALK_SET_CASE1",alltalk)
  3176. }
  3177.  
  3178. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ALLTALK_MSG",alltalk)
  3179. log_amx("%L", LANG_SERVER, "AMX_SUPER_ALLTALK_LOG", name,authid,alltalk)
  3180.  
  3181. return PLUGIN_HANDLED
  3182. }
  3183.  
  3184.  
  3185. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3186. //ADMIN GRAVITY v0.2 by JustinHoMi
  3187. //==========================================================================================================
  3188. public admin_gravity(id,level,cid)
  3189. {
  3190. if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
  3191.  
  3192. if (read_argc() < 2) {
  3193. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_GRAVITY_STATUS",get_cvar_num("sv_gravity"))
  3194. return PLUGIN_HANDLED
  3195. }
  3196.  
  3197. new gravity[6]
  3198. read_argv(1,gravity,6)
  3199. server_cmd("sv_gravity %s",gravity)
  3200.  
  3201. new name[32], authid[36]
  3202. get_user_name(id,name,31)
  3203. get_user_authid(id,authid,35)
  3204.  
  3205. switch(get_cvar_num("amx_show_activity")){
  3206. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_GRAVITY_SET_CASE2",name,gravity)
  3207. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_GRAVITY_SET_CASE1",gravity)
  3208. }
  3209.  
  3210. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_GRAVITY_MSG",gravity)
  3211. log_amx("%L", LANG_SERVER, "AMX_SUPER_GRAVITY_LOG", name,authid,gravity)
  3212.  
  3213. return PLUGIN_HANDLED
  3214. }
  3215.  
  3216. public check_gravity(id){
  3217. new gravity = get_cvar_num("sv_gravity")
  3218. client_print(id,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_GRAVITY_CHECK",gravity)
  3219. return PLUGIN_HANDLED
  3220. }
  3221.  
  3222.  
  3223. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3224. //ADMIN BURY v0.9.3 by f117bomb
  3225. //Revised by Bo0m!
  3226. //==========================================================================================================
  3227. bury_player(id,victim){
  3228. new name[32], iwpns[32], nwpn[32], iwpn
  3229. get_user_name(victim,name,31)
  3230. get_user_weapons(victim,iwpns,iwpn)
  3231. for(new a=0;a<iwpn;++a) {
  3232. get_weaponname(iwpns[a],nwpn,31)
  3233. engclient_cmd(victim,"drop",nwpn)
  3234. }
  3235. engclient_cmd(victim,"weapon_knife")
  3236. new origin[3]
  3237. get_user_origin(victim, origin)
  3238. origin[2] -= 30
  3239. set_user_origin(victim, origin)
  3240. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_BURY_MSG",name)
  3241. }
  3242.  
  3243.  
  3244. public admin_bury(id,level,cid){
  3245. if (!cmd_access(id,level,cid,2))
  3246. return PLUGIN_HANDLED
  3247.  
  3248. new arg[32], admin_name[32], player_name[32], admin_authid[36], player_authid[36]
  3249. read_argv(1,arg,31)
  3250. get_user_name(id,admin_name,31)
  3251. get_user_authid(id,admin_authid,35)
  3252.  
  3253. if (arg[0]=='@'){
  3254. new players[32], inum
  3255. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  3256. if (equali("ALL",arg[1])) get_players(players,inum,"a")
  3257. else get_players(players,inum,"ae",arg[1])
  3258.  
  3259. if (inum == 0) {
  3260. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  3261. return PLUGIN_HANDLED
  3262. }
  3263.  
  3264. for(new a=0;a<inum;++a){
  3265. if (get_user_flags(players[a])&ADMIN_IMMUNITY){
  3266. get_user_name(players[a],player_name,31)
  3267. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",player_name)
  3268. continue
  3269. }
  3270. bury_player(id,players[a])
  3271. }
  3272. switch(get_cvar_num("amx_show_activity")) {
  3273. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_BURY_TEAM_CASE2",admin_name,arg[1])
  3274. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_BURY_TEAM_CASE1",arg[1])
  3275. }
  3276. log_amx("%L", LANG_SERVER, "AMX_SUPER_BURY_TEAM_LOG",admin_name,admin_authid,arg[1])
  3277. }
  3278. else {
  3279. new player = cmd_target(id,arg,7)
  3280. if (!player) return PLUGIN_HANDLED
  3281. bury_player(id,player)
  3282.  
  3283. get_user_name(player,player_name,31)
  3284. get_user_authid(player,player_authid,35)
  3285.  
  3286. switch(get_cvar_num("amx_show_activity")) {
  3287. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_BURY_PLAYER_CASE2",admin_name,player_name)
  3288. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_BURY_PLAYER_CASE1",player_name)
  3289. }
  3290. log_amx("%L", LANG_SERVER, "AMX_SUPER_BURY_PLAYER_LOG",admin_name,admin_authid,player_name,player_authid)
  3291. }
  3292. return PLUGIN_HANDLED
  3293. }
  3294.  
  3295. unbury_player(id,victim){
  3296. new name[32], origin[3]
  3297. get_user_name(victim,name,31)
  3298. get_user_origin(victim, origin)
  3299. origin[2] += 35
  3300. set_user_origin(victim, origin)
  3301. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_UNBURY_MSG",name)
  3302. }
  3303.  
  3304. public admin_unbury(id,level,cid){
  3305. if (!cmd_access(id,level,cid,2))
  3306. return PLUGIN_HANDLED
  3307.  
  3308. new arg[32], admin_name[32], player_name[32], admin_authid[36], player_authid[36]
  3309. read_argv(1,arg,31)
  3310. get_user_name(id,admin_name,31)
  3311. get_user_authid(id,admin_authid,35)
  3312.  
  3313. if (arg[0]=='@'){
  3314. new players[32], inum
  3315. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  3316. if (equali("ALL",arg[1])) get_players(players,inum,"a")
  3317. else get_players(players,inum,"ae",arg[1])
  3318.  
  3319. if (inum == 0) {
  3320. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  3321. return PLUGIN_HANDLED
  3322. }
  3323.  
  3324. for(new a=0;a<inum;++a){
  3325. if (get_user_flags(players[a])&ADMIN_IMMUNITY){
  3326. get_user_name(players[a],player_name,31)
  3327. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",player_name)
  3328. continue
  3329. }
  3330. unbury_player(id,players[a])
  3331. }
  3332. switch(get_cvar_num("amx_show_activity")) {
  3333. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_UNBURY_TEAM_CASE2",admin_name,arg[1])
  3334. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_UNBURY_TEAM_CASE1",arg[1])
  3335. }
  3336. log_amx("%L", LANG_SERVER, "AMX_SUPER_UNBURY_TEAM_LOG",admin_name,admin_authid,arg[1])
  3337. }
  3338. else {
  3339. new player = cmd_target(id,arg,7)
  3340. if (!player) return PLUGIN_HANDLED
  3341. unbury_player(id,player)
  3342.  
  3343. get_user_name(player,player_name,31)
  3344. get_user_authid(player,player_authid,35)
  3345.  
  3346. switch(get_cvar_num("amx_show_activity")) {
  3347. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_UNBURY_PLAYER_CASE2",admin_name,player_name)
  3348. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_UNBURY_PLAYER_CASE1",player_name)
  3349. }
  3350. log_amx("%L", LANG_SERVER, "AMX_SUPER_UNBURY_PLAYER_LOG",admin_name,admin_authid,player_name,player_authid)
  3351. }
  3352. return PLUGIN_HANDLED
  3353. }
  3354.  
  3355.  
  3356. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3357. //ADMIN DISARM v1.1 by mike_cao
  3358. //Revised by Bo0m!
  3359. //==========================================================================================================
  3360. disarm_player(id,victim){
  3361.  
  3362. new name[32], origin[3]
  3363. get_user_origin(victim,origin)
  3364. origin[2] -= 2000
  3365. set_user_origin(victim,origin)
  3366. new iweapons[32], wpname[32], inum
  3367. get_user_weapons(victim,iweapons,inum)
  3368. for(new a=0;a<inum;++a){
  3369. get_weaponname(iweapons[a],wpname,31)
  3370. engclient_cmd(victim,"drop",wpname)
  3371. }
  3372. engclient_cmd(victim,"weapon_knife")
  3373. origin[2] += 2005
  3374. set_user_origin(victim,origin)
  3375. get_user_name(victim,name,31)
  3376. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_DISARM_MSG",name)
  3377. }
  3378.  
  3379. public admin_disarm(id,level,cid){
  3380. if (!cmd_access(id,level,cid,2))
  3381. return PLUGIN_HANDLED
  3382.  
  3383. new arg[32], admin_name[32], player_name[32], admin_authid[36], player_authid[36]
  3384. read_argv(1,arg,31)
  3385. get_user_name(id,admin_name,31)
  3386. get_user_authid(id,admin_authid,35)
  3387.  
  3388. if (arg[0]=='@'){
  3389. new players[32], inum
  3390. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  3391. if (equali("ALL",arg[1])) get_players(players,inum,"a")
  3392. else get_players(players,inum,"ae",arg[1])
  3393.  
  3394. if (inum == 0) {
  3395. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  3396. return PLUGIN_HANDLED
  3397. }
  3398.  
  3399. for(new a=0;a<inum;++a){
  3400. if (get_user_flags(players[a])&ADMIN_IMMUNITY){
  3401. get_user_name(players[a],player_name,31)
  3402. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",player_name)
  3403. continue
  3404. }
  3405. disarm_player(id,players[a])
  3406. }
  3407. switch(get_cvar_num("amx_show_activity")) {
  3408. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_DISARM_TEAM_CASE2",admin_name,arg[1])
  3409. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_DISARM_TEAM_CASE1",arg[1])
  3410. }
  3411. log_amx("%L", LANG_SERVER, "AMX_SUPER_DISARM_TEAM_LOG",admin_name,admin_authid,arg[1])
  3412. }
  3413. else {
  3414. new player = cmd_target(id,arg,7)
  3415. if (!player) return PLUGIN_HANDLED
  3416. disarm_player(id,player)
  3417.  
  3418. get_user_name(player,player_name,31)
  3419. get_user_authid(player,player_authid,35)
  3420.  
  3421. switch(get_cvar_num("amx_show_activity")) {
  3422. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_DISARM_PLAYER_CASE2",admin_name,player_name)
  3423. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_DISARM_PLAYER_CASE1",player_name)
  3424. }
  3425. log_amx("%L", LANG_SERVER, "AMX_SUPER_DISARM_PLAYER_LOG",admin_name,admin_authid,player_name,player_authid)
  3426. }
  3427. return PLUGIN_HANDLED
  3428. }
  3429.  
  3430.  
  3431. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3432. //ADMIN SLAY 2 v0.9.3 by f117bomb
  3433. //Revised by JTP10181
  3434. //==========================================================================================================
  3435. public admin_slay(id,level,cid)
  3436. {
  3437. if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
  3438.  
  3439. new arg[32], arg2[3], type
  3440. new name[32], name2[32], authid[36], authid2[36]
  3441. read_argv(1,arg,31)
  3442. read_argv(2,arg2,2)
  3443. type = str_to_num(arg2)
  3444. get_user_name(id,name,31)
  3445. get_user_authid(id,authid,35)
  3446.  
  3447. if (arg[0]=='@'){
  3448. new players[32], inum
  3449. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  3450. if (equali("ALL",arg[1])) get_players(players,inum)
  3451. else get_players(players,inum,"e",arg[1])
  3452.  
  3453. if (inum == 0) {
  3454. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  3455. return PLUGIN_HANDLED
  3456. }
  3457.  
  3458. for(new a = 0; a < inum; a++) {
  3459. if (get_user_flags(players[a]) & ADMIN_IMMUNITY){
  3460. get_user_name(players[a],name2,31)
  3461. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",name2)
  3462. continue
  3463. }
  3464. slay_player(players[a],type)
  3465. }
  3466. switch(get_cvar_num("amx_show_activity")) {
  3467. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_TEAM_CASE2",name,arg[1])
  3468. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_TEAM_CASE1",arg[1])
  3469. }
  3470.  
  3471. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_TEAM_MSG",arg[1])
  3472. log_amx("%L", LANG_SERVER, "AMX_SUPER_SLAY2_TEAM_LOG",name,authid,arg[1])
  3473. }
  3474. else {
  3475. new player = cmd_target(id,arg,7)
  3476. if (!player) return PLUGIN_HANDLED
  3477.  
  3478. slay_player(player,type)
  3479.  
  3480. get_user_name(player,name2,31)
  3481. get_user_authid(player,authid2,35)
  3482.  
  3483. switch(get_cvar_num("amx_show_activity")) {
  3484. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_PLAYER_CASE2",name,name2)
  3485. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_PLAYER_CASE1",name2)
  3486. }
  3487.  
  3488. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_SLAY2_PLAYER_MSG", name2)
  3489. log_amx("%L", LANG_SERVER, "AMX_SUPER_SLAY2_PLAYER_LOG", name,authid,name2,authid2)
  3490. }
  3491. return PLUGIN_HANDLED
  3492. }
  3493.  
  3494. slay_player(victim,type)
  3495. {
  3496. new origin[3], srco[3]
  3497. get_user_origin(victim,origin)
  3498.  
  3499. origin[2] -= 26
  3500. srco[0] = origin[0]+150
  3501. srco[1] = origin[1]+150
  3502. srco[2] = origin[2]+400
  3503.  
  3504. switch (type) {
  3505. case 1: {
  3506. lightning(srco,origin)
  3507. emit_sound(victim,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  3508. }
  3509. case 2:{
  3510. blood(origin)
  3511. emit_sound(victim,CHAN_ITEM, "weapons/headshot2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  3512. }
  3513. case 3: {
  3514. explode(origin)
  3515. }
  3516. }
  3517. user_kill(victim,1)
  3518. }
  3519.  
  3520. explode (vec1[3]) {
  3521.  
  3522. //Blast Circles
  3523. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
  3524. write_byte( 21 )
  3525. write_coord(vec1[0])
  3526. write_coord(vec1[1])
  3527. write_coord(vec1[2] + 16)
  3528. write_coord(vec1[0])
  3529. write_coord(vec1[1])
  3530. write_coord(vec1[2] + 1936)
  3531. write_short( white )
  3532. write_byte( 0 ) // startframe
  3533. write_byte( 0 ) // framerate
  3534. write_byte( 2 ) // life
  3535. write_byte( 16 ) // width
  3536. write_byte( 0 ) // noise
  3537. write_byte( 188 ) // r
  3538. write_byte( 220 ) // g
  3539. write_byte( 255 ) // b
  3540. write_byte( 255 ) //brightness
  3541. write_byte( 0 ) // speed
  3542. message_end()
  3543.  
  3544. //Explosion2
  3545. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3546. write_byte( 12 )
  3547. write_coord(vec1[0])
  3548. write_coord(vec1[1])
  3549. write_coord(vec1[2])
  3550. write_byte( 188 ) // byte (scale in 0.1's)
  3551. write_byte( 10 ) // byte (framerate)
  3552. message_end()
  3553.  
  3554. //Smoke
  3555. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
  3556. write_byte( 5 )
  3557. write_coord(vec1[0])
  3558. write_coord(vec1[1])
  3559. write_coord(vec1[2])
  3560. write_short( smoke )
  3561. write_byte( 2 )
  3562. write_byte( 10 )
  3563. message_end()
  3564. }
  3565.  
  3566. blood (vec1[3]) {
  3567.  
  3568. //LAVASPLASH
  3569. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3570. write_byte( 10 )
  3571. write_coord(vec1[0])
  3572. write_coord(vec1[1])
  3573. write_coord(vec1[2])
  3574. message_end()
  3575. }
  3576.  
  3577. lightning (vec1[3],vec2[3]) {
  3578.  
  3579. //Lightning
  3580. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3581. write_byte( 0 )
  3582. write_coord(vec1[0])
  3583. write_coord(vec1[1])
  3584. write_coord(vec1[2])
  3585. write_coord(vec2[0])
  3586. write_coord(vec2[1])
  3587. write_coord(vec2[2])
  3588. write_short( light )
  3589. write_byte( 1 ) // framestart
  3590. write_byte( 5 ) // framerate
  3591. write_byte( 2 ) // life
  3592. write_byte( 20 ) // width
  3593. write_byte( 30 ) // noise
  3594. write_byte( 200 ) // r, g, b
  3595. write_byte( 200 ) // r, g, b
  3596. write_byte( 200 ) // r, g, b
  3597. write_byte( 200 ) // brightness
  3598. write_byte( 200 ) // speed
  3599. message_end()
  3600.  
  3601. //Sparks
  3602. message_begin( MSG_PVS, SVC_TEMPENTITY,vec2)
  3603. write_byte( 9 )
  3604. write_coord( vec2[0] )
  3605. write_coord( vec2[1] )
  3606. write_coord( vec2[2] )
  3607. message_end()
  3608.  
  3609. //Smoke
  3610. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec2)
  3611. write_byte( 5 )
  3612. write_coord(vec2[0])
  3613. write_coord(vec2[1])
  3614. write_coord(vec2[2])
  3615. write_short( smoke )
  3616. write_byte( 10 )
  3617. write_byte( 10 )
  3618. message_end()
  3619. }
  3620.  
  3621.  
  3622. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3623. //ADMIN FIRE v1.0.0 by f117bomb
  3624. //==========================================================================================================
  3625. new bool:onfire[33]
  3626.  
  3627. public ignite_effects(skIndex[]) {
  3628. new kIndex = skIndex[0]
  3629.  
  3630.  
  3631. if (is_user_alive(kIndex) && onfire[kIndex] ) {
  3632. new korigin[3]
  3633. get_user_origin(kIndex,korigin)
  3634.  
  3635. //TE_SPRITE - additive sprite, plays 1 cycle
  3636. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3637. write_byte( 17 )
  3638. write_coord(korigin[0]) // coord, coord, coord (position)
  3639. write_coord(korigin[1])
  3640. write_coord(korigin[2])
  3641. write_short( mflash ) // short (sprite index)
  3642. write_byte( 20 ) // byte (scale in 0.1's)
  3643. write_byte( 200 ) // byte (brightness)
  3644. message_end()
  3645.  
  3646. //Smoke
  3647. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,korigin)
  3648. write_byte( 5 )
  3649. write_coord(korigin[0])// coord coord coord (position)
  3650. write_coord(korigin[1])
  3651. write_coord(korigin[2])
  3652. write_short( smoke )// short (sprite index)
  3653. write_byte( 20 ) // byte (scale in 0.1's)
  3654. write_byte( 15 ) // byte (framerate)
  3655. message_end()
  3656.  
  3657. set_task(0.2, "ignite_effects" , 0 , skIndex, 2)
  3658. }
  3659. else {
  3660. if( onfire[kIndex] ) {
  3661. emit_sound(kIndex,CHAN_AUTO, "scientist/scream21.wav", 0.6, ATTN_NORM, 0, PITCH_HIGH)
  3662. onfire[kIndex] = false
  3663. }
  3664. }
  3665. return PLUGIN_CONTINUE
  3666. }
  3667.  
  3668. public ignite_player(skIndex[]) {
  3669. new kIndex = skIndex[0]
  3670.  
  3671. if (is_user_alive(kIndex) && onfire[kIndex] ) {
  3672. new korigin[3]
  3673. new players[32], inum = 0
  3674. new pOrigin[3]
  3675. new kHeath = get_user_health(kIndex)
  3676. get_user_origin(kIndex,korigin)
  3677.  
  3678. //create some damage
  3679. set_user_health(kIndex,kHeath - 10)
  3680. message_begin(MSG_ONE, gmsgDamage, {0,0,0}, kIndex)
  3681. write_byte(30) // dmg_save
  3682. write_byte(30) // dmg_take
  3683. write_long(1<<21) // visibleDamageBits
  3684. write_coord(korigin[0]) // damageOrigin.x
  3685. write_coord(korigin[1]) // damageOrigin.y
  3686. write_coord(korigin[2]) // damageOrigin.z
  3687. message_end()
  3688.  
  3689. //create some sound
  3690. emit_sound(kIndex,CHAN_ITEM, "ambience/flameburst1.wav", 0.6, ATTN_NORM, 0, PITCH_NORM)
  3691.  
  3692. //Ignite Others
  3693. if ( get_pcvar_num(allowcatchfire)) {
  3694. get_players(players,inum,"a")
  3695. for(new i = 0 ;i < inum; ++i) {
  3696. get_user_origin(players[i],pOrigin)
  3697.  
  3698. if( get_distance(korigin,pOrigin) < 100 ) {
  3699.  
  3700. if( !onfire[players[i]] ) {
  3701.  
  3702. new spIndex[2]
  3703. spIndex[0] = players[i]
  3704. new pName[32], kName[32]
  3705. get_user_name(players[i],pName,31)
  3706. get_user_name(kIndex,kName,31)
  3707. emit_sound(players[i],CHAN_WEAPON ,"scientist/scream07.wav", 1.0, ATTN_NORM, 0, PITCH_HIGH)
  3708. client_print(0,3,"* [AMX] OH! NO! %s has caught %s on fire!",kName,pName)
  3709. onfire[players[i]] = true
  3710. ignite_player(players[i])
  3711. ignite_effects(players[i])
  3712. }
  3713. }
  3714. }
  3715. players[0] = 0
  3716. pOrigin[0] = 0
  3717. korigin[0] = 0
  3718. }
  3719. //Call Again in 2 seconds
  3720. set_task(2.0, "ignite_player" , 0 , skIndex, 2)
  3721. }
  3722.  
  3723. return PLUGIN_CONTINUE
  3724. }
  3725.  
  3726.  
  3727. public admin_fire(id,level,cid) {
  3728. if (!cmd_access(id,level,cid,2))
  3729. return PLUGIN_HANDLED
  3730.  
  3731. new arg[32]
  3732. read_argv(1,arg,31)
  3733. new skIndex[2];
  3734. new adminname[32], adminauthid[36]
  3735. get_user_name(id,adminname,31)
  3736. get_user_authid(id,adminauthid,35)
  3737. if(arg[0] == '@')
  3738. {
  3739. new players[32], pnum;
  3740. if(equali(arg[1], "ALL")) get_players(players, pnum, "a")
  3741. else get_players(players, pnum, "ae", (equali(arg[1], "CT")) ? "CT" : "TERRORIST");
  3742. if(!pnum) return PLUGIN_HANDLED;
  3743. new i, pid;
  3744. for(i = 0; i < pnum; i++)
  3745. {
  3746. pid = players[i];
  3747. skIndex[0] = pid;
  3748. onfire[pid] = true;
  3749. ignite_effects(skIndex);
  3750. ignite_player(skIndex);
  3751. }
  3752. switch(get_cvar_num("amx_show_activity"))
  3753. {
  3754. case 2: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_FIRE_TEAM_CASE2", adminname, arg[1]);
  3755. case 1: client_print(0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_FIRE_TEAM_CASE1", arg[1]);
  3756. }
  3757. console_print(id, "%L", LANG_PLAYER, "AMX_SUPER_FIRE_TEAM_MSG", arg[1]);
  3758. log_amx("%L", LANG_SERVER, "AMX_SUPER_FIRE_TEAM_LOG", adminname, adminauthid, arg[1]);
  3759. }
  3760. else
  3761. {
  3762. new victim = cmd_target(id,arg,7)
  3763. if (!victim)
  3764. return PLUGIN_HANDLED
  3765.  
  3766. skIndex[0] = victim
  3767. new name[32], victimauthid[36]
  3768. get_user_name(victim,name,31)
  3769. get_user_authid(victim,victimauthid,35)
  3770.  
  3771. onfire[victim] = true
  3772. ignite_effects(skIndex)
  3773. ignite_player(skIndex)
  3774.  
  3775. switch(get_cvar_num("amx_show_activity")) {
  3776. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FIRE_PLAYER_CASE2",adminname,name)
  3777. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_FIRE_PLAYER_CASE1",name)
  3778. }
  3779.  
  3780. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_FIRE_PLAYER_MSG",name)
  3781. log_amx("%L", LANG_SERVER, "AMX_SUPER_FIRE_PLAYER_LOG",adminname,adminauthid,name,victimauthid)
  3782. }
  3783.  
  3784. return PLUGIN_HANDLED
  3785. }
  3786.  
  3787. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3788. //ADMIN ROCKET v1.3 by f117bomb
  3789. //Revised by JTP10181
  3790. //==========================================================================================================
  3791. new rocket_z[33]
  3792.  
  3793. public admin_rocket(id,level,cid)
  3794. {
  3795.  
  3796. if (!cmd_access(id,level,cid,2)) return PLUGIN_HANDLED
  3797.  
  3798. new arg[32]
  3799. new name[32], name2[32], authid[36], authid2[36]
  3800. read_argv(1,arg,31)
  3801. get_user_name(id,name,31)
  3802. get_user_authid(id,authid,35)
  3803.  
  3804. if (arg[0]=='@'){
  3805. new players[32], inum
  3806. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  3807. if (equali("ALL",arg[1])) get_players(players,inum)
  3808. else get_players(players,inum,"e",arg[1])
  3809.  
  3810. if (inum == 0) {
  3811. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  3812. return PLUGIN_HANDLED
  3813. }
  3814.  
  3815. for(new a = 0; a < inum; a++) {
  3816. if (get_user_flags(players[a]) & ADMIN_IMMUNITY){
  3817. get_user_name(players[a],name2,31)
  3818. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",name2)
  3819. continue
  3820. }
  3821.  
  3822. emit_sound(players[a],CHAN_WEAPON ,"weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  3823. set_user_maxspeed(players[a],0.01)
  3824. set_task(1.2, "rocket_liftoff" , players[a])
  3825. }
  3826.  
  3827. switch(get_cvar_num("amx_show_activity")) {
  3828. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_TEAM_CASE2",name,arg[1])
  3829. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_TEAM_CASE1",arg[1])
  3830. }
  3831.  
  3832. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_TEAM_MSG",arg[1])
  3833. log_amx("%L", LANG_SERVER, "AMX_SUPER_ROCKET_TEAM_LOG",name,authid,arg[1])
  3834.  
  3835. }
  3836. else {
  3837.  
  3838. new player = cmd_target(id,arg,7)
  3839. if (!player) return PLUGIN_HANDLED
  3840.  
  3841. emit_sound(player,CHAN_WEAPON ,"weapons/rocketfire1.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
  3842. set_user_maxspeed(player,0.01)
  3843. set_task(1.2, "rocket_liftoff", player)
  3844.  
  3845. get_user_name(player,name2,31)
  3846. get_user_authid(player,authid2,35)
  3847.  
  3848. switch(get_cvar_num("amx_show_activity")) {
  3849. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_PLAYER_CASE2",name,name2)
  3850. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_PLAYER_CASE1",name2)
  3851. }
  3852.  
  3853. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_ROCKET_PLAYER_MSG", name2)
  3854. log_amx("%L", LANG_SERVER, "AMX_SUPER_ROCKET_PLAYER_LOG", name,authid,name2,authid2)
  3855. }
  3856. return PLUGIN_HANDLED
  3857. }
  3858.  
  3859. public rocket_liftoff(victim)
  3860. {
  3861. if (!is_user_alive(victim)) return
  3862. set_user_gravity(victim,-0.50)
  3863. client_cmd(victim,"+jump;wait;wait;-jump")
  3864. emit_sound(victim, CHAN_VOICE, "weapons/rocket1.wav", 1.0, 0.5, 0, PITCH_NORM)
  3865. rocket_effects(victim)
  3866. }
  3867.  
  3868. public rocket_effects(victim)
  3869. {
  3870. if (!is_user_alive(victim)) return
  3871.  
  3872. new vorigin[3]
  3873. get_user_origin(victim,vorigin)
  3874.  
  3875. message_begin(MSG_ONE, gmsgDamage, {0,0,0}, victim)
  3876. write_byte(30) // dmg_save
  3877. write_byte(30) // dmg_take
  3878. write_long(1<<16) // visibleDamageBits
  3879. write_coord(vorigin[0]) // damageOrigin.x
  3880. write_coord(vorigin[1]) // damageOrigin.y
  3881. write_coord(vorigin[2]) // damageOrigin.z
  3882. message_end()
  3883.  
  3884. if (rocket_z[victim] == vorigin[2]) {
  3885. rocket_explode(victim)
  3886. }
  3887.  
  3888. rocket_z[victim] = vorigin[2]
  3889.  
  3890. //Draw Trail and effects
  3891.  
  3892. //TE_SPRITETRAIL - line of moving glow sprites with gravity, fadeout, and collisions
  3893. message_begin( MSG_BROADCAST, SVC_TEMPENTITY )
  3894. write_byte( 15 )
  3895. write_coord( vorigin[0]) // coord, coord, coord (start)
  3896. write_coord( vorigin[1])
  3897. write_coord( vorigin[2])
  3898. write_coord( vorigin[0]) // coord, coord, coord (end)
  3899. write_coord( vorigin[1])
  3900. write_coord( vorigin[2] - 30)
  3901. write_short( blueflare2 ) // short (sprite index)
  3902. write_byte( 5 ) // byte (count)
  3903. write_byte( 1 ) // byte (life in 0.1's)
  3904. write_byte( 1 ) // byte (scale in 0.1's)
  3905. write_byte( 10 ) // byte (velocity along vector in 10's)
  3906. write_byte( 5 ) // byte (randomness of velocity in 10's)
  3907. message_end()
  3908.  
  3909. //TE_SPRITE - additive sprite, plays 1 cycle
  3910. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3911. write_byte( 17 )
  3912. write_coord(vorigin[0]) // coord, coord, coord (position)
  3913. write_coord(vorigin[1])
  3914. write_coord(vorigin[2] - 30)
  3915. write_short( mflash ) // short (sprite index)
  3916. write_byte( 15 ) // byte (scale in 0.1's)
  3917. write_byte( 255 ) // byte (brightness)
  3918. message_end()
  3919.  
  3920. set_task(0.2, "rocket_effects", victim)
  3921. }
  3922.  
  3923. public rocket_explode(victim)
  3924. {
  3925. if (is_user_alive(victim)) {
  3926. new vec1[3]
  3927. get_user_origin(victim,vec1)
  3928.  
  3929. // blast circles
  3930. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
  3931. write_byte( 21 )
  3932. write_coord(vec1[0])
  3933. write_coord(vec1[1])
  3934. write_coord(vec1[2] - 10)
  3935. write_coord(vec1[0])
  3936. write_coord(vec1[1])
  3937. write_coord(vec1[2] + 1910)
  3938. write_short( white )
  3939. write_byte( 0 ) // startframe
  3940. write_byte( 0 ) // framerate
  3941. write_byte( 2 ) // life
  3942. write_byte( 16 ) // width
  3943. write_byte( 0 ) // noise
  3944. write_byte( 188 ) // r
  3945. write_byte( 220 ) // g
  3946. write_byte( 255 ) // b
  3947. write_byte( 255 ) //brightness
  3948. write_byte( 0 ) // speed
  3949. message_end()
  3950.  
  3951. //Explosion2
  3952. message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
  3953. write_byte( 12 )
  3954. write_coord(vec1[0])
  3955. write_coord(vec1[1])
  3956. write_coord(vec1[2])
  3957. write_byte( 188 ) // byte (scale in 0.1's)
  3958. write_byte( 10 ) // byte (framerate)
  3959. message_end()
  3960.  
  3961. //smoke
  3962. message_begin( MSG_BROADCAST,SVC_TEMPENTITY,vec1)
  3963. write_byte( 5 )
  3964. write_coord(vec1[0])
  3965. write_coord(vec1[1])
  3966. write_coord(vec1[2])
  3967. write_short( smoke )
  3968. write_byte( 2 )
  3969. write_byte( 10 )
  3970. message_end()
  3971.  
  3972. user_kill(victim,1)
  3973. }
  3974.  
  3975. //stop_sound
  3976. emit_sound(victim, CHAN_VOICE, "weapons/rocket1.wav", 0.0, 0.0, (1<<5), PITCH_NORM)
  3977.  
  3978. set_user_maxspeed(victim,1.0)
  3979. set_user_gravity(victim,1.00)
  3980. }
  3981.  
  3982.  
  3983. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3984. //AMX UBER SLAP v0.9.3 by BarMan (Skullz.NET)
  3985. //==========================================================================================================
  3986. public admin_slap(id,level,cid){
  3987. if (!cmd_access(id,level,cid,2))
  3988. return PLUGIN_HANDLED
  3989.  
  3990. new name[32], name2[32], authid[36], authid2[36]
  3991. new arg[32]
  3992. read_argv(1,arg,31)
  3993. new player = cmd_target(id,arg,7)
  3994. if (!player)
  3995. return PLUGIN_HANDLED
  3996.  
  3997. new ids[2]
  3998. ids[0] = player
  3999. get_user_name(player,name,32)
  4000. get_user_authid(player,authid,35)
  4001. udisarm_player(id,player)
  4002. set_task(0.1, "slap_player", 0, ids, 1, "a", 100)
  4003. get_user_name(id,name2,31)
  4004. get_user_authid(id,authid2,35)
  4005. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_UBERSLAP_PLAYER_MSG", name)
  4006. log_amx("%L", LANG_SERVER, "AMX_SUPER_UBERSLAP_PLAYER_LOG",name2,authid2,name,authid)
  4007. return PLUGIN_HANDLED
  4008. }
  4009.  
  4010. public udisarm_player(id,victim){
  4011. new name[32], origin[3]
  4012. get_user_origin(victim,origin)
  4013. origin[2] -= 2000
  4014. set_user_origin(victim,origin)
  4015. new iweapons[32], wpname[32], inum
  4016. get_user_weapons(victim,iweapons,inum)
  4017. for(new a=0;a<inum;++a){
  4018. get_weaponname(iweapons[a],wpname,31)
  4019. engclient_cmd(victim,"drop",wpname)
  4020. }
  4021. engclient_cmd(victim,"weapon_knife")
  4022. origin[2] += 2005
  4023. set_user_origin(victim,origin)
  4024. get_user_name(victim,name,31)
  4025. return PLUGIN_CONTINUE
  4026. }
  4027.  
  4028. public slap_player(ids[]) {
  4029. new id = ids[0]
  4030. new upower = 1,nopower= 0
  4031. if (get_user_health(id) > 1){
  4032. user_slap(id,upower)
  4033. } else {
  4034. user_slap(id,nopower)
  4035. }
  4036. return PLUGIN_CONTINUE
  4037. }
  4038.  
  4039.  
  4040. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4041. // AMX EXEC 2 v0.3 by v3x
  4042. //==========================================================================================================
  4043. new bool:isAll
  4044. new bool:isTeam
  4045. // For messages
  4046.  
  4047. public admin_exec(id,level,cid)
  4048. {
  4049.  
  4050. if(!cmd_access(id,level,cid,3))
  4051. {
  4052. return PLUGIN_HANDLED
  4053. }
  4054.  
  4055. new arg[32]
  4056. new command[64]
  4057. new players[32]
  4058. new player,num,i
  4059.  
  4060. read_argv(1,arg,31)
  4061. read_argv(2,command,63)
  4062.  
  4063. remove_quotes(command)
  4064.  
  4065. while(replace(command,63,"\'","^"")) { } // Credited to OLO
  4066.  
  4067. new activity = get_cvar_num("amx_show_activity")
  4068.  
  4069. new admin[32], adminauthid[36]
  4070. get_user_name(id,admin,31)
  4071. get_user_authid(id,adminauthid,35)
  4072.  
  4073. if(arg[0]=='@') {
  4074.  
  4075. if(equali(arg[1],"A")
  4076. || equali(arg[1],"ALL"))
  4077. {
  4078. isAll = true
  4079. isTeam = false
  4080. get_players(players,num,"c")
  4081. }
  4082.  
  4083. if(equali(arg[1],"TERRORIST")
  4084. || equali(arg[1],"T")
  4085. || equali(arg[1],"TERROR")
  4086. || equali(arg[1],"TE")
  4087. || equali(arg[1],"TER"))
  4088. {
  4089. isAll = false
  4090. isTeam = true
  4091. get_players(players,num,"ce","TERRORIST")
  4092. }
  4093.  
  4094. if(equali(arg[1],"CT")
  4095. || equali(arg[1],"C")
  4096. || equali(arg[1],"COUNTER"))
  4097. {
  4098. isAll = false
  4099. isTeam = true
  4100. get_players(players,num,"ce","CT")
  4101. }
  4102.  
  4103.  
  4104. if(!(num))
  4105. {
  4106. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  4107. return PLUGIN_HANDLED
  4108. }
  4109.  
  4110.  
  4111. for(i=0;i<num;i++)
  4112. {
  4113.  
  4114. player = players[i]
  4115.  
  4116. if(!is_user_connected(player)) continue
  4117.  
  4118. else if(player)
  4119. {
  4120.  
  4121. if(!(get_user_flags(player) & ADMIN_IMMUNITY))
  4122. {
  4123. client_cmd(player,command)
  4124. }
  4125. }
  4126. }
  4127.  
  4128. if(isAll==true)
  4129. {
  4130. switch(activity)
  4131. {
  4132. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_ALL_CASE2",admin,command)
  4133. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_ALL_CASE1",command)
  4134. }
  4135. log_amx("%L", LANG_SERVER, "AMX_SUPER_EXEC_ALL_LOG",admin,adminauthid,command)
  4136. }
  4137.  
  4138. if(isTeam==true)
  4139. {
  4140. switch(activity)
  4141. {
  4142. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_TEAM_CASE2",admin,command,arg[1])
  4143. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_TEAM_CASE1",command,arg[1])
  4144. }
  4145. log_amx("%L", LANG_SERVER, "AMX_SUPER_EXEC_TEAM_LOG",admin,adminauthid,command,arg[1])
  4146. }
  4147. }
  4148.  
  4149. else
  4150. {
  4151. new target = cmd_target(id,arg,3)
  4152. new name[33], playerauthid[36]
  4153.  
  4154. if(!is_user_connected(target))
  4155. {
  4156. return PLUGIN_HANDLED
  4157. }
  4158.  
  4159. get_user_name(target,name,32)
  4160. get_user_authid(target,playerauthid,35)
  4161.  
  4162. if(!(get_user_flags(target) & ADMIN_IMMUNITY))
  4163. {
  4164. client_cmd(target,command)
  4165. }
  4166.  
  4167.  
  4168. switch(activity)
  4169. {
  4170. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_PLAYER_CASE2",admin,command,name)
  4171. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_EXEC_PLAYER_CASE1",command,name)
  4172. }
  4173. log_amx("%L", LANG_PLAYER, "AMX_SUPER_EXEC_PLAYER_LOG",admin,adminauthid,command,name,playerauthid)
  4174.  
  4175. }
  4176.  
  4177. return PLUGIN_HANDLED
  4178. }
  4179.  
  4180.  
  4181. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4182. //STATUS from AdminModX by Zor Revisions by X-olent
  4183. //==========================================================================================================
  4184. public admin_status(id, level, cid)
  4185. {
  4186. if(!cmd_access(id, level, cid, 1))
  4187. return PLUGIN_HANDLED
  4188.  
  4189. new len = 0, message[1024], temp[32]
  4190.  
  4191. len += format(message[len], (1023-len), "<table>")
  4192.  
  4193. new player_id[32], player_num, ping = 0, loss = 0
  4194. new time = 0, seconds = 0, minutes = 0, hours = 0
  4195.  
  4196. get_players(player_id, player_num, "c")
  4197.  
  4198. for(new i = 0; i < player_num; i++)
  4199. {
  4200. // ID
  4201. len += format(message[len], (1023-len), "<tr><td>#</td><td>%d</td></tr>", get_user_userid(player_id[i]))
  4202. len += format(message[len], (1023-len), "<tr><td>Edict</td><td>%d</td>", id)
  4203.  
  4204. // Name
  4205. get_user_name(player_id[i], temp, 31)
  4206. len += format(message[len], (1023-len), "<tr><td>Nick</td><td>%s</td>", temp)
  4207.  
  4208. // Steam ID
  4209. get_user_authid(player_id[i], temp, 31)
  4210. len += format(message[len], (1023-len), "<tr><td>Steam</td><td>%s</td>", temp)
  4211.  
  4212. // Ip
  4213. get_user_ip(player_id[i], temp, 31)
  4214. len += format(message[len], (1023-len), "<tr><td>IP</td><td>%s</td>", temp)
  4215.  
  4216. // Flags
  4217. get_flags(get_user_flags(player_id[i]), temp, 31)
  4218. len += format(message[len], (1023-len), "<tr><td>Flags</td><td>%s</td>", temp)
  4219.  
  4220. // Frags
  4221. len += format(message[len], (1023-len), "<tr><td>Frags</td><td>%d</td>", get_user_frags(player_id[i]))
  4222.  
  4223. // Death
  4224. len += format(message[len], (1023-len), "<tr><td>Deaths</td><td>%d</td>", get_user_deaths(player_id[i]))
  4225.  
  4226. // Health
  4227. len += format(message[len], (1023-len), "<tr><td>Health</td><td>%d</td>", get_user_health(player_id[i]))
  4228.  
  4229. // Ping
  4230. get_user_ping(player_id[i], ping, loss)
  4231. len += format(message[len], (1023-len), "<tr><td>Ping</td><td>%d</td>", ping)
  4232. len += format(message[len], (1023-len), "<tr><td>Loss</td><td>%d</td>", loss)
  4233.  
  4234. // Team
  4235. get_user_team(player_id[i], temp, 31)
  4236. len += format(message[len], (1023-len), "<tr><td>Team</td><td>%s</td>", temp)
  4237.  
  4238. // Time in Seconds Playing
  4239. time = get_user_time( player_id[i] )
  4240. seconds = time
  4241. while( seconds >= 60 )
  4242. seconds -= 60
  4243. minutes = ( time - seconds ) / 60
  4244. hours = minutes
  4245. while( minutes >= 60 )
  4246. minutes -= 60
  4247. hours = ( hours - minutes ) / 60
  4248. len += format(message[len], (1023-len), "<tr><td>Time On</td><td>%d:%d:%d</td>", hours, minutes, seconds)
  4249. }
  4250.  
  4251. len += format(message[len], (1023-len), "</table>")
  4252.  
  4253. show_motd(id, message, "Status")
  4254.  
  4255. return PLUGIN_CONTINUE
  4256. }
  4257.  
  4258.  
  4259. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4260. //SERVER PASSWORD v1.0 by Sparky911
  4261. //==========================================================================================================
  4262. public admin_pass(id, level, cid)
  4263. {
  4264. if(!cmd_access(id, level, cid, 1))
  4265. return PLUGIN_HANDLED
  4266.  
  4267. new cmd[32], password[128]
  4268.  
  4269. read_argv(0, cmd, 31)
  4270. read_args(password, 127)
  4271. replace(password, 127, cmd, "")
  4272. format(password, 127, "%s", password)
  4273.  
  4274. new authid[36]
  4275. new name[32]
  4276. get_user_name(id, name, 31)
  4277. get_user_authid(id, authid, 35)
  4278.  
  4279. switch (get_cvar_num("amx_show_activity")) {
  4280. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_PASSWORD_SET_CASE2",name)
  4281. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_PASSWORD_SET_CASE1")
  4282. }
  4283. log_amx("%L", LANG_SERVER, "AMX_SUPER_PASSWORD_SET_LOG",name,authid,password)
  4284. set_cvar_string("sv_password", password)
  4285.  
  4286. return PLUGIN_HANDLED
  4287. }
  4288.  
  4289. public admin_nopass(id, level, cid)
  4290. {
  4291. if(!cmd_access(id, level, cid, 1))
  4292. return PLUGIN_HANDLED
  4293.  
  4294. new authid[36]
  4295. new name[32]
  4296. get_user_name(id, name, 31)
  4297. get_user_authid(id, authid, 35)
  4298.  
  4299. switch (get_cvar_num("amx_show_activity")) {
  4300. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_PASSWORD_REMOVE_CASE2",name)
  4301. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_PASSWORD_REMOVE_CASE1")
  4302. }
  4303. log_amx("%L", LANG_SERVER, "AMX_SUPER_PASSWORD_REMOVE_LOG",name,authid)
  4304. set_cvar_string("sv_password", "")
  4305.  
  4306. return PLUGIN_HANDLED
  4307. }
  4308.  
  4309.  
  4310. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4311. //ADMIN QUIT v1.1 by Bo0m! (Originally from AdminModX by Zor)
  4312. //==========================================================================================================
  4313. public admin_quit(id,level,cid){
  4314. if (!cmd_access(id,level,cid,2))
  4315. return PLUGIN_HANDLED
  4316.  
  4317. new arg[32], admin_name[32], player_name[32], admin_authid[36], player_authid[36]
  4318. read_argv(1,arg,31)
  4319. get_user_name(id,admin_name,31)
  4320. get_user_authid(id,admin_authid,35)
  4321.  
  4322. if (arg[0]=='@'){
  4323. new players[32], inum
  4324. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  4325. if (equali("ALL",arg[1])) get_players(players,inum)
  4326. else get_players(players,inum,"e",arg[1])
  4327.  
  4328. if (inum == 0) {
  4329. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  4330. return PLUGIN_HANDLED
  4331. }
  4332.  
  4333. for(new a=0;a<inum;++a){
  4334. if (get_user_flags(players[a])&ADMIN_IMMUNITY){
  4335. get_user_name(players[a],player_name,31)
  4336. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_TEAM_IMMUNITY",player_name)
  4337. continue
  4338. }
  4339. client_cmd(players[a], "quit")
  4340. client_cmd(0,"spk ambience/thunder_clap.wav")
  4341. }
  4342. switch(get_cvar_num("amx_show_activity")) {
  4343. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_TEAM_CASE2",admin_name,arg[1])
  4344. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_TEAM_CASE1",arg[1])
  4345. }
  4346. log_amx("%L", LANG_SERVER, "AMX_SUPER_QUIT_TEAM_LOG",admin_name,admin_authid,arg[1])
  4347. }
  4348. else {
  4349. new player = cmd_target(id,arg,3)
  4350. if (!player) return PLUGIN_HANDLED
  4351. client_cmd(player, "quit")
  4352. emit_sound(0, CHAN_VOICE, "ambience/thunder_clap.wav", VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
  4353.  
  4354. get_user_name(player,player_name,31)
  4355. get_user_authid(player,player_authid,35)
  4356.  
  4357. switch(get_cvar_num("amx_show_activity")) {
  4358. case 2: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_PLAYER_CASE2",admin_name,player_name)
  4359. case 1: client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_QUIT_PLAYER_CASE1",player_name)
  4360. }
  4361. log_amx("%L", LANG_SERVER, "AMX_SUPER_QUIT_PLAYER_LOG",admin_name,admin_authid,player_name,player_authid)
  4362. }
  4363. return PLUGIN_HANDLED
  4364. }
  4365.  
  4366.  
  4367. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4368. //ADMIN GAG v1.8.3 by EKS - revised by Exolent
  4369. //==========================================================================================================
  4370. public block_gagged( id )
  4371. {
  4372. if( !g_gagged[id] )
  4373. return PLUGIN_CONTINUE;
  4374.  
  4375. new cmd[5]
  4376. read_argv( 0, cmd, 4 )
  4377.  
  4378. if( cmd[3] == '_' && ( g_gagged[id] & 2 ) || g_gagged[id] & 1 )
  4379. {
  4380. client_print( id, print_chat, "%L", id, "AMX_SUPER_PLAYER_GAGGED" )
  4381. return PLUGIN_HANDLED;
  4382. }
  4383. return PLUGIN_CONTINUE;
  4384. }
  4385.  
  4386. public admin_gag( id, level, cid )
  4387. {
  4388. if( !cmd_access( id, level, cid, 2 ) )
  4389. return PLUGIN_HANDLED;
  4390.  
  4391. new arg1[32], arg2[32], arg3[32]
  4392. read_argv( 1, arg1, 31 )
  4393. read_argv( 2, arg2, 31 )
  4394. read_argv( 3, arg3, 31 )
  4395.  
  4396. new time = str_to_num( arg3 ) * 60
  4397.  
  4398. if( !strlen( arg2 ) )
  4399. format( arg2, 31, "abc" )
  4400. if( !strlen( arg3 ) )
  4401. time = GAG_TIME
  4402.  
  4403. new plflags = 11
  4404.  
  4405. if( get_user_flags( id ) && ADMIN_IMMUNITY )
  4406. plflags--
  4407.  
  4408. new player = cmd_target( id, arg1, plflags )
  4409.  
  4410. if( !player ) return PLUGIN_HANDLED
  4411.  
  4412. new flags = read_flags( arg2 )
  4413. g_gagged[player] = flags
  4414. new countflags = 0
  4415. new showflags[32]
  4416.  
  4417. if( flags & 1 )
  4418. countflags++
  4419. if( flags & 2 )
  4420. countflags += 2
  4421. if( flags & 4 )
  4422. {
  4423. countflags += 4
  4424. set_speak( player, SPEAK_MUTED )
  4425. }
  4426. switch( countflags )
  4427. {
  4428. case 1: formatex( showflags, 31, "say " )
  4429. case 2: formatex( showflags, 31, "say_team" )
  4430. case 3: formatex( showflags, 31, "say and say_team" )
  4431. case 4: formatex( showflags, 31, "voice" )
  4432. case 5: formatex( showflags, 31, "say and voice" )
  4433. case 6: formatex( showflags, 31, "say_team and voice" )
  4434. case 7: formatex( showflags, 31, "say, say_team, and voice" )
  4435. }
  4436.  
  4437. g_gagflags[player] = countflags
  4438.  
  4439. new adminname[32], playername[32]
  4440. new adminauth[32], playerauth[32]
  4441.  
  4442. get_user_name( id, adminname, 31 )
  4443. get_user_authid( id, adminauth, 31 )
  4444. get_user_name( player, playername, 31 )
  4445. get_user_authid( player, playerauth, 31 )
  4446.  
  4447. if( time < 0 || time > ( 60 * 60 ) )
  4448. time = GAG_TIME
  4449.  
  4450. num_to_str( time, arg3, 31 )
  4451.  
  4452. if( equal( arg3, "0" ) )
  4453. formatex( arg3, 31, "unlimited" )
  4454.  
  4455. switch( get_cvar_num( "amx_show_activity" ) )
  4456. {
  4457. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_PLAYER_CASE2", adminname, playername, showflags, arg3 )
  4458. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_PLAYER_CASE1", playername, showflags, arg3 )
  4459. }
  4460.  
  4461. client_print( player, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_CONSOLE" )
  4462.  
  4463. new ungagid[1]
  4464. ungagid[0] = player
  4465.  
  4466. if( time != 0 )
  4467. set_task( float( time ), "task_ungag", player, ungagid, 1 )
  4468.  
  4469. new loginfo[5]
  4470.  
  4471. loginfo[0] = player
  4472. loginfo[1] = id
  4473. loginfo[2] = 0
  4474. loginfo[3] = countflags
  4475. loginfo[4] = floatround( Float:time )
  4476. log_actions( loginfo )
  4477.  
  4478. return PLUGIN_HANDLED
  4479. }
  4480.  
  4481. public admin_ungag( id, level, cid )
  4482. {
  4483. if( !cmd_access( id, level, cid, 2 ) )
  4484. return PLUGIN_HANDLED
  4485.  
  4486. new arg[32]
  4487. read_argv( 1, arg, 31 )
  4488. new flags = 3
  4489. if( get_user_flags( id ) && ADMIN_IMMUNITY )
  4490. flags--
  4491.  
  4492. new player = cmd_target( id, arg, flags )
  4493. new adminname[32], playername[32]
  4494. new adminauth[32], playerauth[32]
  4495.  
  4496. get_user_name( id, adminname, 31 )
  4497. get_user_authid( id, adminauth, 31 )
  4498. get_user_name( player, playername, 31 )
  4499. get_user_authid( player, playerauth, 31 )
  4500.  
  4501. if( !g_gagged[player] )
  4502. {
  4503. console_print( id, "%L", LANG_PLAYER, "AMX_SUPER_GAG_PLAYER_ERROR", playername )
  4504. return PLUGIN_HANDLED
  4505. }
  4506.  
  4507. switch( get_cvar_num( "amx_show_activity" ) )
  4508.  
  4509. {
  4510. case 2: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_UNGAG_PLAYER_CASE2", adminname, playername )
  4511. case 1: client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_UNGAG_PLAYER_CASE1", playername )
  4512. }
  4513.  
  4514. client_print( player, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_UNGAG_CONSOLE" )
  4515.  
  4516. remove_task( player )
  4517. ungag_player( player )
  4518.  
  4519. new loginfo[5]
  4520.  
  4521. loginfo[0] = player
  4522. loginfo[1] = id
  4523. loginfo[2] = 1
  4524. log_actions( loginfo )
  4525.  
  4526. return PLUGIN_HANDLED
  4527. }
  4528.  
  4529. public log_actions( loginfo[] )
  4530. {
  4531. new adminname[32], playername[32]
  4532. new adminauth[32], playerauth[32]
  4533.  
  4534. get_user_name( loginfo[1], adminname, 31 )
  4535. get_user_authid( loginfo[1], adminauth, 31 )
  4536. get_user_name( loginfo[0], playername, 31 )
  4537. get_user_authid( loginfo[0], playerauth, 31 )
  4538.  
  4539. new showflags[32]
  4540.  
  4541. switch( loginfo[3] )
  4542. {
  4543. case 1: formatex( showflags, 31, "say " )
  4544. case 2: formatex( showflags, 31, "say_team" )
  4545. case 3: formatex( showflags, 31, "say and say_team" )
  4546. case 4: formatex( showflags, 31, "voice" )
  4547. case 5: formatex( showflags, 31, "say and voice" )
  4548. case 6: formatex( showflags, 31, "say_team and voice" )
  4549. case 7: formatex( showflags, 31, "say, say_team, and voice" )
  4550. }
  4551.  
  4552. switch( loginfo[2] )
  4553.  
  4554. {
  4555. case 0: log_amx( "%L", LANG_PLAYER, "AMX_SUPER_GAG_PLAYER_LOG", adminname, adminauth, playername, playerauth, loginfo[3], loginfo[4] )
  4556. case 1: log_amx( "%L", LANG_PLAYER, "AMX_SUPER_UNGAG_PLAYER_LOG", adminname, adminauth, playername, playerauth )
  4557. }
  4558. }
  4559.  
  4560. public task_ungag( ungagid[] )
  4561. {
  4562. new playername[32]
  4563.  
  4564. get_user_name( ungagid[0], playername, 31 )
  4565.  
  4566. client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_END", playername )
  4567.  
  4568. ungag_player( ungagid[0] )
  4569. }
  4570.  
  4571. public ungag_player( id )
  4572. {
  4573. if( g_gagged[id] & 4 )
  4574. {
  4575. switch( get_cvar_num( "sv_alltalk" ) )
  4576. {
  4577. case 0: set_speak( id, SPEAK_NORMAL )
  4578. case 1: set_speak( id, SPEAK_ALL )
  4579. }
  4580. }
  4581. g_gagged[id] = 0
  4582. }
  4583.  
  4584. public client_infochanged( id )
  4585. {
  4586. if( g_gagged[id] )
  4587. {
  4588. new newname[32], oldname[32]
  4589.  
  4590. get_user_info( id, "name", newname, 31 )
  4591. get_user_name( id, oldname, 31 )
  4592.  
  4593. if( !equali( newname, oldname ) )
  4594. {
  4595. client_print( id, print_chat, "%L", id, "AMX_SUPER_PLAYER_NAMELOCK" )
  4596. set_user_info( id, "name", oldname )
  4597. }
  4598. }
  4599. }
  4600.  
  4601.  
  4602. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  4603. //ADMIN WEAPON II Build 6.5 by SniperBeamer\Girthesniper\Meatwad
  4604. //Revised by Bo0m!
  4605. //==========================================================================================================
  4606. public admin_weapon(id,level,cid)
  4607. {
  4608. if ( !cmd_access(id,level,cid,3) )
  4609. return PLUGIN_HANDLED
  4610.  
  4611. new arg[32],arg2[8],weapon
  4612. new aName[32], aAuthid[36]
  4613. read_argv(1,arg,31)
  4614. read_argv(2,arg2,7)
  4615. get_user_name(id,aName,31)
  4616. get_user_authid(id,aAuthid,35)
  4617. weapon = str_to_num(arg2)
  4618.  
  4619.  
  4620. if (arg[0]=='@'){
  4621. new plist[32], pnum
  4622. if (equali("T",arg[1])) copy(arg[1],31,"TERRORIST")
  4623. if (equali("ALL",arg[1])) get_players(plist,pnum,"a")
  4624. else get_players(plist,pnum,"ae",arg[1])
  4625.  
  4626. if (pnum == 0) {
  4627. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_NO_PLAYERS")
  4628. return PLUGIN_HANDLED
  4629. }
  4630.  
  4631. for(new i=0; i<pnum; i++)
  4632. give_weapon(plist[i],weapon)
  4633.  
  4634. switch(get_cvar_num("amx_show_activity")) {
  4635. case 2: console_print(0,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_TEAM_CASE2",aName,arg[1])
  4636. case 1: console_print(0,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_TEAM_CASE1",arg[1])
  4637. }
  4638.  
  4639. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_TEAM_MSG",weapon,arg[1])
  4640. log_amx("%L", LANG_SERVER, "AMX_SUPER_WEAPON_TEAM_LOG",aName,aAuthid,weapon,arg[1])
  4641. }
  4642. else
  4643. {
  4644. new pName[32], pAuthid[36]
  4645. new player = cmd_target(id,arg,7)
  4646. if (!player) return PLUGIN_HANDLED
  4647. give_weapon(player,weapon)
  4648. get_user_name(player,pName,31)
  4649. get_user_authid(player,pAuthid,35)
  4650.  
  4651. switch(get_cvar_num("amx_show_activity")) {
  4652. case 2: console_print(0,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_PLAYER_CASE2",aName,pName)
  4653. case 1: console_print(0,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_PLAYER_CASE1",pName)
  4654. }
  4655.  
  4656. console_print(id,"%L", LANG_PLAYER, "AMX_SUPER_WEAPON_PLAYER_MSG",weapon,pName)
  4657. log_amx("%L", LANG_SERVER, "AMX_SUPER_WEAPON_PLAYER_LOG",aName,aAuthid,weapon,pName,pAuthid)
  4658. }
  4659. return PLUGIN_HANDLED
  4660. }
  4661. give_weapon(id,weapon)
  4662. {
  4663. switch (weapon)
  4664. {
  4665. //Secondary weapons
  4666. //Pistols
  4667. case 11:{
  4668. give_item(id,"weapon_glock18")
  4669. give_item(id,"ammo_9mm")
  4670. give_item(id,"ammo_9mm")
  4671. give_item(id,"ammo_9mm")
  4672. give_item(id,"ammo_9mm")
  4673. give_item(id,"ammo_9mm")
  4674. give_item(id,"ammo_9mm")
  4675. give_item(id,"ammo_9mm")
  4676. give_item(id,"ammo_9mm")
  4677. }
  4678. case 12:{
  4679. give_item(id,"weapon_usp")
  4680. give_item(id,"ammo_45acp")
  4681. give_item(id,"ammo_45acp")
  4682. give_item(id,"ammo_45acp")
  4683. give_item(id,"ammo_45acp")
  4684. give_item(id,"ammo_45acp")
  4685. give_item(id,"ammo_45acp")
  4686. give_item(id,"ammo_45acp")
  4687. give_item(id,"ammo_45acp")
  4688. give_item(id,"ammo_45acp")
  4689. }
  4690. case 13:{
  4691. give_item(id,"weapon_p228")
  4692. give_item(id,"ammo_357sig")
  4693. give_item(id,"ammo_357sig")
  4694. give_item(id,"ammo_357sig")
  4695. give_item(id,"ammo_357sig")
  4696. give_item(id,"ammo_357sig")
  4697. give_item(id,"ammo_357sig")
  4698. }
  4699. case 14:{
  4700. give_item(id,"weapon_deagle")
  4701. give_item(id,"ammo_50ae")
  4702. give_item(id,"ammo_50ae")
  4703. give_item(id,"ammo_50ae")
  4704. give_item(id,"ammo_50ae")
  4705. give_item(id,"ammo_50ae")
  4706. give_item(id,"ammo_50ae")
  4707. give_item(id,"ammo_50ae")
  4708. }
  4709. case 15:{
  4710. give_item(id,"weapon_fiveseven")
  4711. give_item(id,"ammo_57mm")
  4712. give_item(id,"ammo_57mm")
  4713. give_item(id,"ammo_57mm")
  4714. give_item(id,"ammo_57mm")
  4715. }
  4716. case 16:{
  4717. give_item(id,"weapon_elite")
  4718. give_item(id,"ammo_9mm")
  4719. give_item(id,"ammo_9mm")
  4720. give_item(id,"ammo_9mm")
  4721. give_item(id,"ammo_9mm")
  4722. give_item(id,"ammo_9mm")
  4723. give_item(id,"ammo_9mm")
  4724. give_item(id,"ammo_9mm")
  4725. give_item(id,"ammo_9mm")
  4726. }
  4727. case 17:{
  4728. give_item(id,"weapon_usp")
  4729. give_item(id,"weapon_glock18")
  4730. give_item(id,"weapon_deagle")
  4731. give_item(id,"weapon_p228")
  4732. give_item(id,"weapon_elite")
  4733. give_item(id,"weapon_fiveseven")
  4734. give_item(id,"ammo_45acp")
  4735. give_item(id,"ammo_45acp")
  4736. give_item(id,"ammo_45acp")
  4737. give_item(id,"ammo_45acp")
  4738. give_item(id,"ammo_45acp")
  4739. give_item(id,"ammo_45acp")
  4740. give_item(id,"ammo_45acp")
  4741. give_item(id,"ammo_45acp")
  4742. give_item(id,"ammo_45acp")
  4743. give_item(id,"ammo_357sig")
  4744. give_item(id,"ammo_357sig")
  4745. give_item(id,"ammo_357sig")
  4746. give_item(id,"ammo_357sig")
  4747. give_item(id,"ammo_357sig")
  4748. give_item(id,"ammo_357sig")
  4749. give_item(id,"ammo_9mm")
  4750. give_item(id,"ammo_9mm")
  4751. give_item(id,"ammo_9mm")
  4752. give_item(id,"ammo_9mm")
  4753. give_item(id,"ammo_9mm")
  4754. give_item(id,"ammo_9mm")
  4755. give_item(id,"ammo_9mm")
  4756. give_item(id,"ammo_9mm")
  4757. give_item(id,"ammo_50ae")
  4758. give_item(id,"ammo_50ae")
  4759. give_item(id,"ammo_50ae")
  4760. give_item(id,"ammo_50ae")
  4761. give_item(id,"ammo_50ae")
  4762. give_item(id,"ammo_50ae")
  4763. give_item(id,"ammo_50ae")
  4764. give_item(id,"ammo_57mm")
  4765. give_item(id,"ammo_57mm")
  4766. give_item(id,"ammo_57mm")
  4767. give_item(id,"ammo_57mm")
  4768. }
  4769. //Primary weapons
  4770. //Shotguns
  4771. case 21:{
  4772. give_item(id,"weapon_m3")
  4773. give_item(id,"ammo_buckshot")
  4774. give_item(id,"ammo_buckshot")
  4775. give_item(id,"ammo_buckshot")
  4776. give_item(id,"ammo_buckshot")
  4777. }
  4778. case 22:{
  4779. give_item(id,"weapon_xm1014")
  4780. give_item(id,"ammo_buckshot")
  4781. give_item(id,"ammo_buckshot")
  4782. give_item(id,"ammo_buckshot")
  4783. give_item(id,"ammo_buckshot")
  4784. }
  4785. //SMGs
  4786. case 31:{
  4787. give_item(id,"weapon_tmp")
  4788. give_item(id,"ammo_9mm")
  4789. give_item(id,"ammo_9mm")
  4790. give_item(id,"ammo_9mm")
  4791. give_item(id,"ammo_9mm")
  4792. give_item(id,"ammo_9mm")
  4793. give_item(id,"ammo_9mm")
  4794. give_item(id,"ammo_9mm")
  4795. give_item(id,"ammo_9mm")
  4796. }
  4797. case 32:{
  4798. give_item(id,"weapon_mac10")
  4799. give_item(id,"ammo_45acp")
  4800. give_item(id,"ammo_45acp")
  4801. give_item(id,"ammo_45acp")
  4802. give_item(id,"ammo_45acp")
  4803. give_item(id,"ammo_45acp")
  4804. give_item(id,"ammo_45acp")
  4805. give_item(id,"ammo_45acp")
  4806. give_item(id,"ammo_45acp")
  4807. give_item(id,"ammo_45acp")
  4808. }
  4809. case 33:{
  4810. give_item(id,"weapon_mp5navy")
  4811. give_item(id,"ammo_9mm")
  4812. give_item(id,"ammo_9mm")
  4813. give_item(id,"ammo_9mm")
  4814. give_item(id,"ammo_9mm")
  4815. give_item(id,"ammo_9mm")
  4816. give_item(id,"ammo_9mm")
  4817. give_item(id,"ammo_9mm")
  4818. give_item(id,"ammo_9mm")
  4819. }
  4820. case 34:{
  4821. give_item(id,"weapon_p90")
  4822. give_item(id,"ammo_57mm")
  4823. give_item(id,"ammo_57mm")
  4824. give_item(id,"ammo_57mm")
  4825. give_item(id,"ammo_57mm")
  4826. }
  4827.  
  4828. case 35:{
  4829. give_item(id,"weapon_ump45")
  4830. give_item(id,"ammo_45acp")
  4831. give_item(id,"ammo_45acp")
  4832. give_item(id,"ammo_45acp")
  4833. give_item(id,"ammo_45acp")
  4834. give_item(id,"ammo_45acp")
  4835. give_item(id,"ammo_45acp")
  4836. give_item(id,"ammo_45acp")
  4837. give_item(id,"ammo_45acp")
  4838. give_item(id,"ammo_45acp")
  4839. }
  4840. //Rifles
  4841. case 40:{
  4842. give_item(id,"weapon_famas")
  4843. give_item(id,"ammo_556nato")
  4844. give_item(id,"ammo_556nato")
  4845. give_item(id,"ammo_556nato")
  4846. }
  4847. case 41:{
  4848. give_item(id,"weapon_galil")
  4849. give_item(id,"ammo_556nato")
  4850. give_item(id,"ammo_556nato")
  4851. give_item(id,"ammo_556nato")
  4852. }
  4853. case 42:{
  4854. give_item(id,"weapon_ak47")
  4855. give_item(id,"ammo_762nato")
  4856. give_item(id,"ammo_762nato")
  4857. give_item(id,"ammo_762nato")
  4858. }
  4859. case 43:{
  4860. give_item(id,"weapon_m4a1")
  4861. give_item(id,"ammo_556nato")
  4862. give_item(id,"ammo_556nato")
  4863. give_item(id,"ammo_556nato")
  4864. }
  4865. case 44:{
  4866. give_item(id,"weapon_sg552")
  4867. give_item(id,"ammo_556nato")
  4868. give_item(id,"ammo_556nato")
  4869. give_item(id,"ammo_556nato")
  4870. }
  4871. case 45:{
  4872. give_item(id,"weapon_aug")
  4873. give_item(id,"ammo_556nato")
  4874. give_item(id,"ammo_556nato")
  4875. give_item(id,"ammo_556nato")
  4876. }
  4877. case 46:{
  4878. give_item(id,"weapon_scout")
  4879. give_item(id,"ammo_762nato")
  4880. give_item(id,"ammo_762nato")
  4881. give_item(id,"ammo_762nato")
  4882. }
  4883. case 47:{
  4884. give_item(id,"weapon_sg550")
  4885. give_item(id,"ammo_556nato")
  4886. give_item(id,"ammo_556nato")
  4887. give_item(id,"ammo_556nato")
  4888. }
  4889. case 48:{
  4890. give_item(id,"weapon_awp")
  4891. give_item(id,"ammo_338magnum")
  4892. give_item(id,"ammo_338magnum")
  4893. give_item(id,"ammo_338magnum")
  4894. }
  4895. case 49:{
  4896. give_item(id,"weapon_g3sg1")
  4897. give_item(id,"ammo_762nato")
  4898. give_item(id,"ammo_762nato")
  4899. give_item(id,"ammo_762nato")
  4900. }
  4901. //Machine gun (M249 Para)
  4902. case 51:{
  4903. give_item(id,"weapon_m249")
  4904. give_item(id,"ammo_556natobox")
  4905. give_item(id,"ammo_556natobox")
  4906. give_item(id,"ammo_556natobox")
  4907. give_item(id,"ammo_556natobox")
  4908. give_item(id,"ammo_556natobox")
  4909. give_item(id,"ammo_556natobox")
  4910. give_item(id,"ammo_556natobox")
  4911. }
  4912. //Shield combos
  4913. case 60:{
  4914. give_item(id,"weapon_shield")
  4915. give_item(id,"weapon_glock18")
  4916. give_item(id,"ammo_9mm")
  4917. give_item(id,"ammo_9mm")
  4918. give_item(id,"ammo_9mm")
  4919. give_item(id,"ammo_9mm")
  4920. give_item(id,"ammo_9mm")
  4921. give_item(id,"ammo_9mm")
  4922. give_item(id,"ammo_9mm")
  4923. give_item(id,"ammo_9mm")
  4924. give_item(id,"weapon_hegrenade")
  4925. give_item(id,"weapon_flashbang")
  4926. give_item(id,"weapon_flashbang")
  4927. give_item(id,"item_assaultsuit")
  4928. }
  4929. case 61:{
  4930. give_item(id,"weapon_shield")
  4931. give_item(id,"weapon_usp")
  4932. give_item(id,"ammo_45acp")
  4933. give_item(id,"ammo_45acp")
  4934. give_item(id,"ammo_45acp")
  4935. give_item(id,"ammo_45acp")
  4936. give_item(id,"ammo_45acp")
  4937. give_item(id,"ammo_45acp")
  4938. give_item(id,"ammo_45acp")
  4939. give_item(id,"ammo_45acp")
  4940. give_item(id,"ammo_45acp")
  4941. give_item(id,"weapon_hegrenade")
  4942. give_item(id,"weapon_flashbang")
  4943. give_item(id,"weapon_flashbang")
  4944. give_item(id,"item_assaultsuit")
  4945. }
  4946. case 62:{
  4947. give_item(id,"weapon_shield")
  4948. give_item(id,"weapon_p228")
  4949. give_item(id,"ammo_357sig")
  4950. give_item(id,"ammo_357sig")
  4951. give_item(id,"ammo_357sig")
  4952. give_item(id,"ammo_357sig")
  4953. give_item(id,"ammo_357sig")
  4954. give_item(id,"ammo_357sig")
  4955. give_item(id,"weapon_hegrenade")
  4956. give_item(id,"weapon_flashbang")
  4957. give_item(id,"weapon_flashbang")
  4958. give_item(id,"item_assaultsuit")
  4959. }
  4960. case 63:{
  4961. give_item(id,"weapon_shield")
  4962. give_item(id,"weapon_deagle")
  4963. give_item(id,"ammo_50ae")
  4964. give_item(id,"ammo_50ae")
  4965. give_item(id,"ammo_50ae")
  4966. give_item(id,"ammo_50ae")
  4967. give_item(id,"ammo_50ae")
  4968. give_item(id,"ammo_50ae")
  4969. give_item(id,"ammo_50ae")
  4970. give_item(id,"weapon_hegrenade")
  4971. give_item(id,"weapon_flashbang")
  4972. give_item(id,"weapon_flashbang")
  4973. give_item(id,"item_assaultsuit")
  4974. }
  4975. case 64:{
  4976. give_item(id,"weapon_shield")
  4977. give_item(id,"weapon_fiveseven")
  4978. give_item(id,"ammo_57mm")
  4979. give_item(id,"ammo_57mm")
  4980. give_item(id,"ammo_57mm")
  4981. give_item(id,"ammo_57mm")
  4982. give_item(id,"weapon_hegrenade")
  4983. give_item(id,"weapon_flashbang")
  4984. give_item(id,"weapon_flashbang")
  4985. give_item(id,"item_assaultsuit")
  4986. }
  4987. //Equipment
  4988. case 81:{
  4989. give_item(id,"item_kevlar")
  4990. }
  4991. case 82:{
  4992. give_item(id,"item_assaultsuit")
  4993. }
  4994. case 83:{
  4995. give_item(id,"weapon_hegrenade")
  4996. }
  4997. case 84:{
  4998. give_item(id,"weapon_flashbang")
  4999. give_item(id,"weapon_flashbang")
  5000. }
  5001. case 85:{
  5002. give_item(id,"weapon_smokegrenade")
  5003. }
  5004. case 86:{
  5005. give_item(id,"item_thighpack")
  5006. }
  5007. case 87:{
  5008. give_item(id,"weapon_shield")
  5009. }
  5010. //All ammo
  5011. case 88:{
  5012. give_item(id,"ammo_45acp")
  5013. give_item(id,"ammo_45acp")
  5014. give_item(id,"ammo_45acp")
  5015. give_item(id,"ammo_45acp")
  5016. give_item(id,"ammo_45acp")
  5017. give_item(id,"ammo_45acp")
  5018. give_item(id,"ammo_45acp")
  5019. give_item(id,"ammo_45acp")
  5020. give_item(id,"ammo_45acp")
  5021. give_item(id,"ammo_357sig")
  5022. give_item(id,"ammo_357sig")
  5023. give_item(id,"ammo_357sig")
  5024. give_item(id,"ammo_357sig")
  5025. give_item(id,"ammo_357sig")
  5026. give_item(id,"ammo_357sig")
  5027. give_item(id,"ammo_9mm")
  5028. give_item(id,"ammo_9mm")
  5029. give_item(id,"ammo_9mm")
  5030. give_item(id,"ammo_9mm")
  5031. give_item(id,"ammo_9mm")
  5032. give_item(id,"ammo_9mm")
  5033. give_item(id,"ammo_9mm")
  5034. give_item(id,"ammo_9mm")
  5035. give_item(id,"ammo_50ae")
  5036. give_item(id,"ammo_50ae")
  5037. give_item(id,"ammo_50ae")
  5038. give_item(id,"ammo_50ae")
  5039. give_item(id,"ammo_50ae")
  5040. give_item(id,"ammo_50ae")
  5041. give_item(id,"ammo_50ae")
  5042. give_item(id,"ammo_57mm")
  5043. give_item(id,"ammo_57mm")
  5044. give_item(id,"ammo_57mm")
  5045. give_item(id,"ammo_57mm")
  5046. give_item(id,"ammo_buckshot")
  5047. give_item(id,"ammo_buckshot")
  5048. give_item(id,"ammo_buckshot")
  5049. give_item(id,"ammo_buckshot")
  5050. give_item(id,"ammo_556nato")
  5051. give_item(id,"ammo_556nato")
  5052. give_item(id,"ammo_556nato")
  5053. give_item(id,"ammo_762nato")
  5054. give_item(id,"ammo_762nato")
  5055. give_item(id,"ammo_762nato")
  5056. give_item(id,"ammo_338magnum")
  5057. give_item(id,"ammo_338magnum")
  5058. give_item(id,"ammo_338magnum")
  5059. give_item(id,"ammo_556natobox")
  5060. give_item(id,"ammo_556natobox")
  5061. give_item(id,"ammo_556natobox")
  5062. give_item(id,"ammo_556natobox")
  5063. give_item(id,"ammo_556natobox")
  5064. give_item(id,"ammo_556natobox")
  5065. give_item(id,"ammo_556natobox")
  5066. }
  5067. //All grenades
  5068. case 89:{
  5069. give_item(id,"weapon_hegrenade")
  5070. give_item(id,"weapon_smokegrenade")
  5071. give_item(id,"weapon_flashbang")
  5072. give_item(id,"weapon_flashbang")
  5073. }
  5074. //C4
  5075. case 91:{
  5076. give_item(id,"weapon_c4")
  5077. cs_set_user_plant(id,1,1)
  5078. }
  5079. case 92:{
  5080. cs_set_user_nvg(id, 1)
  5081. }
  5082. //AWM Combo.
  5083. case 100:{
  5084. give_item(id,"weapon_awp")
  5085. give_item(id,"weapon_deagle")
  5086. give_item(id,"weapon_hegrenade")
  5087. give_item(id,"weapon_flashbang")
  5088. give_item(id,"weapon_flashbang")
  5089. give_item(id,"weapon_smokegrenade")
  5090. give_item(id,"ammo_338magnum")
  5091. give_item(id,"ammo_338magnum")
  5092. give_item(id,"ammo_338magnum")
  5093. give_item(id,"ammo_50ae")
  5094. give_item(id,"ammo_50ae")
  5095. give_item(id,"ammo_50ae")
  5096. give_item(id,"ammo_50ae")
  5097. give_item(id,"ammo_50ae")
  5098. give_item(id,"ammo_50ae")
  5099. give_item(id,"ammo_50ae")
  5100. give_item(id,"item_assaultsuit")
  5101. }
  5102. //Money case.
  5103. case 160:{
  5104. cs_set_user_money(id, 16000, 1)
  5105. }
  5106. //AllWeapons
  5107. case 666:{
  5108. give_item(id,"weapon_usp")
  5109. give_item(id,"weapon_glock18")
  5110. give_item(id,"weapon_deagle")
  5111. give_item(id,"weapon_p228")
  5112. give_item(id,"weapon_elite")
  5113. give_item(id,"weapon_fiveseven")
  5114. give_item(id,"weapon_m3")
  5115. give_item(id,"weapon_xm1014")
  5116. give_item(id,"weapon_tmp")
  5117. give_item(id,"weapon_mac10")
  5118. give_item(id,"weapon_mp5navy")
  5119. give_item(id,"weapon_p90")
  5120. give_item(id,"weapon_ump45")
  5121. give_item(id,"weapon_famas")
  5122. give_item(id,"weapon_galil")
  5123. give_item(id,"weapon_ak47")
  5124. give_item(id,"weapon_m4a1")
  5125. give_item(id,"weapon_sg552")
  5126. give_item(id,"weapon_aug")
  5127. give_item(id,"weapon_scout")
  5128. give_item(id,"weapon_sg550")
  5129. give_item(id,"weapon_awp")
  5130. give_item(id,"weapon_g3sg1")
  5131. give_item(id,"weapon_m249")
  5132. give_item(id,"ammo_45acp")
  5133. give_item(id,"ammo_45acp")
  5134. give_item(id,"ammo_45acp")
  5135. give_item(id,"ammo_45acp")
  5136. give_item(id,"ammo_45acp")
  5137. give_item(id,"ammo_45acp")
  5138. give_item(id,"ammo_45acp")
  5139. give_item(id,"ammo_45acp")
  5140. give_item(id,"ammo_45acp")
  5141. give_item(id,"ammo_357sig")
  5142. give_item(id,"ammo_357sig")
  5143. give_item(id,"ammo_357sig")
  5144. give_item(id,"ammo_357sig")
  5145. give_item(id,"ammo_357sig")
  5146. give_item(id,"ammo_357sig")
  5147. give_item(id,"ammo_9mm")
  5148. give_item(id,"ammo_9mm")
  5149. give_item(id,"ammo_9mm")
  5150. give_item(id,"ammo_9mm")
  5151. give_item(id,"ammo_9mm")
  5152. give_item(id,"ammo_9mm")
  5153. give_item(id,"ammo_9mm")
  5154. give_item(id,"ammo_9mm")
  5155. give_item(id,"ammo_50ae")
  5156. give_item(id,"ammo_50ae")
  5157. give_item(id,"ammo_50ae")
  5158. give_item(id,"ammo_50ae")
  5159. give_item(id,"ammo_50ae")
  5160. give_item(id,"ammo_50ae")
  5161. give_item(id,"ammo_50ae")
  5162. give_item(id,"ammo_57mm")
  5163. give_item(id,"ammo_57mm")
  5164. give_item(id,"ammo_57mm")
  5165. give_item(id,"ammo_57mm")
  5166. give_item(id,"ammo_buckshot")
  5167. give_item(id,"ammo_buckshot")
  5168. give_item(id,"ammo_buckshot")
  5169. give_item(id,"ammo_buckshot")
  5170. give_item(id,"ammo_556nato")
  5171. give_item(id,"ammo_556nato")
  5172. give_item(id,"ammo_556nato")
  5173. give_item(id,"ammo_762nato")
  5174. give_item(id,"ammo_762nato")
  5175. give_item(id,"ammo_762nato")
  5176. give_item(id,"ammo_338magnum")
  5177. give_item(id,"ammo_338magnum")
  5178. give_item(id,"ammo_338magnum")
  5179. give_item(id,"ammo_556natobox")
  5180. give_item(id,"ammo_556natobox")
  5181. give_item(id,"ammo_556natobox")
  5182. give_item(id,"ammo_556natobox")
  5183. give_item(id,"ammo_556natobox")
  5184. give_item(id,"ammo_556natobox")
  5185. give_item(id,"ammo_556natobox")
  5186. give_item(id,"weapon_hegrenade")
  5187. give_item(id,"weapon_smokegrenade")
  5188. give_item(id,"weapon_flashbang")
  5189. give_item(id,"weapon_flashbang")
  5190. }
  5191. default: return false
  5192. }
  5193. return true
  5194. }
  5195.  
  5196.  
  5197. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5198. //SERVER SHUTDOWN 1.0 by Remo Williams
  5199. //Revised by Bo0m!
  5200. //==========================================================================================================
  5201. public admin_shutdown(id, level, cid) {
  5202. if (!cmd_access(id,level,cid,1))
  5203. return PLUGIN_HANDLED
  5204.  
  5205. new admin_name[32], admin_authid[36]
  5206. get_user_name(id,admin_name,31)
  5207. get_user_authid(id,admin_authid,35)
  5208.  
  5209. client_print(0,print_chat,"%L", LANG_PLAYER, "AMX_SUPER_SHUTDOWN_MESSAGE")
  5210. set_task(5.0,"exit_server")
  5211.  
  5212. log_amx("%L", LANG_PLAYER, "AMX_SUPER_SHUTDOWN_MESSAGE_LOG",admin_name,admin_authid)
  5213.  
  5214. return PLUGIN_HANDLED
  5215. }
  5216.  
  5217. public exit_server() {
  5218. client_cmd(0,"retry",1.5)
  5219. server_cmd("quit")
  5220. }
  5221.  
  5222.  
  5223. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5224. // Death Event
  5225. //==========================================================================================================
  5226. public event_death() {
  5227.  
  5228. //----------------------------------------------------------------------------------------------------------
  5229. //SPECTATOR BUG FIX v1.0 by ]FUSION[ Gray Death
  5230. //----------------------------------------------------------------------------------------------------------
  5231. new ids[1]
  5232. ids[0] = read_data(2)
  5233. set_task(1.0,"spectbugfix",0,ids,1)
  5234.  
  5235. //----------------------------------------------------------------------------------------------------------
  5236. //DEAD CHAT v2.1 by SuicideDog
  5237. //----------------------------------------------------------------------------------------------------------
  5238. if ( get_pcvar_num(deadchat) == 1 ) {
  5239. new id = read_data(2)
  5240. if (is_user_connected(id) && get_speak(id) != SPEAK_MUTED )
  5241. set_speak(id, SPEAK_LISTENALL)
  5242. client_print(id,print_center,"%L", LANG_PLAYER, "AMX_SUPER_DEADCHAT_MESSAGE")
  5243. }
  5244. return PLUGIN_CONTINUE
  5245. }
  5246.  
  5247. public spectbugfix(ids[]) {
  5248. client_cmd(ids[0],"+duck;-duck;spec_menu 0")
  5249. }
  5250.  
  5251.  
  5252. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5253. // Player Connecting Event
  5254. //==========================================================================================================
  5255. public client_connect(id) {
  5256.  
  5257. HasPermGod[id] = false
  5258. HasPermNoclip[id] = false
  5259.  
  5260. HasPermGlow[id] = false
  5261.  
  5262. set_user_speak(id,SPEAK_NORMAL2)
  5263. g_admin[id] = 0
  5264. g_speed[id] = false;
  5265.  
  5266. //----------------------------------------------------------------------------------------------------------
  5267. //"SHOWNDEAD" SCOREBOARD FIX v0.9.4 by EJ/Vantage/Mouse
  5268. //----------------------------------------------------------------------------------------------------------
  5269. if(!(is_user_bot(id)) ) {
  5270. message_begin(MSG_ALL, gmsg_TeamInfo, {0, 0, 0}, id)
  5271. write_byte(id)
  5272. write_string(SpecName)
  5273. message_end()
  5274. }
  5275.  
  5276. //----------------------------------------------------------------------------------------------------------
  5277. //LOADING SOUNDS v1.0 by [OSA]Odin/White Panther
  5278. //----------------------------------------------------------------------------------------------------------
  5279. if(get_pcvar_num(loadsong) == 1) {
  5280. new i
  5281. i = random_num(0,LOADINGSOUNDS-1)
  5282. client_cmd(id,"mp3 play media/%s",soundlist[i])
  5283. }
  5284.  
  5285. return PLUGIN_CONTINUE
  5286. }
  5287.  
  5288. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5289. // Player Spawn Event
  5290. //==========================================================================================================
  5291. public event_spawned(id) {
  5292.  
  5293. if(HasPermGod[id])
  5294. set_user_godmode(id,1)
  5295.  
  5296. if(HasPermNoclip[id])
  5297. set_user_noclip(id,1)
  5298.  
  5299. if ( get_pcvar_num(deadchat)==1 ) {
  5300. if (is_user_connected(id) && get_speak(id) != SPEAK_MUTED )
  5301. set_speak(id, SPEAK_NORMAL)
  5302. }
  5303. return PLUGIN_CONTINUE
  5304. }
  5305.  
  5306. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5307. // CurWeapon Event
  5308. //==========================================================================================================
  5309. public changeWeapon(id)
  5310. {
  5311. if(unammo[id])
  5312. {
  5313. new wpnid = read_data(2);
  5314. new clip = read_data(3);
  5315.  
  5316. if (wpnid == CSW_C4 || wpnid == CSW_KNIFE) return;
  5317. if (wpnid == CSW_HEGRENADE || wpnid == CSW_SMOKEGRENADE || wpnid == CSW_FLASHBANG) return;
  5318.  
  5319. if (clip == 0) reloadAmmo(id);
  5320. }
  5321. }
  5322.  
  5323.  
  5324. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5325. // Player Disconnect Event
  5326. //==========================================================================================================
  5327. public client_disconnect(id) {
  5328.  
  5329. HasPermGod[id] = false
  5330. HasPermNoclip[id] = false
  5331.  
  5332. HasPermGlow[id] = false
  5333.  
  5334. badaim[id] = false
  5335. autoban[id] = false
  5336.  
  5337. new param[1]
  5338. param[0] = id
  5339. set_task(2.0, "leave_msg", 0, param, 1)
  5340.  
  5341. for( new i = 0; i < 4; i++ )
  5342. g_glow[id][i] = 0
  5343.  
  5344. if( g_gagged[id] )
  5345. {
  5346. new name[32]
  5347. get_user_name( id, name, 31 )
  5348. get_user_authid( id, g_wasgagged[id], 31 )
  5349. client_print( 0, print_chat, "%L", LANG_PLAYER, "AMX_SUPER_GAG_CONNECTED", name, g_wasgagged[id] )
  5350. g_gagged[id] = 0
  5351. }
  5352.  
  5353. remove_task(id)
  5354.  
  5355. if (g_admin[id]) {
  5356. set_user_speak(id,SPEAK_NORMAL2)
  5357. g_admin[id] = 0
  5358. }
  5359.  
  5360. team[id] = CS_TEAM_UNASSIGNED
  5361.  
  5362. return PLUGIN_HANDLED
  5363. }
  5364.  
  5365. ////////////////////////////////////////////////////////////////////////////////////////////////////////////
  5366. // Precache Files
  5367. //==========================================================================================================
  5368. public plugin_precache()
  5369. {
  5370. mflash = precache_model("sprites/muzzleflash.spr")
  5371. smoke = precache_model("sprites/steam1.spr")
  5372. blueflare2 = precache_model( "sprites/blueflare2.spr")
  5373. white = precache_model("sprites/white.spr")
  5374. light = precache_model("sprites/lgtning.spr")
  5375.  
  5376. //Slay 2 & Quit Sounds
  5377. precache_sound("ambience/thunder_clap.wav")
  5378. precache_sound("weapons/headshot2.wav")
  5379.  
  5380. //Fire Sounds
  5381. precache_sound("ambience/flameburst1.wav")
  5382. precache_sound("scientist/scream21.wav")
  5383. precache_sound("scientist/scream07.wav")
  5384.  
  5385. //Rocket Sounds
  5386. precache_sound("weapons/rocketfire1.wav")
  5387. precache_sound("weapons/rocket1.wav")
  5388.  
  5389. //Flashbang Sound
  5390. precache_sound("weapons/flashbang-2.wav")
  5391.  
  5392.  
  5393. }
  5394.