Raised This Month: $7 Target: $400
 1% 

No fall damage (Eliminates damage from falling!!)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay        Approver:   Geesu (62)
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-01-2006 , 18:29   No fall damage (Eliminates damage from falling!!)
Reply With Quote #1

No Fall Damage v0.2 - by v3x

Description:
This plugin simply allows you to control whether or not there is damage from falling to the ground.

Cvars:
mp_falldamage 0
0 - No fall damage
1 - Fall damage


Required Modules:
- Engine

Changelog:
v0.2 - Fixed run time error(s)
v0.1 - Initial release

Note: You probably WILL have to put the cvar in a config file even though the default is 0! I do not know why it does this, sorry.

Credit to leakgfhp for some of the code.

Enjoy!
Attached Files
File Type: sma Get Plugin or Get Source (no_fall_damage.sma - 21318 views - 763 Bytes)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.

Last edited by v3x; 04-24-2008 at 22:10.
v3x is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 02-01-2006 , 18:34  
Reply With Quote #2

yet another good plugin based from a suggestion
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 02-01-2006 , 18:38  
Reply With Quote #3

Ohh...and i have a suggestion for this...

make it have a cvar where u can set the distance ppl can fall from without getting hurt (different from mp_falldamage).

IDK if its a good idea, just something I would like.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
eFrigid
Senior Member
Join Date: Aug 2005
Location: 3o3
Old 02-01-2006 , 18:57  
Reply With Quote #4

Nice!
__________________
lol
eFrigid is offline
Send a message via AIM to eFrigid Send a message via MSN to eFrigid Send a message via Skype™ to eFrigid
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 02-01-2006 , 19:51  
Reply With Quote #5

If I was on plugin team I would have approved it by now.
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-01-2006 , 23:12  
Reply With Quote #6

Thanks for the positive feedback!

Quote:
Originally Posted by SweatyBanana
Ohh...and i have a suggestion for this...

make it have a cvar where u can set the distance ppl can fall from without getting hurt (different from mp_falldamage).

IDK if its a good idea, just something I would like.
Find out the easiest way to get the fall distance and I shall implement it ;)
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 02-02-2006 , 07:17  
Reply With Quote #7

Code:
// max fall height implementation and reconnect runtime error fix #include <amxmodx> #include <engine> #define FALL_VELOCITY 350.0 #define MAX_FALL_HEIGHT 250 // player would get hurt if he falled over greater height new g_start_falling_height[33] new bool:g_height_reached[33]; public plugin_init() {   register_plugin("No fall damage", "0.1", "v3x");   if(!cvar_exists("mp_falldamage")) {     register_cvar("mp_falldamage", "0");   } } new bool:falling[33]; public client_PreThink(id) {   if(get_cvar_num("mp_falldamage") == 0 && is_user_alive(id)) {     if(entity_get_float(id, EV_FL_flFallVelocity) >= FALL_VELOCITY) {       if(g_height_reached[id])         return       new origin[3]       get_user_origin(id, origin)       if(!falling[id]) {         //server_print("DEBUG: [%d] Start falling at height [%d]", id, origin[2])         falling[id] = true         g_start_falling_height[id] = origin[2]       }       else if(g_start_falling_height[id] - origin[2] > MAX_FALL_HEIGHT) {         /*     server_print("DEBUG: [%d] MAX FALL HEIGHT is reached at height [%d]. Height difference [%d]",     id, origin[2], g_start_falling_height[id] - origin[2])         */     falling[id] = false;         g_height_reached[id] = true       }     } else {       falling[id] = false;       g_height_reached[id] = false     }   } } public client_PostThink(id) {   if(get_cvar_num("mp_falldamage") == 0) {     if(falling[id]) {       entity_set_int(id, EV_INT_watertype, -3);     }   } }
VEN is offline
[SS] Oxygen
Member
Join Date: Dec 2005
Location: Singapore
Old 02-02-2006 , 07:19  
Reply With Quote #8

Erm..Just one question..
Does it work for the worldspawn thing (or sometihng i dunno)

Like those maps where there is no floor or something
then there is the ending point at the bottom where you ab-so-lute-ly have to die.
Will you die there?
__________________
Click here to go the official SS Clan Forum.
+Karma
Thanks.
[SS] Oxygen is offline
Send a message via MSN to [SS] Oxygen
VEN
Veteran Member
Join Date: Jan 2005
Old 02-02-2006 , 07:21  
Reply With Quote #9

You'll die because of touching to trigger_hurt entity.
It's absolutely velocity independent.
VEN is offline
[SS] Oxygen
Member
Join Date: Dec 2005
Location: Singapore
Old 02-02-2006 , 07:22  
Reply With Quote #10

Just asking..these trigger_hurt entities are the destroyable by those entity destroying plugins?
__________________
Click here to go the official SS Clan Forum.
+Karma
Thanks.
[SS] Oxygen is offline
Send a message via MSN to [SS] Oxygen
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 00:51.


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