Raised This Month: $32 Target: $400
 8% 

[rq] mode current


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hichamera
Senior Member
Join Date: Feb 2014
Location: Algeria
Old 07-02-2014 , 23:20   [rq] mode current
Reply With Quote #1

i need plugin like this
__________________

Try & Try & Try Nothing Is impossible
hichamera is offline
Send a message via Skype™ to hichamera
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-03-2014 , 03:38   Re: [rq] mode current
Reply With Quote #2

Just try this:
zmd94 is offline
hichamera
Senior Member
Join Date: Feb 2014
Location: Algeria
Old 07-03-2014 , 09:41   Re: [rq] mode current
Reply With Quote #3

this don't have how mush human and zombie's ^^
__________________

Try & Try & Try Nothing Is impossible
hichamera is offline
Send a message via Skype™ to hichamera
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 07-03-2014 , 11:20   Re: [rq] mode current
Reply With Quote #4

Try this:

PHP Code:
/*================================================================================

    [[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[] = "Current Mode :"

// Name for each Hudmessage Mode
new const mode_names[][] =
{
    
"Waiting for New Mode...",    // No mode Started
    
"[Normal Infection]",        // Normal Infection, single round
    
"[Nemesis Mode]",            // Nemesis Mode (zombie boss)
    
"[Assassin Mode]",            // Assasin Mode (zombie boss)
    
"[Survivor Mode]",        // Survivor Mode (human boss)
    
"[Sniper Mode]",            // Sniper Mode (human boss)
    
"[Swarm Mode]",            // Swarm round (no infections)
    
"[Multi-Infection]",        // 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
    
{0,     100,     0},         // 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)
    
{0,     69,     0},        // Multiple Infection (like single round, but, more than 1 zombie)
    
{255,     0,     0},        // Plague round (nemesis & zombies vs. survivors & humans)
    
{255,     0,     0},        // 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.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_SyncHudg_Mode

// Cvar pointers
new cvar_enablecvar_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;

        new 
zombies zp_get_zombie_count()
    new 
humans zp_get_human_count()
    
    
// Hud Options
    
set_hudmessage(rgb_hud_colors[g_Mode][0], rgb_hud_colors[g_Mode][1], rgb_hud_colors[g_Mode][2], HUD_MODE_XHUD_MODE_Y06.012.0)
    
    
// Now the hud appears
    
ShowSyncHudMsg(idg_SyncHud"%s%s^nHumans: %i | Zombies: %i", (g_Mode == "" hud_tag), mode_names[g_Mode], humanszombies)
}

public 
zp_round_started(modeid)
{
    
// Update var with Mode num
    
g_Mode mode
    
    
// An unofficial mode
    
if(!(<= mode < (sizeof(mode_names) - 1)))
        
g_Mode sizeof(mode_names) - 1

wicho is offline
hichamera
Senior Member
Join Date: Feb 2014
Location: Algeria
Old 07-03-2014 , 11:54   Re: [rq] mode current
Reply With Quote #5

tnkx its work ♥
__________________

Try & Try & Try Nothing Is impossible
hichamera is offline
Send a message via Skype™ to hichamera
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-03-2014 , 12:12   Re: [rq] mode current
Reply With Quote #6

Thank you wicho. I have tested the code that you gave and it is working perfectly in my ZPA 1.6.1 server.

Screenshoot:

zmd94 is offline
Drissdev1
Senior Member
Join Date: Jun 2014
Old 07-05-2014 , 20:19   Re: [rq] mode current
Reply With Quote #7

Not like Rdoun Normal = Human: %d |Zombie: %d
Round Nemsis = HUman: %d | Nemsis: %d ...
Drissdev1 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-06-2014 , 00:23   Re: [rq] mode current
Reply With Quote #8

@Drissdev1.

Are trying to say that when the players are in Nemesis round, the HUD will appear like below?:
Quote:
Originally Posted by Drissdev1 View Post
Round Nemesis = Human: %d | Nemesis: %d ...
Good suggestion.

Last edited by zmd94; 07-06-2014 at 00:23.
zmd94 is offline
Just4Games
Senior Member
Join Date: Jan 2013
Location: Romania
Old 07-06-2014 , 04:29   Re: [rq] mode current
Reply With Quote #9

zmd maybe like this:
Quote:
Round Nemesis = Humans: %d | Nemesis Health: %d
__________________

Just an old fart revisiting the nostalgia.
---------
Oh yeah
|[[ZPA/ZPS]NoSound]|[[ZPA/ZPS]Hud Stats(Edited)]|

PS: I go by MoistWomble nowadays.
Just4Games is offline
hichamera
Senior Member
Join Date: Feb 2014
Location: Algeria
Old 07-06-2014 , 04:32   Re: [rq] mode current
Reply With Quote #10

Yes its batter ;°
__________________

Try & Try & Try Nothing Is impossible
hichamera is offline
Send a message via Skype™ to hichamera
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:35.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode