Raised This Month: $12 Target: $400
 3% 

[REQ] No fall damage on certain area


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
z0mb1el0v3r
Senior Member
Join Date: May 2011
Old 12-09-2018 , 08:49   [REQ] No fall damage on certain area
Reply With Quote #1

I never seen anyone made this. So the plugin that I'm requesting has like a neat no-fall-damage spot maker command just like how Info Zone or Walkguard works where admin can use to manually edit & add at wherever the location so desire in the map to have no-fall-damage in the area. Helps me a lot.

Last edited by z0mb1el0v3r; 12-11-2018 at 21:34. Reason: give better explaination
z0mb1el0v3r is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 12-11-2018 , 04:38   Re: [REQ] No fall damage on certain area
Reply With Quote #2

Attached Files
File Type: sma Get Plugin or Get Source (untested.sma - 285 views - 10.2 KB)
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
z0mb1el0v3r
Senior Member
Join Date: May 2011
Old 12-11-2018 , 10:39   Re: [REQ] No fall damage on certain area
Reply With Quote #3

Quote:
Originally Posted by raizo11 View Post
You didn't understand what I want
I need no-FALL-damage only. I allow any other type of damage events. There are a few no-fall-damage plugins available but none of them have the ability to customize and apply the no-fall-damage for specific spots of the map only, which is what I want.
z0mb1el0v3r is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 12-11-2018 , 14:19   Re: [REQ] No fall damage on certain area
Reply With Quote #4

must to explain more. becouse i dont undestand what you want
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-11-2018 , 18:38   Re: [REQ] No fall damage on certain area
Reply With Quote #5

How do you want to define these no fall damage locations? Something simple like walking to the area and using a command would be simple. That would define say an X by X unit square area as a no fall damage zone. These can be saved and re-loaded on map change for the specific map.
__________________

Last edited by Bugsy; 12-11-2018 at 18:40.
Bugsy is offline
z0mb1el0v3r
Senior Member
Join Date: May 2011
Old 12-11-2018 , 21:24   Re: [REQ] No fall damage on certain area
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
How do you want to define these no fall damage locations? Something simple like walking to the area and using a command would be simple. That would define say an X by X unit square area as a no fall damage zone. These can be saved and re-loaded on map change for the specific map.
Exactly, similar method from those plugins I pointed out in first post. I'll be really glad if you can make it because I hate falling down and taking damage from de_vegas elevator area for instance. lol
z0mb1el0v3r is offline
raizo11
BANNED
Join Date: Dec 2013
Location: https://t.me/pump_upp
Old 12-12-2018 , 03:05   Re: [REQ] No fall damage on certain area
Reply With Quote #7

what i posted he didn’t do this?
raizo11 is offline
Send a message via ICQ to raizo11 Send a message via AIM to raizo11 Send a message via MSN to raizo11 Send a message via Yahoo to raizo11 Send a message via Skype™ to raizo11
z0mb1el0v3r
Senior Member
Join Date: May 2011
Old 12-12-2018 , 08:08   Re: [REQ] No fall damage on certain area
Reply With Quote #8

Quote:
Originally Posted by raizo11 View Post
what i posted he didn’t do this?
I tried it and didn't work at all... still got damage nonetheless after applying the zone . Also, that plugin seems to block all kind of damage too which fails my request already.



Edit: It's this one but with zone editor and not wanting it to be 24/7 no fall damage PERIOD.

Last edited by z0mb1el0v3r; 12-12-2018 at 08:16. Reason: add more info
z0mb1el0v3r is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 12-12-2018 , 18:12   Re: [REQ] No fall damage on certain area
Reply With Quote #9

Quote:
Originally Posted by raizo11 View Post
what i posted he didn’t do this?
Your TakeDamage code is wrong.

1. Damage passed in this hook does not take into consideration armor that the player may have. To determine the actual loss in hp, you need to hook TakeDamage post and check pev_dmg_take.
2. You have a condition checking if the damage exceeds his health before you supercede the damage. He wants to always block fall damage within the zone, not only if it would result in death.
3. Why are you calling Ham_CS_RoundRespawn? The intention is to prevent the damage, not die and then re-spawn. You return HAM_SUPERCEDE immediately after which doesn't make sense.
4. You should only execute the loop through zones if the damage type is fall damage, not execute the loop and then redundantly check if it was fall damage for each zone.

OP try this:
PHP Code:
public Player_TakeDamage(idiInflictoriAttackerFloatfDamagebitsDamageType
{
    if ( 
bitsDamageType DMG_FALL && is_user_aliveid ) ) 
    {
        for(new 
ii<g_iZonesNumi++)
        {
            if( 
is_user_in_zone(idi) )
            {
                return 
HAM_SUPERCEDE;
            }
        }
    }
    return 
HAM_IGNORED;

__________________

Last edited by Bugsy; 12-12-2018 at 18:15.
Bugsy is offline
z0mb1el0v3r
Senior Member
Join Date: May 2011
Old 12-13-2018 , 09:35   Re: [REQ] No fall damage on certain area
Reply With Quote #10

Quote:
Originally Posted by Bugsy View Post
Your TakeDamage code is wrong.

1. Damage passed in this hook does not take into consideration armor that the player may have. To determine the actual loss in hp, you need to hook TakeDamage post and check pev_dmg_take.
2. You have a condition checking if the damage exceeds his health before you supercede the damage. He wants to always block fall damage within the zone, not only if it would result in death.
3. Why are you calling Ham_CS_RoundRespawn? The intention is to prevent the damage, not die and then re-spawn. You return HAM_SUPERCEDE immediately after which doesn't make sense.
4. You should only execute the loop through zones if the damage type is fall damage, not execute the loop and then redundantly check if it was fall damage for each zone.

OP try this:
PHP Code:
public Player_TakeDamage(idiInflictoriAttackerFloatfDamagebitsDamageType
{
    if ( 
bitsDamageType DMG_FALL && is_user_aliveid ) ) 
    {
        for(new 
ii<g_iZonesNumi++)
        {
            if( 
is_user_in_zone(idi) )
            {
                return 
HAM_SUPERCEDE;
            }
        }
    }
    return 
HAM_IGNORED;

Okay that worked. But it doesn't saved the location after map restart though. It shows that it is in .ini file but not in-game.
z0mb1el0v3r is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode