HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. /*****************************************************\
  2. ===============================
  3. || [ZP] Aim Info Plugin v1.0 ||
  4. ===============================
  5.  
  6. ||DESCRIPTION||
  7. When you aim at your friend, a hud message
  8. appears which shows you the Name, HP,
  9. Armor and Ammo Packs of your friend.
  10.  
  11. ||CREDITS||
  12. - AMX MOD X Team ----> For most of the natives
  13. - MeRcyLeZZ ----> For ZP 4.3
  14. - Sn!ff3r ----> For the Actual Aim info Plugin
  15.  
  16. \*****************************************************/
  17. #include <amxmodx>
  18. #include <zombieplague>
  19.  
  20. #define PLUGIN "Aim Info Plugin"
  21. #define VERSION "1.0"
  22. #define AUTHOR "@bdul!+Sn!ff3r"
  23.  
  24. new g_status_sync
  25.  
  26. public plugin_init()
  27. {
  28. register_plugin(PLUGIN, VERSION, AUTHOR)
  29. register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
  30. register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
  31. register_dictionary("zp_aim_info.txt");
  32.  
  33. g_status_sync = CreateHudSyncObj()
  34. }
  35.  
  36. public showStatus(id)
  37. {
  38. if(!is_user_bot(id) && is_user_connected(id))
  39. {
  40. new name[32], pid = read_data(2)
  41.  
  42. get_user_name(pid, name, 31)
  43. new color1 = 0, color2 = 0
  44.  
  45. new team1 = zp_get_user_zombie(id), team2 = zp_get_user_zombie(pid)
  46.  
  47. if (team2 == 1)
  48. color1 = 255
  49. else
  50. color2 = 255
  51.  
  52. if (team1 == team2) // friend
  53. {
  54. set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
  55. ShowSyncHudMsg(id, g_status_sync, "%L", LANG_PLAYER, "AIM_INFO", name, get_user_health(pid), get_user_armor(pid), zp_get_user_ammo_packs(pid))
  56. }
  57. }
  58. }
  59.  
  60. public hideStatus(id)
  61. {
  62. ClearSyncHud(id, g_status_sync)
  63. }
  64. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  65. *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  66. */
  67.