Approved No Entities Block

Useless Stuffs, Spam ... etc
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#41

Post by czirimbolo » 5 years ago

here is ip: 91.224.117.15:27055

Rehlds - 3.4.0.654
Reapi 5.6.0 157
regameDLL - 5,7,0.312
Metamod v1.21p37
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#42

Post by Raheem » 5 years ago

I tested on your server, seems that the block event is called. So can you tell what is the problem and which code you used?

Try this and tell if you get message when you blocking the entities or not:
  • Code: Select all

    #include <zombie_escape>
     
    new const szEntities[][] =
    {
        "func_train",
        "func_vehicle",
        "func_tracktrain",
        "func_door"
    }
     
    public plugin_init()
    {
        register_plugin("No Block", "1.0", "Raheem")
     
        for (new i = 0; i < charsmax(szEntities); i++)
        {
            RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
        }
    }
     
    public Fw_Blocked_Post(iEnt, id)
    {
        if (is_user_alive(id) && pev_valid(iEnt))
        {
    		client_print(id, print_center, "Block Event Called!")
        }
    }
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#43

Post by czirimbolo » 5 years ago

Ok I have message Block Event Called but thats all. Nobody loses his HP.
Can you make with a sound "MOVE" and with losing HP ?

Here is an example:
I am crouching and blocking the gate (in jurassicpark map), I am not losing HP and also I CAN"T MOVE. Moreover, nobody can open the gate. Only admin must slay me to fix this situation.
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#44

Post by czirimbolo » 5 years ago

can someone make it working ?
Image

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#45

Post by czirimbolo » 5 years ago

Raheem wrote: 5 years ago I tested on your server, seems that the block event is called. So can you tell what is the problem and which code you used?

Try this and tell if you get message when you blocking the entities or not:
  • Code: Select all

    #include <zombie_escape>
     
    new const szEntities[][] =
    {
        "func_train",
        "func_vehicle",
        "func_tracktrain",
        "func_door"
    }
     
    public plugin_init()
    {
        register_plugin("No Block", "1.0", "Raheem")
     
        for (new i = 0; i < charsmax(szEntities); i++)
        {
            RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
        }
    }
     
    public Fw_Blocked_Post(iEnt, id)
    {
        if (is_user_alive(id) && pev_valid(iEnt))
        {
    		client_print(id, print_center, "Block Event Called!")
        }
    }
I am using this code
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#46

Post by Raheem » 5 years ago

I don't add damage in this code, this only for testing if it's called or not. And it's called. I did not add the damage yet.
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#47

Post by czirimbolo » 5 years ago

Ahh ok, the message is working but its unnoticeable really
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#48

Post by Raheem » 5 years ago

Try:
  • Code: Select all

    #include <zombie_escape>
    
    new Float:g_flPlayed[33]
    
    new const szEntities[][] =
    {
        "func_train",
        "func_vehicle",
        "func_tracktrain",
        "func_door"
    }
     
    public plugin_init()
    {
        register_plugin("No Block", "1.0", "Raheem")
     
        for (new i = 0; i < charsmax(szEntities); i++)
        {
            RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
        }
    }
     
    public Fw_Blocked_Post(iEnt, id)
    {
        if (is_user_alive(id) && pev_valid(iEnt))
        {
    		if (get_gametime() > g_flPlayed[id] + 1.0)
    		{
    			PlaySound(id, "hgrunt/move!.wav")
    			g_flPlayed[id] = get_gametime();
    		}
    		
    		client_print(id, print_center, "STOP BLOCK! MOVE!")
    		ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
        }
    }
Change damage from: ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)

This damage done very block frame i think, i'm not sure but it happen much times as he still blocking.
Last edited by Raheem 5 years ago, edited 1 time in total.
Reason: Edited line 27: i --> id
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#49

Post by czirimbolo » 5 years ago

I cant compile:

//// ze_no_block.sma
//
// C:\Users\macie\Desktop\Compiler v1.8.3\scripting\ze_no_block.sma(27) : error 017: undefined symbol "i"
//
// 1 Error.
// Could not locate output file compiled\ze_no_block.amx (compile failed).
//
// Compilation Time: 0,75 sec
// ----------------------------------------
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#50

Post by Raheem » 5 years ago

Edited the post, check now.
He who fails to plan is planning to fail

czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 598
Joined: 7 years ago
Contact:

#51

Post by czirimbolo » 5 years ago

Ok its working, but its killing human with 1000hp too fast: 2 seconds and its over
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#52

Post by Raheem » 5 years ago

Change this line:
  • Code: Select all

    ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
To:
  • Code: Select all

    ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 0.1, DMG_GENERIC)
He who fails to plan is planning to fail

karan
Mod Tester
Mod Tester
India
Posts: 122
Joined: 6 years ago
Location: India
Contact:

#53

Post by karan » 5 years ago

plz add dmg for zms; like they must loose their HP 2000 per sec
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#54

Post by Raheem » 5 years ago

Increase the damage till you get what you need.
He who fails to plan is planning to fail

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#55

Post by sPe3doN » 5 years ago

karan wrote: 5 years ago plz add dmg for zms; like they must loose their HP 2000 per sec
try this i use it in my server

@raheem can you add to this msg for human STOP BLOCK!! MOVE -15 hp and msg for zombies show STOP BLOCK!! MOVE -2000hp :D

Code: Select all

#include <zombie_escape>

new Float:g_flPlayed[33]
 
new const szEntities[][] =
{
    "func_train",
    "func_vehicle",
    "func_tracktrain",
    "func_door"
}
 
new g_iPulsating = 0, Float:g_flLastBlock[33]
 
// Cvars
new g_pCvarBlockTime
 
public plugin_init()
{
    register_plugin("No Block", "1.0", "Raheem")
   
    // Cvars
    g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
 
    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))
		{
			PlaySound(id, "zombie_escape/move.wav")
			g_flPlayed[id] = get_gametime();
		}
    {
        if(g_flLastBlock[id] > flRefTime)
            return
       
        g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
           
		if (ze_is_user_zombie(id))
		{
			ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 2000.0, DMG_GENERIC)
		}

		else
		{
			ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 15.0, DMG_GENERIC)
		}

        client_print(id, print_center, "STOP BLOCK!! MOVE")
       
        switch (g_iPulsating)
        {
            case 0:
            {
                Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 10)
                g_iPulsating = 1
            }
            case 1:
            {
                Set_Rendering(id)
                g_iPulsating = 0
            }
        }
    }
}
Image

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#56

Post by Night Fury » 5 years ago

  1. #include <zombie_escape>
  2.  
  3. new Float:g_flPlayed[33]
  4.  
  5. new const szEntities[][] =
  6. {
  7.     "func_train",
  8.     "func_vehicle",
  9.     "func_tracktrain",
  10.     "func_door"
  11. }
  12.  
  13. new g_iPulsating = 0, Float:g_flLastBlock[33]
  14.  
  15. // Cvars
  16. new g_pCvarBlockTime
  17.  
  18. public plugin_init()
  19. {
  20.     register_plugin("No Block", "1.0", "Raheem")
  21.    
  22.     // Cvars
  23.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
  24.  
  25.     for (new i = 0; i <= charsmax(szEntities); i++)
  26.     {
  27.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
  28.     }
  29. }
  30.  
  31. public Fw_Blocked_Post(iEnt, id)
  32. {
  33.     new Float:flRefTime = get_gametime()
  34.    
  35.     if (is_user_alive(id) && pev_valid(iEnt))
  36.         {
  37.             PlaySound(id, "zombie_escape/move.wav")
  38.             g_flPlayed[id] = get_gametime();
  39.         }
  40.     {
  41.         if(g_flLastBlock[id] > flRefTime)
  42.             return
  43.        
  44.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
  45.            
  46.         if (ze_is_user_zombie(id))
  47.         {
  48.             client_print(id, print_center, "STOP BLOCKING!!! -2000HP")
  49.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 2000.0, DMG_GENERIC)
  50.         }
  51.  
  52.         else
  53.         {
  54.             client_print(id, print_center, "STOP BLOCKING!!! -15HP")
  55.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 15.0, DMG_GENERIC)
  56.         }
  57.  
  58.         client_print(id, print_center, "STOP BLOCK!! MOVE")
  59.        
  60.         switch (g_iPulsating)
  61.         {
  62.             case 0:
  63.             {
  64.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 10)
  65.                 g_iPulsating = 1
  66.             }
  67.             case 1:
  68.             {
  69.                 Set_Rendering(id)
  70.                 g_iPulsating = 0
  71.             }
  72.         }
  73.     }
  74. }
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
sPe3doN
Senior Member
Senior Member
Algeria
Posts: 258
Joined: 7 years ago
Contact:

#57

Post by sPe3doN » 5 years ago

Jack GamePlay wrote: 5 years ago
  1. #include <zombie_escape>
  2.  
  3. new Float:g_flPlayed[33]
  4.  
  5. new const szEntities[][] =
  6. {
  7.     "func_train",
  8.     "func_vehicle",
  9.     "func_tracktrain",
  10.     "func_door"
  11. }
  12.  
  13. new g_iPulsating = 0, Float:g_flLastBlock[33]
  14.  
  15. // Cvars
  16. new g_pCvarBlockTime
  17.  
  18. public plugin_init()
  19. {
  20.     register_plugin("No Block", "1.0", "Raheem")
  21.    
  22.     // Cvars
  23.     g_pCvarBlockTime = register_cvar("ze_block_time", "1.5")
  24.  
  25.     for (new i = 0; i <= charsmax(szEntities); i++)
  26.     {
  27.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
  28.     }
  29. }
  30.  
  31. public Fw_Blocked_Post(iEnt, id)
  32. {
  33.     new Float:flRefTime = get_gametime()
  34.    
  35.     if (is_user_alive(id) && pev_valid(iEnt))
  36.         {
  37.             PlaySound(id, "zombie_escape/move.wav")
  38.             g_flPlayed[id] = get_gametime();
  39.         }
  40.     {
  41.         if(g_flLastBlock[id] > flRefTime)
  42.             return
  43.        
  44.         g_flLastBlock[id] = flRefTime + get_pcvar_float(g_pCvarBlockTime)
  45.            
  46.         if (ze_is_user_zombie(id))
  47.         {
  48.             client_print(id, print_center, "STOP BLOCKING!!! -2000HP")
  49.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 2000.0, DMG_GENERIC)
  50.         }
  51.  
  52.         else
  53.         {
  54.             client_print(id, print_center, "STOP BLOCKING!!! -15HP")
  55.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 15.0, DMG_GENERIC)
  56.         }
  57.  
  58.         client_print(id, print_center, "STOP BLOCK!! MOVE")
  59.        
  60.         switch (g_iPulsating)
  61.         {
  62.             case 0:
  63.             {
  64.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 10)
  65.                 g_iPulsating = 1
  66.             }
  67.             case 1:
  68.             {
  69.                 Set_Rendering(id)
  70.                 g_iPulsating = 0
  71.             }
  72.         }
  73.     }
  74. }
i try this befor but dont work
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#58

Post by Raheem » 5 years ago

In latest ReHLDS, you can't block entities. They will not blocked anymore. So i consider this plugin useless.
He who fails to plan is planning to fail

User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

#59

Post by Night Fury » 5 years ago

Raheem wrote: 5 years ago In latest ReHLDS, you can't block entities. They will not blocked anymore. So i consider this plugin useless.
They blocked it by default?
Want your own mod edition? PM me.
Accepting private projects.
Discord: Fury#7469
Image

User avatar
Raheem
Mod Developer
Mod Developer
Posts: 2214
Joined: 7 years ago
Contact:

#60

Post by Raheem » 5 years ago

Jack GamePlay wrote: 5 years ago
Raheem wrote: 5 years ago In latest ReHLDS, you can't block entities. They will not blocked anymore. So i consider this plugin useless.
They blocked it by default?
I think yes, can't block entities anymore.
He who fails to plan is planning to fail

Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Who is online

Users browsing this forum: No registered users and 2 guests