hlmod.hu
https://hlmod.hu/

[ZP] Addon: Aim info
https://hlmod.hu/viewtopic.php?f=10&t=8899
Oldal: 1 / 1

Szerző:  norbee.16 [ 2013.06.10. 17:33 ]
Hozzászólás témája:  [ZP] Addon: Aim info

Hali! Ki javítanátok ez nekem?
Hiba:
Kód:
51b5f062011e1.sma(57) : warning 204: symbol is assigned a value that is never used: "color2"
51b5f062011e1.sma(57) : warning 204: symbol is assigned a value that is never used: "color1"
51b5f062011e1.sma(59) : warning 217: loose indentation
51b5f062011e1.sma(59) : error 029: invalid expression, assumed zero
51b5f062011e1.sma(59) : error 017: undefined symbol "hideStatus"
51b5f062011e1.sma(66) : error 001: expected token: "}", but found "-end of file-"

3 Errors.
Could not locate output file 51b5f062011e1.amx (compile failed).

SMA:
SMA Forráskód: [ Mindet kijelol ]
  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(255, 140, 0, -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. public hideStatus(id)
  60. {
  61. ClearSyncHud(id, g_status_sync)
  62. }
  63. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  64. *{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
  65. */
  66.  

Szerző:  crazy` [ 2013.06.10. 17:49 ]
Hozzászólás témája:  Re: [ZP] Addon: Aim info

javítva:
SMA Forráskód: [ Mindet kijelol ]
  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 = 0
  51.  
  52. if (team1 == team2) // friend
  53. {
  54. set_hudmessage(color1, 140, 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. */

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/