Approved No Entities Block

Useless Stuffs, Spam ... etc
User avatar
Night Fury
Mod Developer
Mod Developer
Posts: 677
Joined: 7 years ago
Contact:

No Entities Block

#1

Post by Night Fury » 6 years ago

No Entities Block

Description:
  • I'm here with a new plugin which will block players from blocking things such as train, car, plane, door, etc..
    Plugin was tested on public server.
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.         new Float:flVelocity[3]
    26.  
    27.         velocity_by_aim(id, 550, flVelocity)
    28.  
    29.         flVelocity[0] += 20.0
    30.         flVelocity[1] += 20.0
    31.         flVelocity[2] += 20.0
    32.  
    33.         set_entvar(id, var_velocity, flVelocity)
    34.     }
    35. }
Downloads:
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:

#2

Post by Raheem » 6 years ago

Great job....... So nice. Missing fix for years and it's finally out....
He who fails to plan is planning to fail

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#3

Post by johnnysins2000 » 6 years ago

Thank You very Much Jack

I will try this plugin Now :)
Nobody Is That Busy If They Make Time :roll:

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#4

Post by sam_bhosale4 » 6 years ago

Jack GamePlay wrote: 6 years ago
No Entities Block

Description:
  • I'm here with a new plugin which will block players from blocking things such as train, car, plane, door, etc..
    Plugin was tested on public server.
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("[ZE] Addons: No Block", "1.0", "Jack GamePlay")
    14.     register_forward(FM_Touch, "Fw_Touch")
    15. }
    16.  
    17. public Fw_Touch(iEnt, id)
    18. {
    19.     // Not alive or Wrong entity
    20.     if(!is_user_alive(id) || !pev_valid(iEnt))
    21.         return FMRES_IGNORED    // Block below code
    22.        
    23.     new szClassName[32] // Variable to store entity's name.
    24.     pev(iEnt, pev_classname, szClassName, charsmax(szClassName))
    25.    
    26.     // Loop though all the 2d array
    27.     for(new i = 1; i <= charsmax(szEntities); i++)
    28.     {
    29.         // If the same...
    30.         if (equal(szClassName, szEntities[i]))
    31.         {
    32.             // Block blocking
    33.             set_pev(id, pev_solid, SOLID_TRIGGER)
    34.             return FMRES_IGNORED
    35.         }
    36.     }
    37.     return FMRES_IGNORED
    38. }
Downloads:
  • [ZE] No Block.zip
Very well done jack!
Ill soon test it on my server! :)
+like +karma
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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

#5

Post by Raheem » 6 years ago

Don't use this plugin for now till it be fixed. Locked Temporarily.
He who fails to plan is planning to fail

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

#6

Post by Night Fury » 6 years ago

We have tried to fix crash & make the plugin better but we have failed.
This topic will be trashed.
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:

#7

Post by Raheem » 6 years ago

Fixed, While i was reading HAM hooks i found a function that can hook the block but it's too late to block the event itself so i do good thing for blockers... Try it.
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#8

Post by sam_bhosale4 » 6 years ago

Raheem wrote: 6 years ago Fixed, While i was reading HAM hooks i found a function that can hook the block but it's too late to block the event itself so i do good thing for blockers... Try it.
cool ill try!
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

johnnysins2000
Veteran Member
Veteran Member
Paraguay
Posts: 678
Joined: 7 years ago
Location: Paraguay
Contact:

#9

Post by johnnysins2000 » 6 years ago

sam_bhosale4 wrote: 6 years ago
Raheem wrote: 6 years ago Fixed, While i was reading HAM hooks i found a function that can hook the block but it's too late to block the event itself so i do good thing for blockers... Try it.
cool ill try!
good after trying tell me what does it do
Nobody Is That Busy If They Make Time :roll:

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#10

Post by sam_bhosale4 » 6 years ago

acc to me it must give few amount of damage to the one who is blocking the entity otherwise he will die after few sec! lets see :D
-=SeRious-GaminG|Zombie Escape[Alien vs. Predator]|Asia=-
206.189.132.169:40000
Image

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

#11

Post by Raheem » 6 years 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. }
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#12

Post by sam_bhosale4 » 6 years ago

Raheem wrote: 6 years 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: 7 years ago
Location: INDIA
Contact:

#13

Post by sam_bhosale4 » 6 years 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: 7 years ago
Location: INDIA
Contact:

#14

Post by sam_bhosale4 » 6 years ago

Raheem wrote: 6 years 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: 7 years ago
Location: INDIA
Contact:

#15

Post by sam_bhosale4 » 6 years 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
Posts: 2214
Joined: 7 years ago
Contact:

#16

Post by Raheem » 6 years 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 6 years ago, edited 1 time in total.
Reason: i --> id
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#17

Post by sam_bhosale4 » 6 years 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
Posts: 2214
Joined: 7 years ago
Contact:

#18

Post by Raheem » 6 years ago

Check code again.
He who fails to plan is planning to fail

User avatar
sam_bhosale4
Mod Tester
Mod Tester
India
Posts: 109
Joined: 7 years ago
Location: INDIA
Contact:

#19

Post by sam_bhosale4 » 6 years 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: 7 years ago
Location: INDIA
Contact:

#20

Post by sam_bhosale4 » 6 years 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

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: Yandex [Bot] and 0 guests