Raised This Month: $ Target: $400
 0% 

Anti Bomb Self


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fitries
Junior Member
Join Date: Jan 2014
Old 01-24-2014 , 10:00   Re: Anti Bomb Self
Reply With Quote #1

Quote:
Originally Posted by yokomo View Post
If you are using CZBot then you need to RegisterHamFromEntity.
Thanks.

Quote:
Originally Posted by Blizzard_87 View Post
that is a whole new request.. you can only ask one question per thread since you already have the answer to your titled request you need to make another thread.
No, I will spam whole thread if i do that because i have many question to ask.
Fitries is offline
Fitries
Junior Member
Join Date: Jan 2014
Old 01-24-2014 , 10:05   Re: Anti Bomb Self
Reply With Quote #2

Quote:
Originally Posted by yokomo View Post
This should work, to change damage multiplier use cvar "he_damage_multi".

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

const DMG_HEGRENADE = (1<<24)
new 
CvrNadeDamage

public plugin_init()
{
    
register_plugin("No HE SelfDamage""0.0.1""wbyokomo")
    
    
RegisterHam(Ham_TakeDamage"player""OnTakeDamage")
    
    
CvrNadeDamage register_cvar("he_damage_multi""8.0")
}

public 
OnTakeDamage(victiminflictorattackerFloat:damagedamagetype)
{
    if(!
is_user_connected(attacker)) return HAM_IGNORED;
    if(
attacker == victim) return HAM_SUPERCEDE;
    
    if(
damagetype DMG_HEGRENADE)
    {
        
damage *= get_pcvar_float(CvrNadeDamage)
        
SetHamParamFloat(4damage)
        return 
HAM_IGNORED;
    }
    
    return 
HAM_IGNORED;

If you are using CZBot then you need to RegisterHamFromEntity.
i used CZBot, how to make it ?

#sorryimnewbiehere
Fitries 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 10:13.


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