hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.06.17. 06:43



Jelenlévő felhasználók

Jelenleg 362 felhasználó van jelen :: 2 regisztrált, 0 rejtett és 360 vendég

A legtöbb felhasználó (2761 fő) 2025.01.09. 20:06-kor tartózkodott itt.

Regisztrált felhasználók: Bing [Bot], Google [Bot]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  [1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Zombi Pestis 4.3 + Új Mód 1.5
HozzászólásElküldve:2013.03.24. 14:44 
Offline
Félisten

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

_________________
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  [1 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 9 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