Plugin Available Damage boost

Unpaid Requests, Public Plugins
Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

Damage boost

#1

Post by Rain1153 » 2 Years Ago

what you think of this guys? This is little complex :(
Original plugin= https://forums.alliedmods.net/showthread.php?t=217496
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1988
Joined: 3 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#2

Post by Raheem » 2 Years Ago

You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#3

Post by Rain1153 » 2 Years Ago

I'm not talking about health bar....
I'm talking about a plugin for humans if they do cvar damage to zombies a "hud will appear i guess showing how much damage is needed for an individual to get 2x damage for cvar seconds". Can you please read the original plugin. I think it'll make the gameplay cool.
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1988
Joined: 3 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#4

Post by Raheem » 2 Years Ago

Ah, Here you are:

Code: Select all

#include <zombie_escape>

new iDamage[33]
new bool:is_in_dd[33]
new g_MsgSync
new cvar_reduce_time, cvar_reduce_amount, cvar_dd_duration

public plugin_init()
{
       register_plugin("[ZE] Addon: Damage Bar","1.2","Catastrophe")
       register_cvar("ZE_DAMAGE_BAR","1",(FCVAR_SERVER|FCVAR_SPONLY))
 
       RegisterHam(Ham_TakeDamage, "player", "fw_damage") 
       RegisterHam(Ham_Killed, "player", "fw_killed") 

       cvar_reduce_time = register_cvar("ze_db_reduce_time","20") 
       cvar_reduce_amount = register_cvar("ze_db_reduce_amount","10")
       cvar_dd_duration = register_cvar("ze_dd_duration", "30.0")


       g_MsgSync = CreateHudSyncObj() 
}

public client_putinserver(id)
{

       iDamage[id] = 0
       is_in_dd[id] = false
       set_task(1.0, "checkhudmessage", id+672)       
       set_task(get_pcvar_float(cvar_reduce_time), "reddam", id+673)
       
}


public client_disconnected(id)
{
             
       iDamage[id] = 0
       is_in_dd[id] = false
       remove_task(id+672)

}


public ze_user_humanized(id)
{

      iDamage[id] = 0
      is_in_dd[id] = false

}

public ze_user_infected(iVictim, iInfector)
{

      iDamage[iVictim] = 0
      is_in_dd[iVictim] = false

}

public fw_damage(victim, inflictor, attacker, Float:damage, damage_bits)
{


    if(is_user_connected(victim) && is_user_connected(attacker) && !ze_is_user_zombie(attacker) && is_user_alive(victim) && is_in_dd[attacker])
    {


    SetHamParamFloat(4, damage * 2)

    }        

}

public fw_killed(victim, attacker, shoudgib)
{

    if(is_user_connected(victim) && is_user_connected(attacker) && iDamage[attacker] < 100 && !is_in_dd[attacker] &&  !ze_is_user_zombie(attacker) )
    {

    iDamage[attacker] += 10
    checkdd(attacker)
  

    }

}

public checkhudmessage(id)
{
    id -= 672; 
       
    if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && is_in_dd[id])
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + 100 %%]^n[Double damage Enabled]");   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 90)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[|||||||||-]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 80)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[||||||||--]",  iDamage[id]);   
    
    }

    else if( is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 70)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[|||||||---]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 60)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[||||||----]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 50)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[|||||-----]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 40)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[||||------]",  iDamage[id]);   
    
    }
 
    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 30)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[|||-------]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 20)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[||--------]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 10)
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[|---------]",  iDamage[id]);   
    
    }

    else if(is_user_connected(id) && is_user_alive(id) && !ze_is_user_zombie(id) && iDamage[id] == 0 && !is_in_dd[id])
    {


      set_hudmessage(255, 255, 0, -1.0, 0.85, 0, 6.0, 1.1, 0.0, 0.0, -1);  
      ShowSyncHudMsg(id, g_MsgSync, "[Damage Status: + %d %%]^n[----------]",  iDamage[id]);   
    
    }
 
 
    set_task(0.1, "checkhudmessage", id+672); 
 


}

public reddam(id)
{ 
    id -= 673;  

    if(get_pcvar_num(cvar_reduce_time) > 0 && iDamage[id] > 0)
    {  
    iDamage[id] -= get_pcvar_num(cvar_reduce_amount) 
    }
  
    set_task(get_pcvar_float(cvar_reduce_time), "reddam", id+673)

}

public checkdd(id)
{

       if(iDamage[id] == 100 && !is_in_dd[id])
       {

       iDamage[id] = 0 
      
       is_in_dd[id] = true
       set_task(get_pcvar_float(cvar_dd_duration),"removedd", id)
 
       }
  

}

public removedd(id)
{

      if( !is_in_dd[id])
          return;

      is_in_dd[id] = false

      set_hudmessage(180, 0, 0, -1.0, -1.0, 0, 6.0, 5.0)
      show_hudmessage(id, "Double damage Disabled !")

}
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#5

Post by Rain1153 » 2 Years Ago

thanks :*..testing it now!
LOL

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#6

Post by Rain1153 » 2 Years Ago

the bar +0 never gets upto 100 :/.Since zombies cant be killed in zombie escape :/
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1988
Joined: 3 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#7

Post by Raheem » 2 Years Ago

LOL, Low the zombies health and NOTE ZE idea is to escape not kill zombies.
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#8

Post by Rain1153 » 2 Years Ago

No i wont lower it :/,,,i wanted u to make the damage 2 x whenever we do cvar damage to zombies thats all :/
LOL

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1988
Joined: 3 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 22
Contact:

#9

Post by Raheem » 2 Years Ago

You need when you hit zombies your weapon make ×2 Damage?
You don't know? Learn and you will know.

Rain1153
Senior Member
Senior Member
India
Posts: 278
Joined: 2 Years Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 19
Contact:

#10

Post by Rain1153 » 2 Years Ago

yes i mean when i do "x" damage X= 1 to n
LOL

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests