AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP50] Addon: Display Current Mode (https://forums.alliedmods.net/showthread.php?t=261268)

New.ZM.Life 04-09-2015 03:50

[ZP50] Addon: Display Current Mode
 
1 Attachment(s)
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!

wicho 04-09-2015 13:13

Re: [ZP50] Addon: Display Current Mode
 
Not bad Gj, u can add some screenshots..

New.ZM.Life 04-10-2015 13:15

Re: [ZP50] Addon: Display Current Mode
 
thx, its simple, no need to screenies :)
by the way, maybe i add some new features to it, then add screenies

happy_2012 04-11-2015 18:02

Re: [ZP50] Addon: Display Current Mode
 
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);




All times are GMT -4. The time now is 14:45.

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