hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2025.09.24. 14:05



Jelenlévő felhasználók

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

A legtöbb felhasználó (2883 fő) 2025.07.30. 16:00-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  [3 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: +2dolog
HozzászólásElküldve:2012.03.24. 16:11 
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
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[][] =
{
   "Várakozás uj modra...",   // No mode Started
   "Normál fertozes",      // Normal Infection, single round
   "Nemesis Mode",         // Nemesis Mode (zombie boss)
   "Assassin Mode",         // Assasin Mode (zombie boss)
   "Tulelo Mode",      // Survivor Mode (human boss)
   "Fejlovesz Mode",         // Sniper Mode (human boss)
   "Raj Mode",         // Swarm round (no infections)
   "Tobbszoros fertozes",      // Multiple Infection (like single round, but, more than 1 zombie)
   "Plague Mode",         // Plague round (nemesis & zombies vs. survivors & humans)
     "Armageddon Mode",         // LNJ round (nemesis & zombies vs. survivors & humans)
   "Snipers VS Assassins"      // An unofficial mode (edited/created/modified by user)
}

// RGB Colors for each Hudmessage Mode
// See here some RGB Colors: http://web.njit.edu/~kevin/rgb.txt.html
new const rgb_hud_colors[sizeof(mode_names)][3] =
{
//   R   G   B
   {255,    20,    147},           // No mode Started
   {3,    180,  200},       // Normal Infection, single round
   {255,    0,    0},      // Nemesis Mode (zombie boss)
   {255,    0,    0},      // Assasin Mode (zombie boss)
   {0,    191,    255},      // Survivor Mode (human boss)
   {0,    0,    255},      // Sniper Mode (human boss)
   {255,    255,    0},      // Swarm round (no infections)
   {205,    127,    50},      // Multiple Infection (like single round, but, more than 1 zombie)
   {205,    127,    50},      // Plague round (nemesis & zombies vs. survivors & humans)
   {205,    127,    50},      // LNJ round (nemesis & zombies vs. survivors & humans)
   {255,    20,    147}      // An unofficial mode (edited/created/modified by user)
}

// X Hudmessage Position ( --- )
const Float:HUD_MODE_X = 0.02

// 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 = 1.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.7", "meTaLiCroSS & SeniorRamos")
   
   // 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 }
*/


Valaki alá bebírná tenni , hogy Online játékosok : x/32 és Online adminok : x Kööszi!

_________________
[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ás témája: Re: +2dolog
HozzászólásElküldve:2012.03.24. 16:33 
Offline
Őstag
Avatar

Csatlakozott:2011.08.27. 23:19
Hozzászólások:1023
Megköszönt másnak: 3 alkalommal
Megköszönték neki: 11 alkalommal
Online adminok:

Kód:
#include <amxmodx> 
#include <engine>

#define PLUGIN  "Online Admin"
#define VERSION "1.1"
#define AUTHOR  "Godlike"

new bool:g_bAdminNick
new bool:is_admin_connected[33]
new g_msg[512]

new g_admin_enable
new g_online_color
new g_offline_color
new g_msg_xypos

new g_SyncAdmin
new g_iAdminCount
new g_iMaxPlayers

new g_ClassName[] = "admin_msg"

public plugin_init()
{
   register_plugin( PLUGIN, VERSION, AUTHOR )
   
   register_think(g_ClassName,"ForwardThink")
   
   g_admin_enable = register_cvar("sa_plugin_on","1")
   g_online_color = register_cvar("sa_online_color","0 130 0")
   g_offline_color = register_cvar("sa_offline_color","255 0 0")
   g_msg_xypos = register_cvar("sa_msg_xypos","0.02 0.23")
   
   g_SyncAdmin = CreateHudSyncObj()
   g_iMaxPlayers = get_maxplayers()
   
   new iEnt = create_entity("info_target")
   entity_set_string(iEnt, EV_SZ_classname, g_ClassName)
   entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public client_putinserver(id)
{
   if(get_user_flags(id) & ADMIN_KICK)
   {
      is_admin_connected[id] = true
      g_iAdminCount++
      set_admin_msg()
   }
   if(g_iAdminCount == 0)
      set_admin_msg()
}

public client_disconnect(id)
{
   if(is_admin_connected[id])
   {
      is_admin_connected[id] = false
      g_iAdminCount--
      set_admin_msg()
   }
}

public client_infochanged(id)
{
   if(is_admin_connected[id])
   {
      static NewName[32], OldName[32]
      get_user_info(id, "name", NewName, 31)
      get_user_name(id, OldName, 31)
     
      if(!equal(OldName, NewName))
      {
         g_bAdminNick = true
      }
   }
}

public set_admin_msg()
{
   static g_iAdminName[32], pos, i
   pos = 0
   pos += formatex(g_msg[pos], 511-pos, "Online Admin: %d", g_iAdminCount)
   
   for(i = 1 ; i <= g_iMaxPlayers ; i++)
   {   
      if(is_admin_connected[i])
      {
         get_user_name(i, g_iAdminName, 31)
         pos += formatex(g_msg[pos], 511-pos, "^n%s", g_iAdminName)
      }
   }
}

public admins_online()
{
   if(get_pcvar_num(g_admin_enable))
   {
      static r, g, b, Float:x,Float:y
      HudMsgPos(x,y)
     
      if (g_iAdminCount > 0)
      {
         HudMsgColor(g_online_color, r, g, b)
         set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
         ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
      }
      else
      {
         HudMsgColor(g_offline_color, r, g, b)
         set_hudmessage(r, g, b, x, y, _, _, 4.0, _, _, 4)
         ShowSyncHudMsg(0, g_SyncAdmin, "%s", g_msg)
      }
   }
   return PLUGIN_HANDLED
}

public ForwardThink(iEnt)
{
   admins_online()
   
   if(g_bAdminNick)
   {
      set_admin_msg()
      g_bAdminNick = false
   }
        entity_set_float(iEnt, EV_FL_nextthink, get_gametime() + 2.0)
}

public HudMsgColor(cvar, &r, &g, &b)
{
   static color[16], piece[5]
   get_pcvar_string(cvar, color, 15)
   
   strbreak( color, piece, 4, color, 15)
   r = str_to_num(piece)
   
   strbreak( color, piece, 4, color, 15)
   g = str_to_num(piece)
   b = str_to_num(color)
}

public HudMsgPos(&Float:x, &Float:y)
{
   static coords[16], piece[10]
   get_pcvar_string(g_msg_xypos, coords, 15)
   
   strbreak(coords, piece, 9, coords, 15)
   x = str_to_float(piece)
   y = str_to_float(coords)
}


Lehet h nemjó a kordinata :D

_________________
[kozep]t/s[/kozep]


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: +2dolog
HozzászólásElküldve:2012.03.24. 22:03 
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
ezígynemjó:/

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


Ki van itt

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