hlmod.hu

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



Jelenlévő felhasználók

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

A legtöbb felhasználó (2761 fő) 2025.01.09. 20:06-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  [1 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: Összerakás
HozzászólásElküldve:2012.07.02. 14:35 
Offline
Őstag
Avatar

Csatlakozott:2011.11.15. 16:29
Hozzászólások:1142
Megköszönt másnak: 8 alkalommal
Megköszönték neki: 24 alkalommal
1:

Kód:
  1. /* Plugin generated by AMXX-Studio */

  2.  

  3. #include <amxmodx>

  4. #include <amxmisc>

  5. #include <zombieplague>

  6.  

  7. #define PLUGIN "ZM Informer"

  8. #define VERSION "1.0"

  9. #define AUTHOR "RED"

  10.  

  11. new Float:g_newround_time,Float:g_roundstart_time,Float:g_freezetime,Float:g_roundtime;

  12. new g_playtime = 1

  13. new pcvar_roundtime, pcvar_freezetime

  14.  

  15. new gMaxPlayers

  16.  

  17. public plugin_init() {

  18.         register_plugin(PLUGIN, VERSION, AUTHOR)

  19.        

  20.         register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")

  21.         register_logevent("eRoundEnd", 2, "1=Round_End")

  22.         register_event("HLTV", "eNewRound", "a", "1=0", "2=0")

  23.         register_logevent("eRoundStart", 2, "1=Round_Start")

  24.    

  25.                

  26.         gMaxPlayers = get_maxplayers()

  27.         pcvar_roundtime = get_cvar_pointer("mp_roundtime")

  28.         pcvar_freezetime = get_cvar_pointer("mp_freezetime")

  29.        

  30.         set_task(1.0, "get_informer", 1, "", 0, "b")

  31. }

  32.  

  33. public eRestart() {

  34.         g_playtime = 0

  35. }

  36. public eRoundEnd() {

  37.         g_playtime = 0

  38. }

  39. public eNewRound() {

  40.         g_playtime = 1

  41.  

  42.         new Float:freezetime = get_pcvar_float(pcvar_freezetime)

  43.         if(freezetime)

  44.         {

  45.                 g_newround_time = get_gametime()

  46.                 g_freezetime = freezetime

  47.         }

  48.         g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0

  49. }

  50. public eRoundStart() {

  51.         g_playtime = 2

  52.         g_roundstart_time = get_gametime()

  53. }

  54. public get_remaining_seconds() {

  55.         if(g_playtime==2){

  56.         return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil )

  57.         }else{

  58.         return 0

  59. }

  60. }

  61.  

  62. public get_informer()

  63. {

  64.  

  65.                 new human, timer

  66.                 timer = get_remaining_seconds()

  67.                 human = zp_get_human_count()

  68.                

  69.  

  70.  

  71.                 for( new id = 1; id <= gMaxPlayers; id++ )

  72.                 {

  73.                         if(is_user_alive(id))

  74.                         {

  75.                         if(zp_get_user_zombie(id))

  76.                         {                              

  77.                                                         if(human==0){

  78.                                                         set_hudmessage(255, 0, 0, 0.01, 0.18, 1, 1.0, 1.0)

  79.                                                         }else{

  80.                                                         set_hudmessage(255, 0, 0, 0.01, 0.18, 0, 1.0, 1.0)

  81.                                                         }

  82.                                         show_hudmessage(id, "You are zombie^nAlive humans: %i", human)

  83.                         }else{                 

  84.                                                         if(timer<10){

  85.                                                         set_hudmessage(0, 0, 255, 0.01, 0.18, 1, 1.0, 1.0)

  86.                                                         }else{

  87.                                                         set_hudmessage(0, 0, 255, 0.01, 0.18, 0, 1.0, 1.0)

  88.                                                         }              

  89.                                         show_hudmessage(id, "You are human^nSurvive: %i", timer)

  90.                                         }

  91.                                 }

  92.                         }

  93.  

  94. }

  95. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE

  96. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }

  97. */

  98.  


2:

Kód:
  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. */


Ezt a két plugint összebírná nekem valaki rakni úgy , hogy radar alatt legyen így:

Jelenlegi mód : Normál (Stb.)
Ide alá meg az első plugint írja! ( Amilyen mód van olyan szinu legyen minkettő HUD )
Köszönöm:)

_________________
[url=http://www.gametracker.com/server_info/188.227.227.114:27286/][img]http://cache.www.gametracker.com/server_info/188.227.227.114:27286/b_350_20_323957_202743_F19A15_111111.png[/img][/url]


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 6 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