AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   Subplugin Submission [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier) (https://forums.alliedmods.net/showthread.php?t=244275)

zmd94 07-16-2014 05:48

[ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
6 Attachment(s)
[ZP] Health Reminder
(Nemesis + Sniper + Survivor + Assassin + Bombardier)


Status:
UP-TO-DATE
(6/1/2015)

Quote:

This plugin is compatible with ZPA 1.6.1, ZP4.3 and ZP5.0 (only 2), and ZPS.
Maybe, you will say that there are already similar plugin. However, this plugin is still different.

What new!
Quote:

The reminder will be displayed as a hud message. The colour is green.
Description:
Quote:

This plugin will automatically detect what type of round is being played in the server (Nemesis Round/ Sniper Round/ Survivor Round/ Assassin Round/ Bombardier Round). After that it, will display a hud message about the remaining health of Nemesis/ Sniper/ Survivor/ Assassin/ Bombardier.
There are 5 different types of health reminder:
Quote:

1. Nemesis Health Reminder.
2. Survivor Health Reminder.
3. Sniper Health Reminder.
4. Assassin Health Reminder.
5. Bombardier Health Reminder (for ZPS only).
All of this plugins is working well in ZPA 1.6.1 server. I have tested it.

Can I use this plugin with ZP4.3 or ZP5.0?

If you want to use this plugin with ZP4.3 or ZP5.0.5 and above, there are only two plugin will work:
Quote:

1. Nemesis Health Reminder.
2. Survivor Health Reminder.
However, you must change this:
PHP Code:

#include <zombie_plague_advance> 

-->
PHP Code:

#include <zombieplague> 

Can I use this plugin for ZPS?

Yes, of course especially this plugin:
Quote:

Bombardier Health Reminder.
However, if you want to use this plugin in ZPS, you have to edit the code for Assassin Health Reminder and Sniper Health Reminder:
PHP Code:

#include <zombie_plague_advance> 

-->
PHP Code:

#include <zombieplague> 

Health Reminder v2!

This is the combined plugin that contains four types of health reminder which are for Assassin, Sniper, Nemesis and Survivor. So, what can you edit.
PHP Code:

    g_iNemesisReminder register_cvar("zp_nemesis_remimder""1")
    
g_iSurvivorReminder register_cvar("zp_survivor_remimder""1")
    
g_iAssassinReminder register_cvar("zp_assasin_remimder""1")
    
g_iSniperReminder register_cvar("zp_sniper_remimder""1"

However, this plugin only can be used in this ZP version:

1. Zombie Plague Advance
2. ZP5.0.8 + Sniper & Assassin + Compatibility with ZPA

If you want to use this plugin in ZP5.0.8 + Sniper & Assassin + Compatibility with ZPA just edit this line:
PHP Code:

#include <zombie_plague_advance> 

-->
PHP Code:

#include <zombieplague> 

Health Reminder v3!

This version will print the reminder in chat. If you want this version, just download from here:

https://forums.alliedmods.net/showpo...3&postcount=40

Credits:
Quote:

1. Just4Games for editing this plugin so that it can be used for Bombardier Round in ZPS.
2. Mohsen9010 for testing this plugin in ZP5.0.8 + Sniper & Assassin + Compatibility with ZPA.
3. etc
Changelog:
-->


Screenshots:

1. Nemesis Health Reminder:
http://img.ctrlv.in/img/14/07/16/53c646361edc0.jpg

2. Sniper Health Reminder:
http://img.ctrlv.in/img/14/07/16/53c64744d0f4e.jpg

3. Assassin Health Reminder:
http://img.ctrlv.in/img/14/07/16/53c6480398122.jpg

4. Survivor Health Reminder:
http://img.ctrlv.in/img/14/07/16/53c6489020b8d.jpg

5. Bombardier Health Reminder (for ZPS only):
http://img.ctrlv.in/img/14/07/16/53c65cf8b4e68.jpg

I recommend you to use this plugin also along with this plugin (if you are using ZPA only):
I hope this will be useful. :up:

Just4Games 07-16-2014 06:23

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin)
 
1 Attachment(s)
And for Zombie Plague Shade:
For Assassin and Sniper just go in the files and change this:
Code:

#include <zombie_plague_advance>
to:
Code:

#include <zombieplague>
Here is the code for Bombardier mode!

PHP Code:

#include <amxmodx>
#include <hamsandwich>
#include <zombieplague>

#define PLUGIN_NAME "[ZP] Bombardier Health Reminder"
#define PLUGIN_VERS "1.0"
#define PLUGIN_AUTH "zmd94"

#define TASK_HEALTH 5000

#define HOLD_TIME 4.0

const Float:HUD_MODE_X = -1.0
const Float:HUD_MODE_Y 0.20
const Float:START_TIME 3.0

new g_SyncHud

public plugin_init() 
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSPLUGIN_AUTH)
    
    
// Fwd's
    
RegisterHam(Ham_Spawn"player""Fwd_PlayerSpawn_Post"1)
    
RegisterHam(Ham_Killed"player""Fwd_PlayerKilled_Pre"0)
    
    
g_SyncHud CreateHudSyncObj()
}

public 
Fwd_PlayerSpawn_Post(id)
{
    if (
task_exists(id+TASK_HEALTH))
        
remove_task(id+TASK_HEALTH)
}

public 
Fwd_PlayerKilled_Pre(victimattackershouldgib)
{
    if (
task_exists(victim+TASK_HEALTH))
        
remove_task(victim+TASK_HEALTH)
}

public 
zp_round_started(modeid)
{
    if (
mode != MODE_BOMBARDIER)
        return
        
    if (!
zp_get_user_bombardier(id))
        return
        
    
set_task(START_TIME"Task_ShowHealth"id+TASK_HEALTH__"b"
}

public 
Task_ShowHealth(id)
{
    
id -= TASK_HEALTH
    
    
if (!zp_get_user_bombardier(id))
        
remove_task(id+TASK_HEALTH)
    
    
set_hudmessage(02550HUD_MODE_XHUD_MODE_Y06.0HOLD_TIME0.00.0, -1)
    
ShowSyncHudMsg(0g_SyncHud"Bombardier still has %d health points!"get_user_health(id))



zmd94 07-16-2014 06:41

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin)
 
@ Just4Games. Thank you for helping. I quite busy and do not have time to edit this plugin for ZPS. I will update the first post.

mohsen9010 07-16-2014 22:00

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
Good
For ZP5.0.8 + Sniper & Assassin + Compatibility with ZPA works :
Code:

1. Nemesis Health Reminder.
2. Survivor Health Reminder.
3. Sniper Health Reminder.
4. Assassin Health Reminder.


zmd94 07-16-2014 23:26

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
@ mohsen9010, Thank you for testing it with ZP5.0.8.

Just4Games 07-27-2014 12:36

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
Didn't see this till now, the hud only appears every 6 seconds i think so, please set a lower value...
I did this too but just saying for others who don't know where to edit etc.

zmd94 07-27-2014 19:32

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
Quote:

The hud only appears every 6 seconds, I think so. Please set a lower value.
Sorry, what do you mean? Do you want the message to be appeared always as a fixed hud message?

Just4Games 07-28-2014 03:32

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
I mean that the message appears every 6 seconds. It appears with 10000 HP (for example) the hud disappear and it comes back after 6 seconds with the HP i have (if someone damage me).

zmd94 07-28-2014 06:10

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
Quote:

I mean that the message appears every 6 seconds. It appears with 10000 HP (for example) the hud disappear and it comes back after 6 seconds with the health that I have.
Yes, it right.
Quote:

Please set a lower value.
Sorry, I'm still can't understand this request? May you clarify it more?

Just4Games 07-28-2014 06:13

Re: [ZP] Health Reminder (Nemesis + Sniper + Survivor + Assassin + Bombardier)
 
This:
PHP Code:

set_hudmessage(02550HUD_MODE_XHUD_MODE_Y06.0HOLD_TIME0.00.0, -1)
    
ShowSyncHudMsg(0g_SyncHud"Bombardier still has %d health points!"get_user_health(id)) 

->
PHP Code:

set_hudmessage(02550HUD_MODE_XHUD_MODE_Y00.4HOLD_TIME0.00.0, -1)
    
ShowSyncHudMsg(0g_SyncHud"Bombardier still has %d health points!"get_user_health(id)) 

And i changed the holding time to 2.


All times are GMT -4. The time now is 10:21.

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