hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.27. 12:51



Jelenlévő felhasználók

Jelenleg 541 felhasználó van jelen :: 1 regisztrált, 0 rejtett és 540 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: siska15 az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 8 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Hudok egyszerüsitése
HozzászólásElküldve: 2013.01.20. 11:26 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
Hali!
Valaki le tudná nekem ezekbe a pluginokba a hudokat egyszerüsiteni?

[ZP] Jelenlegi mód kiíró:
SMA Forráskód: [ Mindet kijelol ]
  1. /*================================================================================
  2.  
  3. [[ZP] Addon: Display the Current Mode
  4. Copyright (C) 2009 by meTaLiCroSS, Vi�a del Mar, Chile
  5.  
  6. This program is free software: you can redistribute it and/or modify
  7. it under the terms of the GNU General Public License as published by
  8. the Free Software Foundation, either version 3 of the License, or
  9. (at your option) any later version.
  10.  
  11. This program is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. GNU General Public License for more details.
  15.  
  16. You should have received a copy of the GNU General Public License
  17. along with this program. If not, see <http://www.gnu.org/licenses/>.
  18.  
  19. In addition, as a special exception, the author gives permission to
  20. link the code of this program with the Half-Life Game Engine ("HL
  21. Engine") and Modified Game Libraries ("MODs") developed by Valve,
  22. L.L.C ("Valve"). You must obey the GNU General Public License in all
  23. respects for all of the code used other than the HL Engine and MODs
  24. from Valve. If you modify this file, you may extend this exception
  25. to your version of the file, but you are not obligated to do so. If
  26. you do not wish to do so, delete this exception statement from your
  27. version.
  28.  
  29. ** Credits:
  30.  
  31. - Exolent[jNr]: Big plugin optimization
  32.  
  33. =================================================================================*/
  34.  
  35. #include <amxmodx>
  36. #include <zombieplague>
  37.  
  38. /*================================================================================
  39.  [Customizations]
  40. =================================================================================*/
  41.  
  42. // Hudmessage tag
  43. new const hud_tag[] = "Jelenlegi mod: "
  44.  
  45. // Name for each Hudmessage Mode
  46. new const mode_names[][] =
  47. {
  48. "Varakozas az uj modra...", // No mode Started
  49. "Normal fertozeses", // Normal Infection, single round
  50. "Nemesis mod", // Nemesis Mode (zombie boss)
  51. "Tulelo mod", // Survivor Mode (human boss)
  52. "Raj mod", // Swarm round (no infections)
  53. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  54. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  55. "Ismeretlen mod" // An unofficial mode (edited/created/modified by user)
  56. }
  57.  
  58. // RGB Colors for each Hudmessage Mode
  59. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  60. new const rgb_hud_colors[sizeof(mode_names)][3] =
  61. {
  62. // R G B
  63. {255, 255, 255}, // No mode Started
  64. {0, 255, 0}, // Normal Infection, single round
  65. {255, 0, 0}, // Nemesis Mode (zombie boss)
  66. {0, 0, 255}, // Survivor Mode (human boss)
  67. {255, 255, 0}, // Swarm round (no infections)
  68. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  69. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  70. {255, 255, 255} // An unofficial mode (edited/created/modified by user)
  71. }
  72.  
  73. // X Hudmessage Position ( --- )
  74. const Float:HUD_MODE_X = 0.65
  75.  
  76. // Y Hudmessage Position ( ||| )
  77. const Float:HUD_MODE_Y = 0.2
  78.  
  79. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  80. const Float:START_TIME = 3.0
  81.  
  82. /*================================================================================
  83.  Customization ends here! Yes, that's it. Editing anything beyond
  84.  here is not officially supported. Proceed at your own risk...
  85. =================================================================================*/
  86.  
  87. // Variables
  88. new g_SyncHud, g_Mode
  89.  
  90. // Cvar pointers
  91. new cvar_enable, cvar_central
  92.  
  93. public plugin_init()
  94. {
  95. // Plugin Info
  96. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  97.  
  98. // Round Start Event
  99. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  100.  
  101. // Enable Cvar
  102. cvar_enable = register_cvar("zp_display_mode", "1")
  103.  
  104. // Server Cvar
  105. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  106.  
  107. // Variables
  108. g_SyncHud = CreateHudSyncObj()
  109.  
  110. // Getting "zp_on" cvar
  111. if(cvar_exists("zp_on"))
  112. cvar_central = get_cvar_pointer("zp_on")
  113.  
  114. // If Zombie Plague is not running (bugfix)
  115. if(!get_pcvar_num(cvar_central))
  116. pause("a")
  117. }
  118.  
  119. public client_putinserver(id)
  120. {
  121. // Setting Hud
  122. set_task(START_TIME, "mode_hud", id, _, _, "b")
  123. }
  124.  
  125. public event_RoundStart()
  126. {
  127. // Update var (no mode started / in delay)
  128. g_Mode = 0
  129. }
  130.  
  131. public mode_hud(id)
  132. {
  133. // If the Cvar isn't enabled
  134. if(!get_pcvar_num(cvar_enable))
  135. return;
  136.  
  137. // Hud Options
  138. 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)
  139.  
  140. // Now the hud appears
  141. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  142. }
  143.  
  144. public zp_round_started(mode, id)
  145. {
  146. // Update var with Mode num
  147. g_Mode = mode
  148.  
  149. // An unofficial mode
  150. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  151. g_Mode = sizeof(mode_names) - 1
  152. }
  153.  
  154. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  155. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
  156. */
  157.  


[ZP] Bónusz Lőszer Csomag:
SMA Forráskód: [ Mindet kijelol ]
  1. #include < amxmodx >
  2. #include < zombieplague >
  3.  
  4. #define PLUGIN_NAME "[ZP] Addon: Bonus Ammo Pack"
  5. #define PLUGIN_VERSION "0.2"
  6. #define PLUGIN_AUTHOR "����������"
  7.  
  8. #define HUD_ZM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  9. #define HUD_ZM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  10.  
  11. #define HUD_HM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  12. #define HUD_HM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  13.  
  14. #define HUD_NO_ONE 255, 255, 255, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  15.  
  16.  
  17. #define BONUS_ZM_WIN 6
  18. #define BONUS_ZM_FAIL 2
  19.  
  20.  
  21. #define BONUS_HM_WIN 6
  22. #define BONUS_HM_FAIL 2
  23.  
  24.  
  25. #define BONUS_NO_ONE 5
  26.  
  27. new g_maxplayers
  28.  
  29. public plugin_init() {
  30. register_plugin ( PLUGIN_NAME , PLUGIN_VERSION , PLUGIN_AUTHOR )
  31.  
  32. register_dictionary ( "zp_bonus_ammopack.txt" )
  33.  
  34. g_maxplayers = get_maxplayers ( )
  35. }
  36.  
  37. public zp_round_ended ( Team ) {
  38.  
  39. if ( Team == WIN_ZOMBIES )
  40. {
  41. for ( new i = 1; i <= g_maxplayers ; i++ )
  42. {
  43. if ( ! is_user_connected ( i ) ) continue;
  44.  
  45. if ( zp_get_user_zombie ( i ) || zp_get_user_nemesis ( i ) )
  46. {
  47. set_hudmessage ( HUD_ZM_WIN )
  48. show_hudmessage(i, "%L", LANG_PLAYER, "WIN" , BONUS_ZM_WIN)
  49.  
  50. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_ZM_WIN );
  51. }
  52. else
  53. {
  54. set_hudmessage( HUD_ZM_FAIL )
  55. show_hudmessage(i, "%L", LANG_PLAYER, "FAIL" , BONUS_ZM_FAIL)
  56.  
  57. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_ZM_FAIL );
  58. }
  59. }
  60. }
  61. else if ( Team == WIN_HUMANS)
  62. {
  63. for ( new i = 1; i <= g_maxplayers ; i++ )
  64. {
  65. if ( ! is_user_connected ( i ) ) continue;
  66.  
  67. if ( zp_get_user_human ( i ) || zp_get_user_survivor ( i ) )
  68. {
  69. set_hudmessage( HUD_HM_WIN )
  70. show_hudmessage( i, "%L", LANG_PLAYER, "WIN" , BONUS_HM_WIN)
  71.  
  72. zp_set_user_ammo_packs( i, zp_get_user_ammo_packs( i ) + BONUS_HM_WIN );
  73. }
  74. else
  75. {
  76. set_hudmessage( HUD_HM_FAIL )
  77. show_hudmessage ( i , "%L", LANG_PLAYER, "FAIL" , BONUS_HM_FAIL)
  78.  
  79. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_HM_FAIL ) ;
  80. }
  81. }
  82. }
  83. else
  84. {
  85. for ( new i = 1; i <= g_maxplayers ; i++ )
  86. {
  87. if ( ! is_user_connected ( i ) ) continue;
  88.  
  89. set_hudmessage ( HUD_NO_ONE )
  90. show_hudmessage ( i , "%L", LANG_PLAYER, "NO_ONE" , BONUS_NO_ONE )
  91.  
  92. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_NO_ONE ) ;
  93. }
  94. }
  95. }
  96.  
  97. stock zp_get_user_human ( id )
  98. return ( ! zp_get_user_survivor ( id ) && ! zp_get_user_nemesis ( id ) && ! zp_get_user_zombie ( id ) )
  99.  
  100.  


[ZP] Informalo:
SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. /* Plugin generated by AMXX-Studio */
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10. #include <amxmodx>
  11.  
  12.  
  13.  
  14. #include <amxmisc>
  15.  
  16.  
  17.  
  18. #include <zombieplague>
  19.  
  20.  
  21.  
  22.  
  23.  
  24.  
  25.  
  26. #define PLUGIN "ZM Informer"
  27.  
  28.  
  29.  
  30. #define VERSION "1.0"
  31.  
  32.  
  33.  
  34. #define AUTHOR "RED"
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. new Float:g_roundstart_time,Float:g_roundtime;
  43.  
  44.  
  45.  
  46. new g_playtime = 1
  47.  
  48.  
  49.  
  50. new pcvar_roundtime, pcvar_freezetime
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. new gMaxPlayers
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. public plugin_init() {
  67.  
  68.  
  69.  
  70. register_plugin(PLUGIN, VERSION, AUTHOR)
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78. register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
  79.  
  80.  
  81.  
  82. register_logevent("eRoundEnd", 2, "1=Round_End")
  83.  
  84.  
  85.  
  86. register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
  87.  
  88.  
  89.  
  90. register_logevent("eRoundStart", 2, "1=Round_Start")
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. gMaxPlayers = get_maxplayers()
  103.  
  104.  
  105.  
  106. pcvar_roundtime = get_cvar_pointer("mp_roundtime")
  107.  
  108.  
  109.  
  110. pcvar_freezetime = get_cvar_pointer("mp_freezetime")
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118. set_task(1.0, "get_informer", 1, "", 0, "b")
  119.  
  120.  
  121.  
  122. }
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130. public eRestart() {
  131.  
  132.  
  133.  
  134. g_playtime = 0
  135.  
  136.  
  137.  
  138. }
  139.  
  140.  
  141.  
  142. public eRoundEnd() {
  143.  
  144.  
  145.  
  146. g_playtime = 0
  147.  
  148.  
  149.  
  150. }
  151.  
  152.  
  153.  
  154. public eNewRound() {
  155.  
  156.  
  157.  
  158. g_playtime = 1
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166. new Float:freezetime = get_pcvar_float(pcvar_freezetime)
  167.  
  168.  
  169.  
  170. if(freezetime)
  171.  
  172.  
  173.  
  174. {
  175.  
  176.  
  177.  
  178. // g_newround_time = get_gametime()
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186. }
  187.  
  188.  
  189.  
  190. g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0
  191.  
  192.  
  193.  
  194. }
  195.  
  196.  
  197.  
  198. public eRoundStart() {
  199.  
  200.  
  201.  
  202. g_playtime = 2
  203.  
  204.  
  205.  
  206. g_roundstart_time = get_gametime()
  207.  
  208.  
  209.  
  210. }
  211.  
  212.  
  213.  
  214. public get_remaining_seconds() {
  215.  
  216.  
  217.  
  218. if(g_playtime==2){
  219.  
  220.  
  221.  
  222. return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil )
  223.  
  224.  
  225.  
  226. }else{
  227.  
  228.  
  229.  
  230. return 0
  231.  
  232.  
  233.  
  234. }
  235.  
  236.  
  237.  
  238. return PLUGIN_HANDLED
  239.  
  240. }
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248. public get_informer()
  249.  
  250.  
  251.  
  252. {
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260. new human, timer
  261.  
  262.  
  263.  
  264. timer = get_remaining_seconds()
  265.  
  266.  
  267.  
  268. human = zp_get_human_count()
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284. for( new id = 1; id <= gMaxPlayers; id++ )
  285.  
  286. {
  287.  
  288. if(is_user_alive(id))
  289.  
  290. {
  291.  
  292. if(zp_get_user_zombie(id))
  293.  
  294. {
  295.  
  296. if(human==0)
  297.  
  298. {
  299.  
  300. set_hudmessage(255, 0, 0, 0.01, 0.18, 1, 1.0, 1.0)
  301.  
  302. }else{
  303.  
  304. set_hudmessage(255, 0, 0, 0.01, 0.18, 0, 1.0, 1.0)
  305.  
  306. }
  307.  
  308.  
  309.  
  310. show_hudmessage(id, "[eb@ - Info] Zombi vagy^nElo emberek: %i", human)
  311.  
  312. }else{
  313.  
  314. if(timer<10){
  315.  
  316. set_hudmessage(0, 0, 255, 0.01, 0.18, 1, 1.0, 1.0)
  317.  
  318. }else{
  319.  
  320. set_hudmessage(0, 0, 255, 0.01, 0.18, 0, 1.0, 1.0)
  321.  
  322. }
  323.  
  324. show_hudmessage(id, "[eb@ - Info] Ember vagy^nKITARTAS!-> Fanmaradotido: %i", timer)
  325.  
  326.  
  327.  
  328. }
  329.  
  330.  
  331.  
  332. }
  333.  
  334.  
  335.  
  336. }
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344. }
  345.  
  346.  
  347.  
  348. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  349.  
  350.  
  351.  
  352. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
  353.  
  354.  
  355.  
  356. */
  357.  
  358.  
  359.  
  360.  

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.01.20. 16:25 
Offline
Félisten

Csatlakozott: 2012.01.07. 21:10
Hozzászólások: 850
Megköszönt másnak: 9 alkalommal
Megköszönték neki: 154 alkalommal
Azt akarod, hogy egy pluginban legyenek?

_________________
Megköszönni nem szégyen!
Csak kattints a Kép jelre. --->


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.01.20. 19:45 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
Igen szerintem, mert nekem a fuck604 felhasználó az z petrik ígérte meg hogy egyszerűsíti azt nem tudom hogy úgy értete hogy egybe írja, de igen egybe kéne írni a 3 plugint.
HunGamer írta:
Azt akarod, hogy egy pluginban legyenek?

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.01.20. 20:10 
Offline
Félisten

Csatlakozott: 2012.01.07. 21:10
Hozzászólások: 850
Megköszönt másnak: 9 alkalommal
Megköszönték neki: 154 alkalommal
Elvileg jó:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <zombieplague>
  4.  
  5. /*================================================================================
  6.  [Customizations]
  7. =================================================================================*/
  8.  
  9. #define HUD_ZM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  10. #define HUD_ZM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  11.  
  12. #define HUD_HM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  13. #define HUD_HM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  14.  
  15. #define HUD_NO_ONE 255, 255, 255, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  16.  
  17.  
  18. #define BONUS_ZM_WIN 6
  19. #define BONUS_ZM_FAIL 2
  20.  
  21.  
  22. #define BONUS_HM_WIN 6
  23. #define BONUS_HM_FAIL 2
  24.  
  25.  
  26. #define BONUS_NO_ONE 5
  27.  
  28. // Hudmessage tag
  29. new const hud_tag[] = "Jelenlegi mod: "
  30.  
  31. // Name for each Hudmessage Mode
  32. new const mode_names[][] =
  33. {
  34. "Varakozas az uj modra...", // No mode Started
  35. "Normal fertozeses", // Normal Infection, single round
  36. "Nemesis mod", // Nemesis Mode (zombie boss)
  37. "Tulelo mod", // Survivor Mode (human boss)
  38. "Raj mod", // Swarm round (no infections)
  39. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  40. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  41. "Ismeretlen mod" // An unofficial mode (edited/created/modified by user)
  42. }
  43.  
  44. // RGB Colors for each Hudmessage Mode
  45. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  46. new const rgb_hud_colors[sizeof(mode_names)][3] =
  47. {
  48. // R G B
  49. {255, 255, 255}, // No mode Started
  50. {0, 255, 0}, // Normal Infection, single round
  51. {255, 0, 0}, // Nemesis Mode (zombie boss)
  52. {0, 0, 255}, // Survivor Mode (human boss)
  53. {255, 255, 0}, // Swarm round (no infections)
  54. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  55. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  56. {255, 255, 255} // An unofficial mode (edited/created/modified by user)
  57. }
  58.  
  59. // X Hudmessage Position ( --- )
  60. const Float:HUD_MODE_X = 0.65
  61.  
  62. // Y Hudmessage Position ( ||| )
  63. const Float:HUD_MODE_Y = 0.2
  64.  
  65. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  66. const Float:START_TIME = 3.0
  67.  
  68. /*================================================================================
  69.  Customization ends here! Yes, that's it. Editing anything beyond
  70.  here is not officially supported. Proceed at your own risk...
  71. =================================================================================*/
  72.  
  73. // Variables
  74. new g_SyncHud, g_Mode
  75.  
  76. // Cvar pointers
  77. new cvar_enable, cvar_central
  78.  
  79. new g_maxplayers
  80.  
  81. new Float:g_roundstart_time,Float:g_roundtime;
  82.  
  83. new g_playtime = 1
  84.  
  85. new pcvar_roundtime, pcvar_freezetime
  86.  
  87. new gMaxPlayers
  88.  
  89. public plugin_init()
  90. {
  91. // Plugin Info
  92. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  93.  
  94. // Round Start Event
  95. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  96.  
  97. // Enable Cvar
  98. cvar_enable = register_cvar("zp_display_mode", "1")
  99.  
  100. // Server Cvar
  101. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  102.  
  103. // Variables
  104. g_SyncHud = CreateHudSyncObj()
  105.  
  106. // Getting "zp_on" cvar
  107. if(cvar_exists("zp_on"))
  108. cvar_central = get_cvar_pointer("zp_on")
  109.  
  110. // If Zombie Plague is not running (bugfix)
  111. if(!get_pcvar_num(cvar_central))
  112. pause("a")
  113.  
  114. register_dictionary ( "zp_bonus_ammopack.txt" )
  115.  
  116. g_maxplayers = get_maxplayers ( )
  117.  
  118. register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
  119.  
  120. register_logevent("eRoundEnd", 2, "1=Round_End")
  121.  
  122. register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
  123.  
  124. register_logevent("eRoundStart", 2, "1=Round_Start")
  125.  
  126. gMaxPlayers = get_maxplayers()
  127.  
  128. pcvar_roundtime = get_cvar_pointer("mp_roundtime")
  129.  
  130. pcvar_freezetime = get_cvar_pointer("mp_freezetime")
  131.  
  132. set_task(1.0, "get_informer", 1, "", 0, "b")
  133. }
  134.  
  135. public client_putinserver(id)
  136. {
  137. // Setting Hud
  138. set_task(START_TIME, "mode_hud", id, _, _, "b")
  139. }
  140.  
  141. public event_RoundStart()
  142. {
  143. // Update var (no mode started / in delay)
  144. g_Mode = 0
  145. }
  146.  
  147. public mode_hud(id)
  148. {
  149. // If the Cvar isn't enabled
  150. if(!get_pcvar_num(cvar_enable))
  151. return;
  152.  
  153. // Hud Options
  154. 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)
  155.  
  156. // Now the hud appears
  157. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  158. }
  159.  
  160. public zp_round_started(mode, id)
  161. {
  162. // Update var with Mode num
  163. g_Mode = mode
  164.  
  165. // An unofficial mode
  166. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  167. g_Mode = sizeof(mode_names) - 1
  168. }
  169.  
  170. public zp_round_ended ( Team ) {
  171.  
  172. if ( Team == WIN_ZOMBIES )
  173. {
  174. for ( new i = 1; i <= g_maxplayers ; i++ )
  175. {
  176. if ( ! is_user_connected ( i ) ) continue;
  177.  
  178. if ( zp_get_user_zombie ( i ) || zp_get_user_nemesis ( i ) )
  179. {
  180. set_hudmessage ( HUD_ZM_WIN )
  181. show_hudmessage(i, "%L", LANG_PLAYER, "WIN" , BONUS_ZM_WIN)
  182.  
  183. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_ZM_WIN );
  184. }
  185. else
  186. {
  187. set_hudmessage( HUD_ZM_FAIL )
  188. show_hudmessage(i, "%L", LANG_PLAYER, "FAIL" , BONUS_ZM_FAIL)
  189.  
  190. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_ZM_FAIL );
  191. }
  192. }
  193. }
  194. else if ( Team == WIN_HUMANS)
  195. {
  196. for ( new i = 1; i <= g_maxplayers ; i++ )
  197. {
  198. if ( ! is_user_connected ( i ) ) continue;
  199.  
  200. if ( zp_get_user_human ( i ) || zp_get_user_survivor ( i ) )
  201. {
  202. set_hudmessage( HUD_HM_WIN )
  203. show_hudmessage( i, "%L", LANG_PLAYER, "WIN" , BONUS_HM_WIN)
  204.  
  205. zp_set_user_ammo_packs( i, zp_get_user_ammo_packs( i ) + BONUS_HM_WIN );
  206. }
  207. else
  208. {
  209. set_hudmessage( HUD_HM_FAIL )
  210. show_hudmessage ( i , "%L", LANG_PLAYER, "FAIL" , BONUS_HM_FAIL)
  211.  
  212. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_HM_FAIL ) ;
  213. }
  214. }
  215. }
  216. else
  217. {
  218. for ( new i = 1; i <= g_maxplayers ; i++ )
  219. {
  220. if ( ! is_user_connected ( i ) ) continue;
  221.  
  222. set_hudmessage ( HUD_NO_ONE )
  223. show_hudmessage ( i , "%L", LANG_PLAYER, "NO_ONE" , BONUS_NO_ONE )
  224.  
  225. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_NO_ONE ) ;
  226. }
  227. }
  228. }
  229.  
  230. stock zp_get_user_human ( id )
  231. return ( ! zp_get_user_survivor ( id ) && ! zp_get_user_nemesis ( id ) && ! zp_get_user_zombie ( id ) )
  232.  
  233. public eRestart() {
  234. g_playtime = 0
  235. }
  236.  
  237. public eRoundEnd() {
  238. g_playtime = 0
  239. }
  240.  
  241. public eNewRound() {
  242. g_playtime = 1
  243.  
  244. new Float:freezetime = get_pcvar_float(pcvar_freezetime)
  245.  
  246. if(freezetime)
  247. {
  248. // g_newround_time = get_gametime()
  249. }
  250.  
  251. g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0
  252. }
  253.  
  254. public eRoundStart() {
  255. g_playtime = 2
  256.  
  257. g_roundstart_time = get_gametime()
  258. }
  259.  
  260. public get_remaining_seconds() {
  261.  
  262. if(g_playtime==2){
  263. return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil )
  264. }else{
  265. return 0
  266. }
  267. return PLUGIN_HANDLED
  268. }
  269.  
  270. public get_informer()
  271. {
  272. new human, timer
  273.  
  274. timer = get_remaining_seconds()
  275.  
  276. human = zp_get_human_count()
  277.  
  278. for( new id = 1; id <= gMaxPlayers; id++ )
  279. {
  280. if(is_user_alive(id))
  281. {
  282. if(zp_get_user_zombie(id))
  283. {
  284. if(human==0)
  285. {
  286. set_hudmessage(255, 0, 0, 0.01, 0.18, 1, 1.0, 1.0)
  287. }else{
  288. set_hudmessage(255, 0, 0, 0.01, 0.18, 0, 1.0, 1.0)
  289. }
  290.  
  291. show_hudmessage(id, "[eb@ - Info] Zombi vagy^nElo emberek: %i", human)
  292. }else{
  293. if(timer<10){
  294. set_hudmessage(0, 0, 255, 0.01, 0.18, 1, 1.0, 1.0)
  295. }else{
  296. set_hudmessage(0, 0, 255, 0.01, 0.18, 0, 1.0, 1.0)
  297. }
  298. show_hudmessage(id, "[eb@ - Info] Ember vagy^nKITARTAS!-> Fanmaradotido: %i", timer)
  299. }
  300. }
  301. }
  302. }
  303.  

_________________
Megköszönni nem szégyen!
Csak kattints a Kép jelre. --->

Ők köszönték meg HunGamer nek ezt a hozzászólást: norbee.16 (2013.01.20. 23:03)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.01.20. 23:11 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
kösz :-) majd tesztelem és írók hogy mi van :-)

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.02.24. 14:46 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
Hungamer még ezeket hozá írnád?

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

SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2.  
  3. #include <amxmisc>
  4.  
  5. #include <zombieplague>
  6.  
  7.  
  8.  
  9. #define PLUGIN "[ZP] Szamok"
  10.  
  11. #define VERSION "1.0"
  12.  
  13. #define AUTHOR "Mr.Apple"
  14.  
  15.  
  16.  
  17. new const speak[ 10 ][] = {
  18.  
  19. "ebasound56/one.wav",
  20.  
  21. "ebasound56/two.wav",
  22.  
  23. "ebasound56/three.wav",
  24.  
  25. "ebasound56/four.wav",
  26.  
  27. "ebasound56/five.wav",
  28.  
  29. "ebasound56/six.wav",
  30.  
  31. "ebasound56/seven.wav",
  32.  
  33. "ebasound56/eight.wav",
  34.  
  35. "ebasound56/nine.wav",
  36.  
  37. "ebasound56/ten.wav"
  38.  
  39. }
  40.  
  41.  
  42.  
  43. new countdown
  44.  
  45.  
  46.  
  47. public plugin_init() {
  48.  
  49. register_plugin(PLUGIN, VERSION, AUTHOR)
  50.  
  51. register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
  52.  
  53. }
  54.  
  55.  
  56.  
  57. public plugin_precache() {
  58.  
  59. precache_sound( "ebasound56/ten.wav" )
  60.  
  61. precache_sound( "ebasound56/nine.wav" )
  62.  
  63. precache_sound( "ebasound56/eight.wav" )
  64.  
  65. precache_sound( "ebasound56/seven.wav" )
  66.  
  67. precache_sound( "ebasound56/six.wav" )
  68.  
  69. precache_sound( "ebasound56/five.wav" )
  70.  
  71. precache_sound( "ebasound56/four.wav" )
  72.  
  73. precache_sound( "ebasound56/three.wav" )
  74.  
  75. precache_sound( "ebasound56/two.wav" )
  76.  
  77. precache_sound( "ebasound56/one.wav" )
  78.  
  79. }
  80.  
  81.  
  82.  
  83. public event_round_start() {
  84.  
  85. set_task(3.0, "zombie_countdown")
  86.  
  87. countdown = 9
  88.  
  89. }
  90.  
  91.  
  92.  
  93. public zombie_countdown() {
  94.  
  95. emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM )
  96.  
  97.  
  98.  
  99. set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
  100.  
  101. show_hudmessage(0, "Fertozesig hatravan: %i masodperc!", countdown);
  102.  
  103. countdown--
  104.  
  105.  
  106.  
  107. if(countdown > 0) {
  108.  
  109. set_task(1.0, "zombie_countdown")
  110.  
  111. }
  112.  
  113. }

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.02.24. 18:41 
Offline
Félisten

Csatlakozott: 2012.01.07. 21:10
Hozzászólások: 850
Megköszönt másnak: 9 alkalommal
Megköszönték neki: 154 alkalommal
Try:
SMA Forráskód: [ Mindet kijelol ]
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <zombieplague>
  4.  
  5. /*================================================================================
  6.  [Customizations]
  7. =================================================================================*/
  8.  
  9. #define HUD_ZM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  10. #define HUD_ZM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  11.  
  12. #define HUD_HM_WIN 0, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  13. #define HUD_HM_FAIL 255, 255, 0, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  14.  
  15. #define HUD_NO_ONE 255, 255, 255, 0.01, 0.25, 1, 0.0, 5.0, 1.0, 1.0, -1
  16.  
  17.  
  18. #define BONUS_ZM_WIN 6
  19. #define BONUS_ZM_FAIL 2
  20.  
  21.  
  22. #define BONUS_HM_WIN 6
  23. #define BONUS_HM_FAIL 2
  24.  
  25.  
  26. #define BONUS_NO_ONE 5
  27.  
  28. // Hudmessage tag
  29. new const hud_tag[] = "Jelenlegi mod: "
  30.  
  31. // Name for each Hudmessage Mode
  32. new const mode_names[][] =
  33. {
  34. "Varakozas az uj modra...", // No mode Started
  35. "Normal fertozeses", // Normal Infection, single round
  36. "Nemesis mod", // Nemesis Mode (zombie boss)
  37. "Tulelo mod", // Survivor Mode (human boss)
  38. "Raj mod", // Swarm round (no infections)
  39. "Tobbszoros fertozeses mod", // Multiple Infection (like single round, but, more than 1 zombie)
  40. "Pestis mod", // Plague round (nemesis & zombies vs. survivors & humans)
  41. "Ismeretlen mod" // An unofficial mode (edited/created/modified by user)
  42. }
  43.  
  44. // RGB Colors for each Hudmessage Mode
  45. // See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
  46. new const rgb_hud_colors[sizeof(mode_names)][3] =
  47. {
  48. // R G B
  49. {255, 255, 255}, // No mode Started
  50. {0, 255, 0}, // Normal Infection, single round
  51. {255, 0, 0}, // Nemesis Mode (zombie boss)
  52. {0, 0, 255}, // Survivor Mode (human boss)
  53. {255, 255, 0}, // Swarm round (no infections)
  54. {0, 255, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  55. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  56. {255, 255, 255} // An unofficial mode (edited/created/modified by user)
  57. }
  58.  
  59. // X Hudmessage Position ( --- )
  60. const Float:HUD_MODE_X = 0.65
  61.  
  62. // Y Hudmessage Position ( ||| )
  63. const Float:HUD_MODE_Y = 0.2
  64.  
  65. // Time at which the Hudmessage is displayed. (when user is puted into the Server)
  66. const Float:START_TIME = 3.0
  67.  
  68. /*================================================================================
  69.  Customization ends here! Yes, that's it. Editing anything beyond
  70.  here is not officially supported. Proceed at your own risk...
  71. =================================================================================*/
  72.  
  73. // Variables
  74. new g_SyncHud, g_Mode
  75.  
  76. // Cvar pointers
  77. new cvar_enable, cvar_central
  78.  
  79. new g_maxplayers
  80.  
  81. new Float:g_roundstart_time,Float:g_roundtime;
  82.  
  83. new g_playtime = 1
  84.  
  85. new pcvar_roundtime, pcvar_freezetime
  86.  
  87. new gMaxPlayers
  88.  
  89. new g_status_sync
  90.  
  91. new const speak[ 10 ][] = {
  92.  
  93. "ebasound56/one.wav",
  94.  
  95. "ebasound56/two.wav",
  96.  
  97. "ebasound56/three.wav",
  98.  
  99. "ebasound56/four.wav",
  100.  
  101. "ebasound56/five.wav",
  102.  
  103. "ebasound56/six.wav",
  104.  
  105. "ebasound56/seven.wav",
  106.  
  107. "ebasound56/eight.wav",
  108.  
  109. "ebasound56/nine.wav",
  110.  
  111. "ebasound56/ten.wav"
  112. }
  113.  
  114. new countdown
  115.  
  116. public plugin_init()
  117. {
  118. // Plugin Info
  119. register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  120.  
  121. // Round Start Event
  122. register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  123. register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
  124.  
  125. // Enable Cvar
  126. cvar_enable = register_cvar("zp_display_mode", "1")
  127.  
  128. // Server Cvar
  129. register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  130.  
  131. // Variables
  132. g_SyncHud = CreateHudSyncObj()
  133.  
  134. // Getting "zp_on" cvar
  135. if(cvar_exists("zp_on"))
  136. cvar_central = get_cvar_pointer("zp_on")
  137.  
  138. // If Zombie Plague is not running (bugfix)
  139. if(!get_pcvar_num(cvar_central))
  140. pause("a")
  141.  
  142. register_dictionary ( "zp_bonus_ammopack.txt" )
  143.  
  144. g_maxplayers = get_maxplayers ( )
  145.  
  146. register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
  147.  
  148. register_logevent("eRoundEnd", 2, "1=Round_End")
  149.  
  150. register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
  151.  
  152. register_logevent("eRoundStart", 2, "1=Round_Start")
  153.  
  154. gMaxPlayers = get_maxplayers()
  155.  
  156. pcvar_roundtime = get_cvar_pointer("mp_roundtime")
  157.  
  158. pcvar_freezetime = get_cvar_pointer("mp_freezetime")
  159.  
  160. set_task(1.0, "get_informer", 1, "", 0, "b")
  161.  
  162. register_event("StatusValue", "showStatus", "be", "1=2", "2!0")
  163. register_event("StatusValue", "hideStatus", "be", "1=1", "2=0")
  164. register_dictionary("zp_aim_info.txt")
  165. g_status_sync = CreateHudSyncObj()
  166. }
  167. public plugin_precache() {
  168.  
  169. precache_sound( "ebasound56/ten.wav" )
  170.  
  171. precache_sound( "ebasound56/nine.wav" )
  172.  
  173. precache_sound( "ebasound56/eight.wav" )
  174.  
  175. precache_sound( "ebasound56/seven.wav" )
  176.  
  177. precache_sound( "ebasound56/six.wav" )
  178.  
  179. precache_sound( "ebasound56/five.wav" )
  180.  
  181. precache_sound( "ebasound56/four.wav" )
  182.  
  183. precache_sound( "ebasound56/three.wav" )
  184.  
  185. precache_sound( "ebasound56/two.wav" )
  186.  
  187. precache_sound( "ebasound56/one.wav" )
  188. }
  189. public client_putinserver(id)
  190. {
  191. // Setting Hud
  192. set_task(START_TIME, "mode_hud", id, _, _, "b")
  193. }
  194.  
  195. public event_RoundStart()
  196. {
  197. // Update var (no mode started / in delay)
  198. g_Mode = 0
  199. set_task(3.0, "zombie_countdown")
  200. countdown = 9
  201. }
  202.  
  203. public mode_hud(id)
  204. {
  205. // If the Cvar isn't enabled
  206. if(!get_pcvar_num(cvar_enable))
  207. return;
  208.  
  209. // Hud Options
  210. 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)
  211.  
  212. // Now the hud appears
  213. ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
  214. }
  215.  
  216. public zp_round_started(mode, id)
  217. {
  218. // Update var with Mode num
  219. g_Mode = mode
  220.  
  221. // An unofficial mode
  222. if(!(1 <= mode < (sizeof(mode_names) - 1)))
  223. g_Mode = sizeof(mode_names) - 1
  224. }
  225.  
  226. public zp_round_ended ( Team ) {
  227.  
  228. if ( Team == WIN_ZOMBIES )
  229. {
  230. for ( new i = 1; i <= g_maxplayers ; i++ )
  231. {
  232. if ( ! is_user_connected ( i ) ) continue;
  233.  
  234. if ( zp_get_user_zombie ( i ) || zp_get_user_nemesis ( i ) )
  235. {
  236. set_hudmessage ( HUD_ZM_WIN )
  237. show_hudmessage(i, "%L", LANG_PLAYER, "WIN" , BONUS_ZM_WIN)
  238.  
  239. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_ZM_WIN );
  240. }
  241. else
  242. {
  243. set_hudmessage( HUD_ZM_FAIL )
  244. show_hudmessage(i, "%L", LANG_PLAYER, "FAIL" , BONUS_ZM_FAIL)
  245.  
  246. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_ZM_FAIL );
  247. }
  248. }
  249. }
  250. else if ( Team == WIN_HUMANS)
  251. {
  252. for ( new i = 1; i <= g_maxplayers ; i++ )
  253. {
  254. if ( ! is_user_connected ( i ) ) continue;
  255.  
  256. if ( zp_get_user_human ( i ) || zp_get_user_survivor ( i ) )
  257. {
  258. set_hudmessage( HUD_HM_WIN )
  259. show_hudmessage( i, "%L", LANG_PLAYER, "WIN" , BONUS_HM_WIN)
  260.  
  261. zp_set_user_ammo_packs( i, zp_get_user_ammo_packs( i ) + BONUS_HM_WIN );
  262. }
  263. else
  264. {
  265. set_hudmessage( HUD_HM_FAIL )
  266. show_hudmessage ( i , "%L", LANG_PLAYER, "FAIL" , BONUS_HM_FAIL)
  267.  
  268. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) - BONUS_HM_FAIL ) ;
  269. }
  270. }
  271. }
  272. else
  273. {
  274. for ( new i = 1; i <= g_maxplayers ; i++ )
  275. {
  276. if ( ! is_user_connected ( i ) ) continue;
  277.  
  278. set_hudmessage ( HUD_NO_ONE )
  279. show_hudmessage ( i , "%L", LANG_PLAYER, "NO_ONE" , BONUS_NO_ONE )
  280.  
  281. zp_set_user_ammo_packs ( i , zp_get_user_ammo_packs ( i ) + BONUS_NO_ONE ) ;
  282. }
  283. }
  284. }
  285.  
  286. stock zp_get_user_human ( id )
  287. return ( ! zp_get_user_survivor ( id ) && ! zp_get_user_nemesis ( id ) && ! zp_get_user_zombie ( id ) )
  288.  
  289. public eRestart() {
  290. g_playtime = 0
  291. }
  292.  
  293. public eRoundEnd() {
  294. g_playtime = 0
  295. }
  296.  
  297. public eNewRound() {
  298. g_playtime = 1
  299.  
  300. new Float:freezetime = get_pcvar_float(pcvar_freezetime)
  301.  
  302. if(freezetime)
  303. {
  304. // g_newround_time = get_gametime()
  305. }
  306.  
  307. g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0
  308. }
  309.  
  310. public eRoundStart() {
  311. g_playtime = 2
  312.  
  313. g_roundstart_time = get_gametime()
  314. }
  315.  
  316. public get_remaining_seconds() {
  317.  
  318. if(g_playtime==2){
  319. return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil )
  320. }else{
  321. return 0
  322. }
  323. return PLUGIN_HANDLED
  324. }
  325.  
  326. public get_informer()
  327. {
  328. new human, timer
  329.  
  330. timer = get_remaining_seconds()
  331.  
  332. human = zp_get_human_count()
  333.  
  334. for( new id = 1; id <= gMaxPlayers; id++ )
  335. {
  336. if(is_user_alive(id))
  337. {
  338. if(zp_get_user_zombie(id))
  339. {
  340. if(human==0)
  341. {
  342. set_hudmessage(255, 0, 0, 0.01, 0.18, 1, 1.0, 1.0)
  343. }else{
  344. set_hudmessage(255, 0, 0, 0.01, 0.18, 0, 1.0, 1.0)
  345. }
  346.  
  347. show_hudmessage(id, "[eb@ - Info] Zombi vagy^nElo emberek: %i", human)
  348. }else{
  349. if(timer<10){
  350. set_hudmessage(0, 0, 255, 0.01, 0.18, 1, 1.0, 1.0)
  351. }else{
  352. set_hudmessage(0, 0, 255, 0.01, 0.18, 0, 1.0, 1.0)
  353. }
  354. show_hudmessage(id, "[eb@ - Info] Ember vagy^nKITARTAS!-> Fanmaradotido: %i", timer)
  355. }
  356. }
  357. }
  358. }
  359. public showStatus(id)
  360. {
  361. if(!is_user_bot(id) && is_user_connected(id))
  362. {
  363. new name[32], pid = read_data(2)
  364.  
  365. get_user_name(pid, name, 31)
  366. new color1 = 0, color2 = 0
  367.  
  368. new team1 = zp_get_user_zombie(id), team2 = zp_get_user_zombie(pid)
  369.  
  370. if (team2 == 1)
  371. color1 = 255
  372. else
  373. color2 = 255
  374.  
  375. if (team1 == team2) // friend
  376. {
  377. set_hudmessage(color1, 50, color2, -1.0, 0.60, 1, 0.01, 3.0, 0.01, 0.01, -1)
  378. 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))
  379. }
  380. }
  381. }
  382. public hideStatus(id)
  383. {
  384. ClearSyncHud(id, g_status_sync)
  385. }
  386. public zombie_countdown() {
  387. emit_sound( 0, CHAN_VOICE, speak[ countdown ], 1.0, ATTN_NORM, 0, PITCH_NORM )
  388.  
  389. set_hudmessage(179, 0, 0, -1.0, 0.28, 2, 0.02, 1.0, 0.01, 0.1, 10);
  390. show_hudmessage(0, "Fertozesig hatravan: %i masodperc!", countdown);
  391.  
  392. countdown--
  393.  
  394. if(countdown > 0) {
  395. set_task(1.0, "zombie_countdown")
  396. }
  397. }
  398.  

_________________
Megköszönni nem szégyen!
Csak kattints a Kép jelre. --->

Ők köszönték meg HunGamer nek ezt a hozzászólást: norbee.16 (2013.02.24. 18:50)
  Népszerűség: 2.27%


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Hudok egyszerüsitése
HozzászólásElküldve: 2013.03.03. 13:39 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4280
Megköszönt másnak: 218 alkalommal
Megköszönték neki: 285 alkalommal
Ez az utolsó nem jó.

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 8 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 73 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole