Raised This Month: $ Target: $400
 0% 

[Help] Ham_TakeDamage and Ham_Touch don't work


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Shiina.Mashiro
Senior Member
Join Date: Sep 2014
Location: Vietnam
Old 12-31-2014 , 05:39   [Help] Ham_TakeDamage and Ham_Touch don't work
Reply With Quote #1

Hi guys, this is my code:
PHP Code:
RegisterHam(Ham_TakeDamage"player""fw_TakeDamage")
RegisterHam(Ham_Touch"armoury_entity""FwdHamPickupWeapon")
RegisterHam(Ham_Touch"weaponbox""FwdHamPickupWeapon")
public 
fw_TakeDamage(victiminflictorattackerFloat:damage)
{
    if(
victim != attacker && is_user_connected(attacker))
    {
        if(
cs_get_user_team(attacker) == CS_TEAM_T)
        {
            if(
get_user_weapon(attacker) == CSW_KNIFE)
            {
                
SetHamParamFloat(4damage 0.5)
            }
        }
    }
}
public 
FwdHamPickupWeapon(ident)
{
    if(
cs_get_user_team(id) == CS_TEAM_T)
    {
        return 
HAM_SUPERCEDE
    
}
    return 
HAM_IGNORED

and when i tested it, the terrorist's knife damage is still the same, and they still can pick up weapons.

Can you guys detected any problem in my code Thanks.

p/s: Can you guys show me how to block the message with player name and health when drag cursor to player ?
__________________

Last edited by Shiina.Mashiro; 12-31-2014 at 05:40.
Shiina.Mashiro is offline
 



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:27.


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