Approved No Entities Block

Useless Stuffs, Spam ... etc
czirimbolo
Veteran Member
Veteran Member
Poland
Posts: 525
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

Re: No Entities Block

#41

Post by czirimbolo » 1 Year 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
Egypt
Posts: 1962
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#42

Post by Raheem » 1 Year 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!")
        }
    }
You don't know? Learn and you will know.

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

#43

Post by czirimbolo » 1 Year 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: 525
Joined: 2 Years Ago
Has thanked: 19 times
Been thanked: 1 time
Contact:

#44

Post by czirimbolo » 1 Year Ago

can someone make it working ?
Image

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

#45

Post by czirimbolo » 1 Year Ago

Raheem wrote:
1 Year 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
Egypt
Posts: 1962
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#46

Post by Raheem » 1 Year 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.
You don't know? Learn and you will know.

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

#47

Post by czirimbolo » 1 Year Ago

Ahh ok, the message is working but its unnoticeable really
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:

#48

Post by Raheem » 1 Year 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 on 06 Aug 2018, 11:14, edited 1 time in total.
Reason: Edited line 27: i --> id
You don't know? Learn and you will know.

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

#49

Post by czirimbolo » 1 Year 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
Egypt
Posts: 1962
Joined: 2 Years Ago
Location: Egypt
Has thanked: 32 times
Been thanked: 108 times
Age: 21
Contact:

#50

Post by Raheem » 1 Year Ago

Edited the post, check now.
You don't know? Learn and you will know.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest