HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. // *************************************************************
  2. // * #### #### #### #### ## ## ######## ## ## *
  3. // * ## ## ## ## ## ## ## ## ## ## ## ## ## *
  4. // * ## ### ## ## ### ## ## ## ####### *
  5. // * ## ## ## ## ## ## ## ## *
  6. // * ## ## ## ## ## ## ## ## *
  7. // *************************************************************
  8. //
  9. // [My Steamid: http://steamcommunity.com/id/mmyth]
  10.  
  11. #include <amxmodx>
  12. #include <amxmisc>
  13.  
  14. #define PLUGIN "Call of Duty Aim"
  15. #define VERSION "1.4"
  16. #define AUTHOR "MMYTH"
  17.  
  18. #pragma semicolon 1
  19.  
  20. #define MAX_SIZE_ID 33
  21.  
  22. new is_friend[MAX_SIZE_ID], is_accept[MAX_SIZE_ID];
  23.  
  24. new g_hit, SyncHudMsg;
  25.  
  26. public plugin_init()
  27. {
  28. register_plugin(PLUGIN, VERSION, AUTHOR);
  29.  
  30. g_hit = register_cvar("cod_aim_showhit", "1"); // drekes idea ;D
  31.  
  32.  
  33. register_event("Damage", "event_damage", "b", "2!0", "3=0", "4!0");
  34. register_event("StatusValue", "event_statusvalue_team", "be", "1=1");
  35. register_event("StatusValue", "event_status_value", "be", "1=2", "2!0");
  36. register_event("StatusValue", "event_statusvalue_hide", "be", "1=1", "2=0");
  37.  
  38.  
  39. SyncHudMsg = CreateHudSyncObj();
  40. }
  41.  
  42.  
  43. public client_putinserver(id)
  44. {
  45. is_accept[id] ? (is_accept[id] = 0) : (is_accept[id] = 1);
  46. CallofDutyAim(id, "250 250 50");
  47. }
  48.  
  49.  
  50. public event_damage(id)
  51. {
  52. new attacker = get_user_attacker(id);
  53.  
  54. if(get_pcvar_num(g_hit) && is_accept[attacker])
  55. {
  56. set_hudmessage(170, 255, 255, -1.0, -1.0, 0, 2.0, 3.0);
  57. ShowSyncHudMsg(attacker, SyncHudMsg, "X");
  58. }
  59. }
  60.  
  61. public event_statusvalue_team(id)
  62. {
  63. if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
  64. {
  65. is_friend[id] = read_data(2);
  66. }
  67. }
  68.  
  69. public event_status_value(id)
  70. {
  71. if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
  72. {
  73. if(is_friend[id] == 1)
  74. {
  75. CallofDutyAim(id, "50 250 50");
  76. }
  77. else
  78. {
  79. CallofDutyAim(id, "255 0 0");
  80. }
  81. }
  82. }
  83.  
  84. public event_statusvalue_hide(id)
  85. {
  86. if(!is_user_bot(id) && is_user_connected(id) && is_accept[id])
  87. {
  88. CallofDutyAim(id, "250 250 50");
  89. }
  90. }
  91.  
  92. CallofDutyAim(id, color[])
  93. {
  94. client_cmd(id, "cl_crosshair_color ^"%s^"", color);
  95. }
  96. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  97. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1046\\ f0\\ fs16 \n\\ par }
  98. */
  99.