Raised This Month: $ Target: $400
 0% 

Respawn with more hp [ZP]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NITRO_GOD
Member
Join Date: Mar 2017
Location: De_dust2
Old 07-04-2017 , 03:13   Respawn with more hp [ZP]
Reply With Quote #1

Hello everyone,
I need a simple plugin that will increase the hp of zombies after each respawn.
+500 HP every respawn

Eg: Lets assume hp of the zombie is 2000
so
Respawn 1: 2000Hp
Respaw 2: 2500Hp
Respawn3: 3000 Hp
Respawn 4: 3500Hp
Respawn 5: 4000Hp
And so on

Regardless Of Any zombie class their hp will increase 500 every respawn

Please Help me
__________________
My Work in zppv [RaDNoX] http://zppv.boards.net/thread/2562/m...tems-zp-radnox

Join zppv for help in Zombie Plague!

Last edited by NITRO_GOD; 07-04-2017 at 03:15.
NITRO_GOD is offline
Send a message via Skype™ to NITRO_GOD
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-04-2017 , 13:58   Re: Respawn with more hp [ZP]
Reply With Quote #2

Code:
#include <amxmodx> #include <cstrike> #include <fun> #include <hamsandwich> #include <zombieplague> const MAXPLAYERS = 32 new HEALTHDATA[] = {     2000,     2500,     3000,     3500,     4000,     4500,     5000,     5500,     6000,     6500,     7000,     7500,     8000,     8500,     9000,     9500,     10000     // If you add more values here,     // you don't will need to modify the code. } new g_respawn_count[MAXPLAYERS+1] public plugin_init() {     register_plugin("Test", "1.0", "Crazy")     RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1) } public client_putinserver(id) {     g_respawn_count[id] = 0 } public fw_PlayerSpawn_Post(id) {     if (!is_user_alive(id) || !cs_get_user_team(id))         return;     if (zp_get_user_zombie(id))     {         set_user_health(id, HEALTHDATA[g_respawn_count[id]])         g_respawn_count[id]++         if (g_respawn_count[id] >= sizeof HEALTHDATA)             g_respawn_count[id] = sizeof HEALTHDATA - 1     } }
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-05-2017 , 10:24   Re: Respawn with more hp [ZP]
Reply With Quote #3

PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>
#include <zombieplague>

new g_respawn_count[33]

public 
plugin_init()
{
    
register_plugin("Test""1.0""Crazy")

    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
}

public 
client_putinserver(id)
{
    
g_respawn_count[id] = 0
}

public 
fw_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id))
        return;

    if (
zp_get_user_zombie(id))
    {
            
g_respawn_count[id] ++;
        
set_user_health(idget_user_health(id) + (500 g_respawn_count[id]))
    }

Just reset the g_respawn_count[*]; to zero at round start or end.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-05-2017 , 10:25   Re: Respawn with more hp [ZP]
Reply With Quote #4

Yep, the code of natsheh is better than my.
__________________








CrazY. is offline
NITRO_GOD
Member
Join Date: Mar 2017
Location: De_dust2
Old 07-05-2017 , 11:13   Re: Respawn with more hp [ZP]
Reply With Quote #5

Thanks guys i will test this and inform appreciate this a lot
__________________
My Work in zppv [RaDNoX] http://zppv.boards.net/thread/2562/m...tems-zp-radnox

Join zppv for help in Zombie Plague!
NITRO_GOD is offline
Send a message via Skype™ to NITRO_GOD
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:17.


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