Raised This Month: $ Target: $400
 0% 

Anti Dmg Kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DIREKTOR
Senior Member
Join Date: Jan 2010
Location: On server
Old 03-25-2012 , 06:36   Anti Dmg Kill
Reply With Quote #1

Hi , can anyone make me plugin that will do this

If player takes more than X amount of Fall Damage , he is not able to do any dmg (with his knife) for Y time (seconds).
__________________
Quote:
Originally Posted by KadiR View Post
Learn the fucking server rules you idiot.
DIREKTOR is offline
Send a message via MSN to DIREKTOR
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-25-2012 , 11:30   Re: Anti Dmg Kill
Reply With Quote #2

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

#define VERSION "0.0.1"
#define PLUGIN ""

#define MIN_DMG_NAME "min_fall_damage"
#define MIN_DMG_VALUE "20"

#define DMG_DELAY_NAME "damage_delay_factor"
#define DMG_DELAY_VALUE "0.5"

#define m_rgpPlayerItems_Slot3 370

#define XO_WEAPON 4
#define m_flNextPrimaryAttack 46
#define m_flNextSecondaryAttack 47

new pcvarMinDmgpcvarDelayFactor

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")
    
RegisterHam(Ham_TakeDamage"player""CBasePlayer_TakeDamage_P"true)
    
pcvarMinDmg register_cvar(MIN_DMG_NAMEMIN_DMG_VALUE)
    
pcvarDelayFactor register_cvar(DMG_DELAY_NAMEDMG_DELAY_VALUE)
}

public 
CBasePlayer_TakeDamage(idiInflictoriAttackerFloat:flDamagebitsDamageType)
{
    if( 
bitsDamageType DMG_FALL )
    {
        new 
Float:dmg_take
        pev
(idpev_dmg_takedmg_take)
        if( 
dmg_take >= get_pcvar_float(pcvarMinDmg) )
        {
            new 
iKnife get_pdata_cbase(idm_rgpPlayerItems_Slot3)
            if( 
iKnife )
            {
                new 
Float:flDelay get_pcvar_float(pcvarDelayFactor) * dmg_take
                set_pdata_float
(iKnifem_flNextPrimaryAttackflDelayXO_WEAPON)
                
set_pdata_float(iKnifem_flNextSecondaryAttackflDelayXO_WEAPON)
            }
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Old 03-25-2012, 17:34
DIREKTOR
This message has been deleted by DIREKTOR. Reason: nextpost
DIREKTOR
Senior Member
Join Date: Jan 2010
Location: On server
Old 03-25-2012 , 17:49   Re: Anti Dmg Kill
Reply With Quote #3

Thanks very much , ill test it soon as possible , but can you make me another plugin so i dont have to open new thread please .Its about knife damage , i want that knife dose 65 dmg for each hitbox , head , back , foot ...
__________________
Quote:
Originally Posted by KadiR View Post
Learn the fucking server rules you idiot.
DIREKTOR is offline
Send a message via MSN to DIREKTOR
lazarev
Veteran Member
Join Date: Sep 2008
Old 04-08-2012 , 04:32   Re: Anti Dmg Kill
Reply With Quote #4

Quote:
Originally Posted by DIREKTOR View Post
i want that knife dose 65 dmg for each hitbox , head , back , foot ...
hook traceattack

if get_user_weapon(attacker) == CSW_KNIFE && buttons&IN_ATTACK2 && !buttons&IN_ATTACK
set_tr2(tr, TR_pHit, HIT_LEFTARM)
lazarev is offline
Reply



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 08:56.


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