Approved No Entities Block

Useless Stuffs, Spam ... etc
User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 576
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 47 times
Age: 19
Contact:

Re: No Entities Block

#21

Post by Jack GamePlay » 1 Year Ago

sam_bhosale4 wrote:
1 Year Ago
now working but need few changes! the ham is taking damage on Armour not health and also when the blocker stop blocking he keeps glowing need to terminate glow after block end
This is the new code with fixed-glow.
I don't remember how to fix the first problem. :P

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))
	{
		if (ze_is_user_zombie(id))
		{
			ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
		}
		else
		{
			ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 0.5, DMG_GENERIC)
		}

		client_print(id, print_center, "Stop BLOCK!!!")
		Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
	}
	else
	{
		Set_Rendering(id)
	}
}
Not interested in CS/Pawn anymore.
Accepting web projects.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1880
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#22

Post by Raheem » 1 Year Ago

Oh, I forget to reset the glow... Good jack.
sam_bhosale4 wrote:
1 Year Ago
suggestions-
1. set time for takedamage as 0.5 sec
2.glow is working good but player should glow only when blocking the entity once he stop glow should terminate!
3.if glow will blink every sec it would be nice :P
4.I wonder if we add human block in this..like when semiclip isnt added and players are inside the heli/entity if they come closer to each other and stick together the heli gets blocked, so in this case also the humans must get damage..
if these things comes into plugins it will be a great plugin of ze <3
and sorry bros(jacky and raheem) im giving you so much work but im just started in pawn amxx :(
1. Taking damage is set in the block event and this event is called many times in second i don't know how much in fact. Better to low the damage than we make time limit.
3. Hmm, What this means? Add glow and remove like pulsing ON, OFF, ON, OFF ?
4.Already if they blocked the heli they will be damaged. If not so i recommend using in that case the semiclip.
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:

#23

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
Oh, I forget to reset the glow... Good jack.
sam_bhosale4 wrote:
1 Year Ago
suggestions-
1. set time for takedamage as 0.5 sec
2.glow is working good but player should glow only when blocking the entity once he stop glow should terminate!
3.if glow will blink every sec it would be nice :P
4.I wonder if we add human block in this..like when semiclip isnt added and players are inside the heli/entity if they come closer to each other and stick together the heli gets blocked, so in this case also the humans must get damage..
if these things comes into plugins it will be a great plugin of ze <3
and sorry bros(jacky and raheem) im giving you so much work but im just started in pawn amxx :(
1. Taking damage is set in the block event and this event is called many times in second i don't know how much in fact. Better to low the damage than we make time limit.
3. Hmm, What this means? Add glow and remove like pulsing ON, OFF, ON, OFF ?
4.Already if they blocked the heli they will be damaged. If not so i recommend using in that case the semiclip.
ohh okay..
but its not damaging the hp its damaging the armour and when armour goes to 0 it does nothing :(
Glow - yeah pulsive on/off on/off :D
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
Jack GamePlay
Mod Developer
Mod Developer
Egypt
Posts: 576
Joined: 2 Years Ago
Location: Egypt
Has thanked: 34 times
Been thanked: 47 times
Age: 19
Contact:

#24

Post by Jack GamePlay » 1 Year Ago

Raheem wrote:
1 Year Ago
. Taking damage is set in the block event and this event is called many times in second i don't know how much in fact. Better to low the damage than we make time limit.
Put task with your specific time and with 'a' flag to be initialized only 1 time each time the function is called. :D
Not interested in CS/Pawn anymore.
Accepting web projects.

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1880
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#25

Post by Raheem » 1 Year Ago

I don't know how HamTakeDamage not effect health but anyway now i check if player have armor then i take it from him so it take from his damage. Also now the glow will be pulsating.
Jack GamePlay wrote:
1 Year Ago
Put task with your specific time and with 'a' flag to be initialized only 1 time each time the function is called. :D
We discussed this together so to low damage is better than this and simpler.

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
    12.  
    13. public plugin_init()
    14. {
    15.     register_plugin("No Block", "1.0", "Raheem")
    16.  
    17.     for (new i = 0; i <= charsmax(szEntities); i++)
    18.     {
    19.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    20.     }
    21. }
    22.  
    23. public Fw_Blocked_Post(iEnt, id)
    24. {
    25.     if (is_user_alive(id) && pev_valid(iEnt))
    26.     {
    27.         if (get_entvar(id, var_armorvalue) != 0.0)
    28.         {
    29.             set_entvar(id, var_armorvalue, 0.0)
    30.         }
    31.        
    32.         if (ze_is_user_zombie(id))
    33.         {
    34.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
    35.         }
    36.         else
    37.         {
    38.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 0.5, DMG_GENERIC)
    39.         }
    40.  
    41.         client_print(id, print_center, "Stop BLOCK!!!")
    42.        
    43.         switch (g_iPulsating)
    44.         {
    45.             case 0:
    46.             {
    47.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    48.                 g_iPulsating = 1
    49.             }
    50.             case 1:
    51.             {
    52.                 Set_Rendering(id)
    53.                 g_iPulsating = 0
    54.             }
    55.         }
    56.     }
    57.     else
    58.     {
    59.         Set_Rendering(id)
    60.     }
    61. }
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:

#26

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
I don't know how HamTakeDamage not effect health but anyway now i check if player have armor then i take it from him so it take from his damage. Also now the glow will be pulsating.
Jack GamePlay wrote:
1 Year Ago
Put task with your specific time and with 'a' flag to be initialized only 1 time each time the function is called. :D
We discussed this together so to low damage is better than this and simpler.

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
    12.  
    13. public plugin_init()
    14. {
    15.     register_plugin("No Block", "1.0", "Raheem")
    16.  
    17.     for (new i = 0; i <= charsmax(szEntities); i++)
    18.     {
    19.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    20.     }
    21. }
    22.  
    23. public Fw_Blocked_Post(iEnt, id)
    24. {
    25.     if (is_user_alive(id) && pev_valid(iEnt))
    26.     {
    27.         if (get_entvar(id, var_armorvalue) != 0.0)
    28.         {
    29.             set_entvar(id, var_armorvalue, 0.0)
    30.         }
    31.        
    32.         if (ze_is_user_zombie(id))
    33.         {
    34.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
    35.         }
    36.         else
    37.         {
    38.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 0.5, DMG_GENERIC)
    39.         }
    40.  
    41.         client_print(id, print_center, "Stop BLOCK!!!")
    42.        
    43.         switch (g_iPulsating)
    44.         {
    45.             case 0:
    46.             {
    47.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    48.                 g_iPulsating = 1
    49.             }
    50.             case 1:
    51.             {
    52.                 Set_Rendering(id)
    53.                 g_iPulsating = 0
    54.             }
    55.         }
    56.     }
    57.     else
    58.     {
    59.         Set_Rendering(id)
    60.     }
    61. }
not working :( plugin running but not working
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1880
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#27

Post by Raheem » 1 Year Ago

Ok, Here you are this one tested the problem was that we should make the damage >= 1.0 So HamTakeDamage works. Also pulsating working with no problems.

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
    12.  
    13. public plugin_init()
    14. {
    15.     register_plugin("No Block", "1.0", "Raheem")
    16.  
    17.     for (new i = 0; i <= charsmax(szEntities); i++)
    18.     {
    19.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    20.     }
    21. }
    22.  
    23. public Fw_Blocked_Post(iEnt, id)
    24. {
    25.     if (is_user_alive(id) && pev_valid(iEnt))
    26.     {
    27.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
    28.  
    29.         client_print(id, print_center, "Stop BLOCK!!!")
    30.        
    31.         switch (g_iPulsating)
    32.         {
    33.             case 0:
    34.             {
    35.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    36.                 g_iPulsating = 1
    37.             }
    38.             case 1:
    39.             {
    40.                 Set_Rendering(id)
    41.                 g_iPulsating = 0
    42.             }
    43.         }
    44.     }
    45.     else
    46.     {
    47.         Set_Rendering(id)
    48.     }
    49. }
If you can test this case and report me how it's going: If Escape-Leader blocks his glow will be like? Also after he unblock how it will be?
If you noticed any bug report.
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:

#28

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
Ok, Here you are this one tested the problem was that we should make the damage >= 1.0 So HamTakeDamage works. Also pulsating working with no problems.

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
    12.  
    13. public plugin_init()
    14. {
    15.     register_plugin("No Block", "1.0", "Raheem")
    16.  
    17.     for (new i = 0; i <= charsmax(szEntities); i++)
    18.     {
    19.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    20.     }
    21. }
    22.  
    23. public Fw_Blocked_Post(iEnt, id)
    24. {
    25.     if (is_user_alive(id) && pev_valid(iEnt))
    26.     {
    27.         ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
    28.  
    29.         client_print(id, print_center, "Stop BLOCK!!!")
    30.        
    31.         switch (g_iPulsating)
    32.         {
    33.             case 0:
    34.             {
    35.                 Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    36.                 g_iPulsating = 1
    37.             }
    38.             case 1:
    39.             {
    40.                 Set_Rendering(id)
    41.                 g_iPulsating = 0
    42.             }
    43.         }
    44.     }
    45.     else
    46.     {
    47.         Set_Rendering(id)
    48.     }
    49. }
If you can test this case and report me how it's going: If Escape-Leader blocks his glow will be like? Also after he unblock how it will be?
If you noticed any bug report.
now its working perfectly damaging! but not damaging per sec and that glow isnt pulsing nor terminating after block end
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

User avatar
Raheem
Mod Developer
Mod Developer
Egypt
Posts: 1880
Joined: 2 Years Ago
Location: Egypt
Has thanked: 31 times
Been thanked: 101 times
Age: 21
Contact:

#29

Post by Raheem » 1 Year Ago

HMM, Ok about the damage i tells you as when players block the entity the block function called many times in one second that's why the damage not every 1 seconds. For now i see damage 1 is good as example if Human health 1,000 it's good 1 damage per call. Second about the glow and you say it's not terminating and not pulsating.... It works for me but i'll try another idea soon i'll post you better code.
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:

#30

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
HMM, Ok about the damage i tells you as when players block the entity the block function called many times in one second that's why the damage not every 1 seconds. For now i see damage 1 is good as example if Human health 1,000 it's good 1 damage per call. Second about the glow and you say it's not terminating and not pulsating.... It works for me but i'll try another idea soon i'll post you better code.
ya its called more than 100 times haha.. in my server human hp is 150 and if someone blocks he instantly dies -_-
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest