Raised This Month: $ Target: $400
 0% 

Subplugin Submission [ZP50] Addon: Display Current Mode


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 04-09-2015 , 03:50   [ZP50] Addon: Display Current Mode
Reply With Quote #1

This is a simple plugin to show current Game Mode with a HUD msg on the top screen.(default is top, you can edit cvars to change HUD msg position )

supports all Gamemodes!...


CVARS:
zp_currentmode_hudcolor "0 255 0" // Color of Hud Msg in RGB
zp_currentmode_hudposition "-1.0 0.08" // Postion of Hud Msg (x,y)


requirement: Zombie Plague 5.0.8



Have FUN!
Attached Files
File Type: sma Get Plugin or Get Source (zp50_addon_current_mode.sma - 1165 views - 1.5 KB)
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP






Last edited by New.ZM.Life; 04-09-2015 at 04:00.
New.ZM.Life is offline
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 04-09-2015 , 13:13   Re: [ZP50] Addon: Display Current Mode
Reply With Quote #2

Not bad Gj, u can add some screenshots..
wicho is offline
New.ZM.Life
Veteran Member
Join Date: Sep 2014
Location: Iran
Old 04-10-2015 , 13:15   Re: [ZP50] Addon: Display Current Mode
Reply With Quote #3

thx, its simple, no need to screenies
by the way, maybe i add some new features to it, then add screenies
__________________
PLUGINS

Zombie Plague 5.0 + New Modes

Added NightCrawler Mode to ZP





New.ZM.Life is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 04-11-2015 , 18:02   Re: [ZP50] Addon: Display Current Mode
Reply With Quote #4

How about this? And you can modify the code however you want ;)
This code is less hardcoded and it supports any gamemode installed on the server, it works only for zp50 ;)

PHP Code:
#include < amxmodx >
#include < zp50_gamemodes >

new g_desc[32];
new 
g_msghud;

public 
plugin_init()
{
    
register_plugin("[ZP] Game Modes Display""1.0""funkyfresh95");
    
    
register_event("TextMsg""event_restart""a""2&#Game_C""2&#Game_w");
    
register_event("HLTV""event_hltv""a""1=0""2=0");    
    
    
formatex(g_desccharsmax(g_desc), "No infection.. Yet..");
    
    
g_msghud CreateHudSyncObj();
}

public 
client_putinserver(id)
{
    if( !
is_user_bot(id) )
        
set_task(1.0"task_show_info"id 100__"b");
}

public 
client_disconnect(id)
    
remove_task(id 100);

public 
event_hltv()
    
formatex(g_desccharsmax(g_desc), "No infection.. Yet..");

public 
event_restart()
    
formatex(g_desccharsmax(g_desc), "No infection.. Yet..");

public 
zp_fw_gamemodes_start(game_mode_id)
{
    new 
name[32];
    
zp_gamemodes_get_name(game_mode_idnamecharsmax(name));
    
formatex(g_desccharsmax(g_desc), "%s"name);
}

public 
task_show_info(taskid)
{
    new 
id taskid 100;
    
    
set_hudmessage(25500, -1.00.0206.01.10.00.0, -1);
    
ShowSyncHudMsg(idg_msghud"Current Mode: %s"g_desc);

__________________
Discord contacts:
I rarely look at private messages here, but I am very active on Discord!
happy_2012 is offline
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 08:52.


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