Approved No Entities Block

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

Re: No Entities Block

#11

Post by Raheem » 1 Year Ago

Good idea, Here it's blocker if he is human he will get small damage but if zombie it will be high + print him message in center "Stop BLOCKING!!!".

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. public plugin_init()
    12. {
    13.     register_plugin("No Block", "1.0", "Raheem")
    14.  
    15.     for (new i = 0; i <= charsmax(szEntities); i++)
    16.     {
    17.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    18.     }
    19. }
    20.  
    21. public Fw_Blocked_Post(iEnt, id)
    22. {
    23.     if (is_user_alive(id) && pev_valid(iEnt))
    24.     {
    25.         if (ze_is_user_zombie(id))
    26.         {
    27.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 50.0, DMG_GENERIC)
    28.         }
    29.         else
    30.         {
    31.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 5.0, DMG_GENERIC)
    32.         }
    33.        
    34.         client_print(id, print_center, "Stop BLOCK!!!")
    35.     }
    36. }
These users thanked the author Raheem for the post:
sam_bhosale4 (1 Year Ago)
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:

#12

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
Good idea, Here it's blocker if he is human he will get small damage but if zombie it will be high + print him message in center "Stop BLOCKING!!!".

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. public plugin_init()
    12. {
    13.     register_plugin("No Block", "1.0", "Raheem")
    14.  
    15.     for (new i = 0; i <= charsmax(szEntities); i++)
    16.     {
    17.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    18.     }
    19. }
    20.  
    21. public Fw_Blocked_Post(iEnt, id)
    22. {
    23.     if (is_user_alive(id) && pev_valid(iEnt))
    24.     {
    25.         if (ze_is_user_zombie(id))
    26.         {
    27.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 50.0, DMG_GENERIC)
    28.         }
    29.         else
    30.         {
    31.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 5.0, DMG_GENERIC)
    32.         }
    33.        
    34.         client_print(id, print_center, "Stop BLOCK!!!")
    35.     }
    36. }
yo thanks raheem! have you tested it? working good? :D
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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:

#13

Post by sam_bhosale4 » 1 Year Ago

also you have added
"func_train",
"func_vehicle",
"func_tracktrain",
"func_door"
these entities few are remaining like heli, that slider, boat,ship etc etc :P
add these entities also :D
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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:

#14

Post by sam_bhosale4 » 1 Year Ago

Raheem wrote:
1 Year Ago
Good idea, Here it's blocker if he is human he will get small damage but if zombie it will be high + print him message in center "Stop BLOCKING!!!".

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. public plugin_init()
    12. {
    13.     register_plugin("No Block", "1.0", "Raheem")
    14.  
    15.     for (new i = 0; i <= charsmax(szEntities); i++)
    16.     {
    17.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    18.     }
    19. }
    20.  
    21. public Fw_Blocked_Post(iEnt, id)
    22. {
    23.     if (is_user_alive(id) && pev_valid(iEnt))
    24.     {
    25.         if (ze_is_user_zombie(id))
    26.         {
    27.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 50.0, DMG_GENERIC)
    28.         }
    29.         else
    30.         {
    31.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 5.0, DMG_GENERIC)
    32.         }
    33.        
    34.         client_print(id, print_center, "Stop BLOCK!!!")
    35.     }
    36. }
also please add a white glow where when the blocker gets damage he will glow white so admins can understand who is blocking! glow will be helpful for admins.. :D
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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:

#15

Post by sam_bhosale4 » 1 Year Ago

just tested it! its not giving any kind of damage and message instead it instant kills the player :( doesnt even shows the mssg!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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

#16

Post by Raheem » 1 Year Ago

That's because the damage is too high so zombies killed fast or humans. You need to reduce damage to fit your humans/zombies HP from:
  • ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 50.0, DMG_GENERIC)
    ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 5.0, DMG_GENERIC)
And about glow it's good idea also, So try this:
    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. public plugin_init()
    12. {
    13.     register_plugin("No Block", "1.0", "Raheem")
    14.  
    15.     for (new i = 0; i <= charsmax(szEntities); i++)
    16.     {
    17.         RegisterHam(Ham_Blocked, szEntities[i], "Fw_Blocked_Post", 1)
    18.     }
    19. }
    20.  
    21. public Fw_Blocked_Post(iEnt, id)
    22. {
    23.     if (is_user_alive(id) && pev_valid(iEnt))
    24.     {
    25.         if (ze_is_user_zombie(id))
    26.         {
    27.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 1.0, DMG_GENERIC)
    28.         }
    29.         else
    30.         {
    31.             ExecuteHamB(Ham_TakeDamage, id, iEnt, iEnt, 0.5, DMG_GENERIC)
    32.         }
    33.        
    34.         client_print(id, print_center, "Stop BLOCK!!!")
    35.         Set_Rendering(id, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40)
    36.     }
    37. }
Change the glow color from: Set_Rendering(i, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 40) It's on RGB format.

And about you say there is another entities that moves like helicopter it will work also with them bro as these helicopters is one of these entities in the plugin. If you see in one map when you block a helicopter the plugin not works report it bro.
Last edited by Raheem on 21 Sep 2017, 19:39, edited 1 time in total.
Reason: i --> id
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:

#17

Post by sam_bhosale4 » 1 Year Ago

getting many errors for Set_Rendering and when compiling without that it compiles without errors but now it doesnt work! no damage no mssg!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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

#18

Post by Raheem » 1 Year Ago

Check code again.
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:

#19

Post by sam_bhosale4 » 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
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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:

#20

Post by sam_bhosale4 » 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 :(
-=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