Raised This Month: $ Target: $400
 0% 

Put Ham_TookDamage in a function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
TitANious
Veteran Member
Join Date: Feb 2009
Location: Denmark
Old 06-27-2009 , 13:33   Put Ham_TookDamage in a function
Reply With Quote #1

I need to get Ham_TookDamage activated ONLY if they bought from a menu.
PHP Code:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>

public plugin_init( )
{
    
register_plugin"Damage","1.0","TitANious" )

    
RegisterHamHam_TakeDamage"player""Player_TookDamage" )
}

public 
Player_TookDamageiVictimiInflictoriAttackerFloat:DamageiDamage_type )
{
    if( !
is_user_aliveiAttacker ) || cs_get_user_teamiAttacker ) == cs_get_user_teamiVictim ) )
        return 
PLUGIN_HANDLED;
        
    if( ( 
iDamage_type & ( 1<<) ) )
    {
        
set_user_healthiAttackerfloatroundFloat:get_user_healthiAttacker ) + Damage ) )
        
client_printiAttackerprint_chat"You got %d extra hp for damaging"Damage )
    }
    return 
PLUGIN_CONTINUE

__________________
I dislike this.

"A sneeze never comes alone!" <-- Important to remember.
TitANious is offline
Send a message via MSN to TitANious
 



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 15:36.


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