Raised This Month: $ Target: $400
 0% 

[REQ] Fall down damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 12-18-2011 , 15:50   [REQ] Fall down damage
Reply With Quote #1

I need a plugin that when you fall doens't take you health but shows how it should.

Last edited by Lolz0r; 06-15-2012 at 12:34.
Lolz0r is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-18-2011 , 16:50   Re: [REQ] Fall down damage + immune
Reply With Quote #2

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "No Fall Damage"

const DMG_FALL = (1<<5)      // Fell too far

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
RegisterHam(Ham_TakeDamage"player""CBasePlayer_TakeDamage"false)
}

public 
CBasePlayer_TakeDamage(idiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if( 
bitsDamageType == DMG_FALL )
    {
        
set_hudmessage(0100200, -1.0, -1.00_3.00.0010.001, -1)
        
show_hudmessage(id"You should have take %.0f damage"flDamage)
        
SetHamReturnInteger(0)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-18-2011 at 16:52.
ConnorMcLeod is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 12-18-2011 , 17:10   Re: [REQ] Fall down damage + immune
Reply With Quote #3

It's work, thanks!

EDIT: And only a block that? :

PHP Code:
#include <amxmodx>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "No Fall Damage"

const DMG_FALL = (1<<5)      // Fell too far

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
RegisterHam(Ham_TakeDamage"player""CBasePlayer_TakeDamage"false)
}

public 
CBasePlayer_TakeDamage(idiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if( 
bitsDamageType == DMG_FALL )
    {
        
SetHamReturnInteger(0)
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED


Last edited by Lolz0r; 12-18-2011 at 17:36.
Lolz0r is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-18-2011 , 18:06   Re: [REQ] Fall down damage + immune
Reply With Quote #4

yep
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 12-19-2011 , 08:14   Re: [REQ] Fall down damage + immune
Reply With Quote #5

Okey, thanks again.
Lolz0r 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 20:55.


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