AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [ANY?] No FallDamage (V0.6.3, 03.10.2020) (https://forums.alliedmods.net/showthread.php?t=171754)

Impact123 11-10-2011 13:45

[ANY?] No FallDamage (V0.6.3, 03.10.2020)
 
3 Attachment(s)
Description
I know there are at least 2 plugins that do the same.
The first plugin is not maintained by its author since it's more a snippet from the forums than a script and it does not handle late-loads.
The other one uses an extension that is not supported anymore.


CVAR/Command list
  • sm_nofalldamage_enabled (Default: 1)
    • - Enable/disable FallDamage
  • sm_nofalldamage_teamfilter (Default: 0)
    • Team that should be protected from falldamage, 0 = any, 2 = RED, 3 = BLUE
  • sm_nofalldamage_clientfilter (Default: 0)
    • Clients that should be protected from falldamage, 0 = any, 1 = Only Admins
  • sm_nofalldamage_version
    • Plugin version (not changeable)
Installation
  • Put "nofalldamage_sdkhooks.smx" in your "../addons/sourcemod/plugins" directory.
  • Add the above convars that you want to modify in your server.cfg, and edit to your purposes.
  • Refresh your plugin list or load the plugin.
Requirements

CHANGELOG



Links
Servers with this plugin


Notes
This plugin should work in any game that has SdkHooks support.
Plugin will not compile on the forums due the dependence of SdkHooks
Teamfiltercheck comes before the clientfiltercheck
Clientfilter used the generic flag to determine admins and makes use of the command override sm_nofalldamage_immune, look here for information on how you can use this.

Mitchell 03-09-2012 17:04

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
i kinda don't understand how this works, i get the getting of the filter, and stuff, but why does it check if the filter is on the map?

Impact123 03-09-2012 20:56

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
Well, because some maps eliminate the falldamage by theirselfes, i had to check if they do so.
Unfortunately the check is not 100% sure.

Yours sincerely
Impact

Mr. Zero 03-10-2012 13:28

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
One thing I just quickly noted is that you checked IsClientConnected && IsClientInGame.

For a client to be in game they must be connected, so you can cut the IsClientConnected out if you are checking for IsClientInGame.

Have you checked that the hill in Dark Carnival map 1 (L4D2) doesn't trigger the fall damage event?
The hill uses a trigger_multiple with OnStartTouch !activator IgnoreFallDamageWithoutReset 10. Not sure if stops the player_falldamage event.

Impact123 03-10-2012 14:43

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
This was my first plugin, there are some things i would critique by another developer, but i do not plan to update it.
As written, i only tested this with CS:S.

Yours sincerely
Impact

bdmj 04-21-2012 15:48

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
Is there a way to make this plugin work for the admin only?

Impact123 04-22-2012 06:55

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
Of course, but i think that would be really unfair to other players.

Yours sincerely
Impact

bdmj 04-29-2012 11:42

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
Well yeah...but can you please tell me how?

Impact123 04-29-2012 22:29

Re: [CS:S|L4D|L4D2] No FallDamage (V0.1.1, 10.11.2011)
 
Normally you would create an variable for every player and save if he is admin in it.
In the Eventcalback then check if that variable is set to xyz, else do nothing.
Another thing you can do is, check if he is admin every time an player falls, you can use this for it.
I doubt this helps you, but this would be the way to go.

Yours sincerely
Impact

Impact123 05-09-2012 21:12

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
Well, the mp_falldamage event didn't cut it.
I've rewrote the whole plugin, it now uses SdkHooks and should work on any game that SdkHooks has support for.
It now also recognises lateloads.

Yours sincerely
Impact

zloykif 05-13-2012 11:21

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
can u add team filter?

Impact123 05-13-2012 19:30

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
I can add whatever you want it if makes sense to add it.
Do you mean something like this?
Code:

sm_noblock_teamfilter "0"
  - Team that should have falldamage protection, 0 = any

Yours sincerely
Impact

minimoney1 05-14-2012 00:51

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
Quote:

Originally Posted by Impact123 (Post 1708514)
Team that should have noblock enabled, 0 = any, 2 = RED, 3 = BLUE

No fall damage you mean?

zloykif 05-14-2012 00:58

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
Quote:

Do you mean something like this?
guess so, i need nofalldmg only for terrorist team (CS:S deathrun mod)

Impact123 05-14-2012 01:02

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
Quote:

Originally Posted by minimoney1 (Post 1708574)
No fall damage you mean?

Oh, thanks for the hint, i've fixed it in my repo :)

Quote:

Originally Posted by zloykif (Post 1708576)
guess so, i need nofalldmg only for terrorist team (CS:S deathrun mod)

Read my last post, i've already done it and awaiting feedback.

Yours sincerely
Impact

zloykif 05-14-2012 09:21

Re: [ANY?] No FallDamage (V0.2, 10.05.2012)
 
Quote:

and awaiting feedback
sm_nofalldamage_teamfilter 2
work fine for me

Impact123 05-14-2012 21:04

Re: [ANY?] No FallDamage (V0.3, 15.05.2012)
 
Update v0.3

Okay, i have added the last 2 requests from you guys.
Code:

* 15.05.2012
- Added teamfilter
- Added clientfilter

See first post for more information.

Yours sincerely
Impact

Impact123 05-15-2012 22:14

Re: [ANY?] No FallDamage (V0.3, 15.05.2012)
 
Update v0.4

Code:

* 15.05.2012
Added support for Customflags
Added caching for:
 - Is admin
 - is bot
 
 Added a lateload hook to re add the cachingflags for clients
 Added a disconnect hook to purge the flags

Yours sincerely
Impact

Impact123 08-06-2012 05:00

Re: [ANY?] No FallDamage (V0.5, 06.08.2012)
 
Update v0.5
Code:

* 06.08.2012 - v0.5
- Removed customflags depency
- Fixed the unhook on OnClientDisconnect
- Fixed the IsClientValid Stock
- Added support for updater

Yours sincerely
Impact

thetwistedpanda 08-15-2012 13:44

Re: [ANY?] No FallDamage (V0.5, 06.08.2012)
 
Review for Approval
Status: Approved
  • There's no real issue with your code, but dear god man, the spaces! The spaces are everywhere! The only thing I'd recommend is removing SDKUnhook, as it's called automatically when a client disconnects.
  • You may also want to clean up your previous posts with previous versions if your latest one in the first post is the correct one.

Impact123 08-15-2012 20:56

Re: [ANY?] No FallDamage (V0.5, 06.08.2012)
 
Thanks!

Well, i really like to have my scripts as readable as possible, i think spacing/seperation has a big part here.
I've removed those posts, and also removed the unhook in the plugin, i will push it with the next update.

Yours sincerely
Impact

Sleiva 08-23-2012 06:09

Re: [ANY?] No FallDamage (V0.5, 06.08.2012)
 
Please update this plugin because css v73 dosen't work this plugin and those another plugin nofalldamage dosen't work too

Impact123 08-23-2012 17:59

Re: [ANY?] No FallDamage (V0.5, 06.08.2012)
 
Update your SdkHooks gamedata, plugin works fine after that ;)

Yours sincerely
Impact

Impact123 08-30-2012 05:01

Re: [ANY?] No FallDamage (V0.6, 30.08.2012)
 
Update v0.6
Code:

* 30.08.2012 - v0.6
- Removed the unhook on OnClientDisconnect
- Removed the replicated flag of the versioncvar

Yours sincerely
Impact

Impact123 09-02-2012 17:36

Re: [ANY?] No FallDamage (V0.6.1, 02.09.2012)
 
Update v0.6.1
Code:

* 02.09.2012 - v0.6.1
- Changed Version to fix an error with the automatic updater on devbuilds

Yours sincerely
Impact

Impact123 09-21-2012 11:08

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Update v0.6.2
Code:

* 21.09.2012 - v0.6.2
- Removed unneeded functioncall on lateload
- Removed unneeded botcheck in damagehook

This is just an little performance update, nothing important.

Yours sincerely
Impact

Mr. Star 01-15-2013 13:53

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Please fix: Plugin failed to compile. Fix the plugin link PLEASE!!!

Impact123 01-15-2013 16:05

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
The compiled version is attached too, you should be more attentive next time.

Yours sincerely
Impact

minimoney1 01-15-2013 16:06

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Quote:

Originally Posted by Mr. Star (Post 1873952)
Please fix: Plugin failed to compile. Fix the plugin link PLEASE!!!

The compiled version is already attached to the first post.

crilleaz 05-17-2013 08:24

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
For some strange reason "sm_nofalldamage_clientfilter 1" does not work in the server.cfg.

iTzToniiZ 01-20-2014 20:57

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Could you give me a link to the plugin? It doesn't work when i click on it.

Impact123 01-21-2014 03:45

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Look closely, there already is an compiled version attached.

T4N0 02-17-2014 13:33

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Thanks, working perfectly!!

Blahenzi 11-25-2014 20:44

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
How hard would it be to make it work per player?
Like, sm_nofalldamage userid/player name

Impact123 11-26-2014 03:16

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Not that hard, but I'm not sure how that would work together with the other filters.
Why exactly do you need this toggle?

Blahenzi 11-26-2014 07:29

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
It would be super useful for class-based gamemodes, such as WCS or RPGs.

Edit: Is it possible to only have the userid/player name as a filter?
I'm pretty new to SourcePawn, if it's not much of a bother, could you just point me in the right direction for implementing a userid filter?

Impact123 11-26-2014 09:22

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
1 Attachment(s)
This was quickly modified to your needs and not tested at all, take it as the point in the right direction you asked for.
I stripped all the features and added a command to toggle nofalldamage for specific clients.
Like i said, i did not test this, but you should be able to target people like this.

For example:
Code:

sm_nofalldamage @all

Phaiz 11-27-2014 08:25

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Is it possible to modify the code to use a different admin flag? It looks like the @admins option would include anyone with the "B" flag for generic admin but I don't want to confuse people by showing donors on the /admins list. Perhaps flag "A" ?

Impact123 11-27-2014 13:08

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
I don't work often with the more complex player targeting functions, but using a custom filter with this should work.

Blahenzi 11-27-2014 18:23

Re: [ANY?] No FallDamage (V0.6.2, 21.09.2012)
 
Thank you for the mod, Impact123!


All times are GMT -4. The time now is 08:05.

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