hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.28. 04:22



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: 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  [ 2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Jelenlegi mód kiiró
HozzászólásElküldve: 2013.07.05. 11:52 
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
Valaki javítaná ezt

51d6974439fe1.sma(56) : error 029: invalid expression, assumed zero
51d6974439fe1.sma(56 -- 60) : error 008: must be a constant expression; assumed zero
51d6974439fe1.sma(71) : error 029: invalid expression, assumed zero
51d6974439fe1.sma(71 -- 74) : error 008: must be a constant expression; assumed zero


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 Fertozes]", // 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 Fertozes]", // Multiple Infection (like single round, but, more than 1 zombie)
  54. "[Pestis Mode]", // Plague round (nemesis & zombies vs. survivors & humans)
  55. "[Armageddon Mode]", // LNJ round (nemesis & zombies vs. survivors & humans)
  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, 20, 147}, // No mode Started
  64. {0, 100, 0}, // Normal Infection, single round
  65. {255, 0, 0}, // Nemesis Mode (zombie boss)
  66. {0, 191, 255}, // Survivor Mode (human boss)
  67. {255, 255, 0}, // Swarm round (no infections)
  68. {0, 69, 0}, // Multiple Infection (like single round, but, more than 1 zombie)
  69. {255, 0, 0}, // Plague round (nemesis & zombies vs. survivors & humans)
  70. {255, 0, 0}, // LNJ round (nemesis & zombies vs. survivors & humans)
  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.7", "meTaLiCroSS & SeniorRamos")
  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.  

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: Jelenlegi mód kiiró
HozzászólásElküldve: 2013.07.05. 12:27 
Offline
Őskövület
Avatar

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

_________________
Kép

Ők köszönték meg CrB nek ezt a hozzászólást: Tomos (2013.07.05. 12:33)
  Népszerűség: 2.27%


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


Ki van itt

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