Raised This Month: $ Target: $400
 0% 

Change the damage of the knife


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-24-2008 , 05:23   Re: Change the damage of the knife
Reply With Quote #5

!(1 <= attacker <= g_iMaxPlayers) would be faster than is_user_connected.
Was not need for id, but not for attacker.

I would try something like this :

PHP Code:
public Player_TakeDamage(idinflictorattackerFloat:damagedamagebits)
{
    if(    !(
<= attacker <= g_iMaxPlayers
    ||    
attacker != inflictor
    
||    get_user_weapon(attacker) != CSW_KNIFE    )
        return 
HAM_IGNORED;
 
    
SetHamParamFloat(4damage 2); //Here knife does double damage, ofc you can set it to 0.0 or anything.
    
return HAM_HANDLED;

__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 09:17.


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