hlmod.hu
https://hlmod.hu/

zp_jelenlegi mód kiíró hiba
https://hlmod.hu/viewtopic.php?f=9&t=8215
Oldal: 1 / 1

Szerző:  pixxa112 [2013.04.23. 22:37 ]
Hozzászólás témája:  zp_jelenlegi mód kiíró hiba

Hali.

Valaki ezt ki tudná javítani?

HIBA:
A hiba az, hogy ezeknek a módoknak ezt írja ki: Ismeretlen mód

-Assassin
-Snipers
-Armageddon
-Sniper vs. Assassin


Ezeknél valamiért nem írja ki a módot.

Valaki ki tudná javítani, hogy azt írja ki amilyen mód van, ne pedig azt, hogy ismeretlen mód.

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <zombieplague>
  3.  
  4. /*================================================================================
  5.   [Customizations]
  6.   =================================================================================*/
  7.  
  8. // Hudmessage tag
  9. new const hud_tag[] = "Jelenlegi mód: "
  10.  
  11. // Name for each Hudmessage Mode
  12. new const mode_names[][] =
  13. {
  14. "Várakozás az új módra...", // No mode Started
  15. "Normál fertőzéses", // Normal Infection, single round
  16. "Nemesis mód", // Nemesis Mode (zombie boss)
  17. "Túlélő mód", // Survivor Mode (human boss)
  18. "Raj mód", // Swarm round (no infections)
  19. "Többszőrös fertőzéses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  20. "Pestis mód", // Plague round (nemesis & zombies vs. survivors & humans)
  21. "Armageddon mód",
  22. "Assassin mód",
  23. "Sniper mód",
  24. "Assassin vs. Snipers mód",
  25. "Ismeretlen mód" // An unofficial mode (edited/created/modified by user)
  26. }
  27.  
  28. // RGB Colors for each Hudmessage Mode
  29. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  30. new const rgb_hud_colors[sizeof(mode_names)][3] =
  31. {
  32. // R G B
  33. {255, 255, 255}, // No mode Started
  34. {0, 255, 0}, // Normal Infection, single round
  35. {255, 0, 0}, // Nemesis Mode (zombie boss)
  36. {0, 0, 255}, // Survivor Mode (human boss)
  37. {255, 255, 0}, // Swarm round (no infections)
  38. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  39. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  40. {255, 255, 255}, // An unofficial mode (edited/created/modified by user)
  41. {255, 26, 99},
  42. {255, 64, 85}
  43. }
  44.  
  45. // X Hudmessage Position ( --- )
  46. const Float:HUD_MODE_X = 0.0
  47.  
  48. // Y Hudmessage Position ( ||| )
  49. const Float:HUD_MODE_Y = 0.2
  50.  
  51. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  52. const Float:START_TIME = 3.0
  53.  
  54. /*================================================================================
  55.   Customization ends here! Yes, that's it. Editing anything beyond
  56.   here is not officially supported. Proceed at your own risk...
  57.   =================================================================================*/
  58.  
  59. // Variables
  60. new g_SyncHud, g_Mode
  61.  
  62. // Cvar pointers
  63. new cvar_enable, cvar_central
  64.  
  65. public plugin_init()
  66. {
  67. // Plugin Info
  68. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  69.  
  70. // Round Start Event
  71. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  72.  
  73. // Enable Cvar
  74. cvar_enable = register_cvar("zp_display_mode", "1")
  75.  
  76. // Server Cvar
  77. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  78.  
  79. // Variables
  80. g_SyncHud = CreateHudSyncObj()
  81.  
  82. // Getting "zp_on" cvar
  83. if(cvar_exists("zp_on"))
  84. cvar_central = get_cvar_pointer("zp_on")
  85.  
  86. // If Zombie Plague is not running (bugfix)
  87. if(!get_pcvar_num(cvar_central))
  88. pause("a")
  89. }
  90.  
  91. public client_putinserver(id)
  92. {
  93. // Setting Hud
  94. set_task(START_TIME, "mode_hud", id, _, _, "b")
  95. }
  96.  
  97. public event_RoundStart()
  98. {
  99. // Update var (no mode started / in delay)
  100. g_Mode = 0
  101. }
  102.  
  103. public mode_hud(id)
  104. {
  105. // If the Cvar isn't enabled
  106. if(!get_pcvar_num(cvar_enable))
  107. return;
  108.  
  109. // Hud Options
  110. set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_X, HUD_MODE_Y, 0, 6.0, 12.0)
  111.  
  112. // Now the hud appears
  113. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  114. }
  115.  
  116. public zp_round_started(mode, id)
  117. {
  118. // Update var with Mode num
  119. g_Mode = mode
  120.  
  121. // An unofficial mode
  122. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  123. g_Mode = sizeof(mode_names) - 1
  124. }
  125.  
  126. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  127.   *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  128.   */


Előre is köszi.

Szerző:  DeteCT0R [2013.04.23. 23:53 ]
Hozzászólás témája:  Re: zp_jelenlegi mód kiíró hiba

Szerintem 4.3-ba nincs assasin sniper stb mod....
Akkor minek hasznalsz zombieplague.inc-et? (Milyen zombi modod van?)

Szerző:  pixxa112 [2013.04.24. 00:07 ]
Hozzászólás témája:  Re: zp_jelenlegi mód kiíró hiba

DeteCT0R írta:
Szerintem 4.3-ba nincs assasin sniper stb mod....
Akkor minek hasznalsz zombieplague.inc-et? (Milyen zombi modod van?)


5.0.8
És ezeket úgy szedtem le, hogy csak 5.0.8 módnál működnek.

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