Approved No Entities Block

Useless Stuffs, Spam ... etc
User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1962
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

Re: No Entities Block

#31

Post by Raheem » 2 Years Ago

Ok this add limit for damage so it will make -10 from his HP every 1.5 seconds. About glow i don't manage to reset it. Simply i need to think again where to reset as the problem i don't know that when player stop blocking he stops. So i can't reset the glow right.

Code:
    1. #include <zombie_escape>
    2.  
    3. new const szEntities[][] =
    4. {
    5.     "func_train",
    6.     "func_vehicle",
    7.     "func_tracktrain",
    8.     "func_door"
    9. }
    10.  
    11. new g_iPulsating = 0, Float:g_flLastBlock[33]
    12.  
    13. // Cvars
    14. new g_pCvarBlockTime
    15.  
    16. public plugin_init()
    17. {
    18.     register_plugin("No Block", "1.0", "Raheem")
    19.    
    20.     // Cvars
    21.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
    22.  
    23.     for (new i = 0; i <= charsmax(szEntities); i++)
    24.     {
    25.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    26.     }
    27. }
    28.  
    29. public Fw_Blocked_Post(iEnt, id)
    30. {
    31.     new Float:flRefTime = get_gametime()
    32.    
    33.     if (is_user_alive(id) && pev_valid(iEnt))
    34.     {
    35.         if(g_flLastBlock[id] > flRefTime)
    36.             return
    37.        
    38.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
    39.            
    40.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC)
    41.  
    42.         client_print(id, print_center, "Stop BLOCK!!!")
    43.        
    44.         switch (g_iPulsating)
    45.         {
    46.             case 0:
    47.             {
    48.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    49.                 g_iPulsating = 1
    50.             }
    51.             case 1:
    52.             {
    53.                 Set_Rendering(id)
    54.                 g_iPulsating = 0
    55.             }
    56.         }
    57.     }
    58. }
Try think with me how to detect that this bad player stop blocking.
You don't know? Learn and you will know.

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 2 Years Ago
Location: INDIA
Has thanked: 5 times
Been thanked: 2 times
Age: 21
Contact:

#32

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
2 Years Ago
Ok this add limit for damage so it will make -10 from his HP every 1.5 seconds. About glow i don't manage to reset it. Simply i need to think again where to reset as the problem i don't know that when player stop blocking he stops. So i can't reset the glow right.

Code:
    1. #include <zombie_escape>
    2.  
    3. new const szEntities[][] =
    4. {
    5.     "func_train",
    6.     "func_vehicle",
    7.     "func_tracktrain",
    8.     "func_door"
    9. }
    10.  
    11. new g_iPulsating = 0, Float:g_flLastBlock[33]
    12.  
    13. // Cvars
    14. new g_pCvarBlockTime
    15.  
    16. public plugin_init()
    17. {
    18.     register_plugin("No Block", "1.0", "Raheem")
    19.    
    20.     // Cvars
    21.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
    22.  
    23.     for (new i = 0; i <= charsmax(szEntities); i++)
    24.     {
    25.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    26.     }
    27. }
    28.  
    29. public Fw_Blocked_Post(iEnt, id)
    30. {
    31.     new Float:flRefTime = get_gametime()
    32.    
    33.     if (is_user_alive(id) && pev_valid(iEnt))
    34.     {
    35.         if(g_flLastBlock[id] > flRefTime)
    36.             return
    37.        
    38.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
    39.            
    40.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC)
    41.  
    42.         client_print(id, print_center, "Stop BLOCK!!!")
    43.        
    44.         switch (g_iPulsating)
    45.         {
    46.             case 0:
    47.             {
    48.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    49.                 g_iPulsating = 1
    50.             }
    51.             case 1:
    52.             {
    53.                 Set_Rendering(id)
    54.                 g_iPulsating = 0
    55.             }
    56.         }
    57.     }
    58. }
Try think with me how to detect that this bad player stop blocking.
thats nice do one thing
define human damage different and zombie damage diff..
for human 10dmg/sec and zm 2000 dmg /sec
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

sped
Member
Member
Posts: 17
Joined: 2 Years Ago
Has thanked: 1 time
Been thanked: 0
Contact:

#33

Post by sped » 1 Year Ago

sam_bhosale4 wrote:
1 Year Ago
Raheem wrote:
2 Years Ago
Ok this add limit for damage so it will make -10 from his HP every 1.5 seconds. About glow i don't manage to reset it. Simply i need to think again where to reset as the problem i don't know that when player stop blocking he stops. So i can't reset the glow right.

Code:
    1. #include <zombie_escape>
    2.  
    3. new const szEntities[][] =
    4. {
    5.     "func_train",
    6.     "func_vehicle",
    7.     "func_tracktrain",
    8.     "func_door"
    9. }
    10.  
    11. new g_iPulsating = 0, Float:g_flLastBlock[33]
    12.  
    13. // Cvars
    14. new g_pCvarBlockTime
    15.  
    16. public plugin_init()
    17. {
    18.     register_plugin("No Block", "1.0", "Raheem")
    19.    
    20.     // Cvars
    21.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
    22.  
    23.     for (new i = 0; i <= charsmax(szEntities); i++)
    24.     {
    25.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    26.     }
    27. }
    28.  
    29. public Fw_Blocked_Post(iEnt, id)
    30. {
    31.     new Float:flRefTime = get_gametime()
    32.    
    33.     if (is_user_alive(id) && pev_valid(iEnt))
    34.     {
    35.         if(g_flLastBlock[id] > flRefTime)
    36.             return
    37.        
    38.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
    39.            
    40.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC)
    41.  
    42.         client_print(id, print_center, "Stop BLOCK!!!")
    43.        
    44.         switch (g_iPulsating)
    45.         {
    46.             case 0:
    47.             {
    48.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    49.                 g_iPulsating = 1
    50.             }
    51.             case 1:
    52.             {
    53.                 Set_Rendering(id)
    54.                 g_iPulsating = 0
    55.             }
    56.         }
    57.     }
    58. }
Try think with me how to detect that this bad player stop blocking.
thats nice do one thing
define human damage different and zombie damage diff..
for human 10dmg/sec and zm 2000 dmg /sec
i agree :D

User avatar
ArminC
Senior Member
Senior Member
Romania
Posts: 137
Joined: 1 Year Ago
Location: Bucharest
Has thanked: 0
Been thanked: 2 times
Age: 17
Contact:

#34

Post by ArminC » 1 Year Ago

For normal mods (or other):

Code: Select all

#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <reapi>

new const szEntities[][] =
{
    "func_train",
    "func_vehicle",
    "func_tracktrain",
    "func_door"
}
 
new Float:g_flLastBlock[33]
 
// Cvars
new g_pCvarBlockTime
 
public plugin_init()
{
    register_plugin("No Block", "1.0", "Raheem")
   
    // Cvars
    g_pCvarBlockTime = register_cvar("block_time", "1.5") // At how many seconds to take damage?
 
    for (new i = 0; i <= charsmax(szEntities); i++)
    {
        RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    }
}
 
public Fw_Blocked_Post(iEnt, id)
{
    new Float:flRefTime = get_gametime()
   
    if (is_user_alive(id) && pev_valid(iEnt))
    {
        if(g_flLastBlock[id] > flRefTime)
            return
       
        g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
           
        ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC) // How much damage(hp) to take?
 
        client_print(id, print_center, "STOP BLOCKING!")
    }
}
These users thanked the author ArminC for the post (total 2):
Mohamed Alaa (1 Year Ago) • Raheem (1 Year Ago)

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 202
Joined: 2 Years Ago
Has thanked: 14 times
Been thanked: 7 times
Age: 20
Contact:

#35

Post by sPe3doN » 1 Year Ago

Raheem wrote:
2 Years Ago
Ok this add limit for damage so it will make -10 from his HP every 1.5 seconds. About glow i don't manage to reset it. Simply i need to think again where to reset as the problem i don't know that when player stop blocking he stops. So i can't reset the glow right.

Code:
    1. #include <zombie_escape>
    2.  
    3. new const szEntities[][] =
    4. {
    5.     "func_train",
    6.     "func_vehicle",
    7.     "func_tracktrain",
    8.     "func_door"
    9. }
    10.  
    11. new g_iPulsating = 0, Float:g_flLastBlock[33]
    12.  
    13. // Cvars
    14. new g_pCvarBlockTime
    15.  
    16. public plugin_init()
    17. {
    18.     register_plugin("No Block", "1.0", "Raheem")
    19.    
    20.     // Cvars
    21.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
    22.  
    23.     for (new i = 0; i <= charsmax(szEntities); i++)
    24.     {
    25.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    26.     }
    27. }
    28.  
    29. public Fw_Blocked_Post(iEnt, id)
    30. {
    31.     new Float:flRefTime = get_gametime()
    32.    
    33.     if (is_user_alive(id) && pev_valid(iEnt))
    34.     {
    35.         if(g_flLastBlock[id] > flRefTime)
    36.             return
    37.        
    38.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
    39.            
    40.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 10.0, DMG_GENERIC)
    41.  
    42.         client_print(id, print_center, "Stop BLOCK!!!")
    43.        
    44.         switch (g_iPulsating)
    45.         {
    46.             case 0:
    47.             {
    48.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    49.                 g_iPulsating = 1
    50.             }
    51.             case 1:
    52.             {
    53.                 Set_Rendering(id)
    54.                 g_iPulsating = 0
    55.             }
    56.         }
    57.     }
    58. }
Try think with me how to detect that this bad player stop blocking.
Nice, but You need to add -2000 Hp For Zm Team to

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 525
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

#36

Post by czirimbolo » 1 Year Ago

Its not woriking in 1.3v, can someone fix this plugin?
Image

User avatar
Mohamed Alaa
Mod Developer
Mod Developer
Egypt
Posts: 609
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 48 times
Age: 19
Contact:

#37

Post by Mohamed Alaa » 1 Year Ago

czirimbolo wrote:
1 Year Ago
Its not woriking in 1.3v, can someone fix this plugin?
Any errors?
Want your own mod edition? PM me.
Accepting web projects.

Rain1153
Senior Member
Senior Member
India
Posts: 277
Joined: 1 Year Ago
Has thanked: 2 times
Been thanked: 1 time
Age: 18
Contact:

#38

Post by Rain1153 » 1 Year Ago

yes it is buggy it works for human but when you are zombie your health reduces to 1 and your screen turns vertical!..bro can't u make the same ham take damage for zombies too but there damage rate should be like 2000+
LOL

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 525
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

#39

Post by czirimbolo » 1 Year Ago

I can block heli and train wihout any drops of HP. Not working for me
Image

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1962
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#40

Post by Raheem » 1 Year Ago

It seems that you can't block moving entities anymore. I'm not sure if this fixed in ReHLDS or ReGameDLL or ReAPI but generally for me the block event not called then this plugin will not work.
czirimbolo wrote:
1 Year Ago
I can block heli and train wihout any drops of HP. Not working for me
You sure that these entities get blocked?

Post your ReHLDS, ReGameDLL, ReAPI versions + post server ip so i come see if it's blocked or not. As i test it does not block.
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest