| 1:
 
 
 Kód: /* Plugin generated by AMXX-Studio */
  
 #include <amxmodx>
 #include <amxmisc>
 #include <zombieplague>
  
 #define PLUGIN "ZM Informer"
 #define VERSION "1.0"
 #define AUTHOR "RED"
  
 new Float:g_newround_time,Float:g_roundstart_time,Float:g_freezetime,Float:g_roundtime;
 new g_playtime = 1
 new pcvar_roundtime, pcvar_freezetime
  
 new gMaxPlayers
  
 public plugin_init() {
         register_plugin(PLUGIN, VERSION, AUTHOR)
         
         register_event("TextMsg", "eRestart", "a", "2&#Game_C", "2&#Game_w")
         register_logevent("eRoundEnd", 2, "1=Round_End")
         register_event("HLTV", "eNewRound", "a", "1=0", "2=0")
         register_logevent("eRoundStart", 2, "1=Round_Start")
    
                 
         gMaxPlayers = get_maxplayers()
         pcvar_roundtime = get_cvar_pointer("mp_roundtime")
         pcvar_freezetime = get_cvar_pointer("mp_freezetime")
         
         set_task(1.0, "get_informer", 1, "", 0, "b")
 }
  
 public eRestart() {
         g_playtime = 0
 }
 public eRoundEnd() {
         g_playtime = 0
 }
 public eNewRound() {
         g_playtime = 1
  
         new Float:freezetime = get_pcvar_float(pcvar_freezetime)
         if(freezetime)
         {
                 g_newround_time = get_gametime()
                 g_freezetime = freezetime
         }
         g_roundtime = floatmul(get_pcvar_float(pcvar_roundtime), 60.0) - 1.0
 }
 public eRoundStart() {
         g_playtime = 2
         g_roundstart_time = get_gametime()
 }
 public get_remaining_seconds() {
         if(g_playtime==2){
         return floatround( g_roundtime - ( get_gametime() - g_roundstart_time ) , floatround_ceil )
         }else{
         return 0
 }
 }
  
 public get_informer()
 {
  
                 new human, timer
                 timer = get_remaining_seconds()
                 human = zp_get_human_count()
                 
  
  
                 for( new id = 1; id <= gMaxPlayers; id++ )
                 {
                         if(is_user_alive(id))
                         {
                         if(zp_get_user_zombie(id))
                         {                               
                                                         if(human==0){
                                                         set_hudmessage(255, 0, 0, 0.01, 0.18, 1, 1.0, 1.0)
                                                         }else{
                                                         set_hudmessage(255, 0, 0, 0.01, 0.18, 0, 1.0, 1.0)
                                                         }
                                         show_hudmessage(id, "You are zombie^nAlive humans: %i", human)
                         }else{                  
                                                         if(timer<10){
                                                         set_hudmessage(0, 0, 255, 0.01, 0.18, 1, 1.0, 1.0)
                                                         }else{
                                                         set_hudmessage(0, 0, 255, 0.01, 0.18, 0, 1.0, 1.0)
                                                         }               
                                         show_hudmessage(id, "You are human^nSurvive: %i", timer)
                                         }
                                 }
                         }
  
 }
 /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
 *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1049\\ f0\\ fs16 \n\\ par }
 */
  
 
 2:
 
 
 Kód: /*================================================================================
  
         [[ZP] Addon: Display the Current Mode
         Copyright (C) 2009 by meTaLiCroSS, Vi�a del Mar, Chile
  
         This program is free software: you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
         the Free Software Foundation, either version 3 of the License, or
         (at your option) any later version.
  
         This program is distributed in the hope that it will be useful,
         but WITHOUT ANY WARRANTY; without even the implied warranty of
         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
         GNU General Public License for more details.
  
         You should have received a copy of the GNU General Public License
         along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
         In addition, as a special exception, the author gives permission to
         link the code of this program with the Half-Life Game Engine ("HL
         Engine") and Modified Game Libraries ("MODs") developed by Valve,
         L.L.C ("Valve"). You must obey the GNU General Public License in all
         respects for all of the code used other than the HL Engine and MODs
         from Valve. If you modify this file, you may extend this exception
         to your version of the file, but you are not obligated to do so. If
         you do not wish to do so, delete this exception statement from your
         version.
  
         ** Credits:
  
         - Exolent[jNr]: Big plugin optimization
  
 =================================================================================*/
  
 #include <amxmodx>
 #include <zombieplague>
  
 /*================================================================================
  [Customizations]
 =================================================================================*/
  
 // Hudmessage tag
 new const hud_tag[] = "Jelenlegi mod: "
  
 // Name for each Hudmessage Mode
 new const mode_names[][] =
 {
         "Varakozas az uj modra...",     // No mode Started
         "Normal fertozeses",            // Normal Infection, single round
         "Nemesis mod",                  // Nemesis Mode (zombie boss)
         "Tulelo mod",           // Survivor Mode (human boss)
         "Raj mod",                      // Swarm round (no infections)
         "Tobbszoros fertozeses mod",            // Multiple Infection (like single round, but, more than 1 zombie)
         "Pestis mod",                   // Plague round (nemesis & zombies vs. survivors & humans)
         "Ismeretlen mod"                // An unofficial mode (edited/created/modified by user)
 }
  
 // RGB Colors for each Hudmessage Mode
 
 new const rgb_hud_colors[sizeof(mode_names)][3] =
 {
 //      R       G       B
         {255,   255,    255},           // No mode Started
         {0,     255,    0},             // Normal Infection, single round
         {255,   0,      0},             // Nemesis Mode (zombie boss)
         {0,     0,      255},           // Survivor Mode (human boss)
         {255,   255,    0},             // Swarm round (no infections)
         {0,     255,    0},             // Multiple Infection (like single round, but, more than 1 zombie)
         {255,   0,      0},             // Plague round (nemesis & zombies vs. survivors & humans)
         {255,   255,    255}            // An unofficial mode (edited/created/modified by user)
 }
  
 // X Hudmessage Position ( --- )
 const Float:HUD_MODE_X = 0.65
  
 // Y Hudmessage Position ( ||| )
 const Float:HUD_MODE_Y = 0.2
  
 // Time at which the Hudmessage is displayed. (when user is puted into the Server)
 const Float:START_TIME = 3.0
  
 /*================================================================================
  Customization ends here! Yes, that's it. Editing anything beyond
  here is not officially supported. Proceed at your own risk...
 =================================================================================*/
  
 // Variables
 new g_SyncHud, g_Mode
  
 // Cvar pointers
 new cvar_enable, cvar_central
  
 public plugin_init() 
 {
         // Plugin Info
         register_plugin("[ZP] Addon: Display the Current Mode", "0.1.6", "meTaLiCroSS")
  
         // Round Start Event
         register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
  
         // Enable Cvar
         cvar_enable = register_cvar("zp_display_mode", "1")
  
         // Server Cvar
         register_cvar("zp_addon_dtcm", "v0.1.6 by meTaLiCroSS", FCVAR_SERVER|FCVAR_SPONLY)
  
         // Variables
         g_SyncHud = CreateHudSyncObj()
  
         // Getting "zp_on" cvar
         if(cvar_exists("zp_on"))
                 cvar_central = get_cvar_pointer("zp_on")
  
         // If Zombie Plague is not running (bugfix)
         if(!get_pcvar_num(cvar_central))
                 pause("a") 
 }
  
 public client_putinserver(id)
 {
         // Setting Hud
         set_task(START_TIME, "mode_hud", id, _, _, "b")
 }
  
 public event_RoundStart()
 {
         // Update var (no mode started / in delay)
         g_Mode = 0
 }
  
 public mode_hud(id)
 {
         // If the Cvar isn't enabled
         if(!get_pcvar_num(cvar_enable))
                 return;
  
         // Hud Options
         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)
  
         // Now the hud appears
         ShowSyncHudMsg(id, g_SyncHud, "%s%s", (g_Mode == 0 ? "" : hud_tag), mode_names[g_Mode])
 }
  
 public zp_round_started(mode, id)
 {
         // Update var with Mode num
         g_Mode = mode
  
         // An unofficial mode
         if(!(1 <= mode < (sizeof(mode_names) - 1)))
                 g_Mode = sizeof(mode_names) - 1
 } 
  
 /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
 *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1034\\ f0\\ fs16 \n\\ par }
 */
 
 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:)
 |