Raised This Month: $32 Target: $400
 8% 

Solved [Req] Knife Damage Always 45


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Snake.
Senior Member
Join Date: Jul 2017
Old 09-22-2020 , 14:31   [Req] Knife Damage Always 45
Reply With Quote #1

Players will always get 45 damage from knife. (including hs, back, every part). I searched but could not find plugin as my request.

Last edited by Snake.; 09-24-2020 at 15:26.
Snake. is offline
Send a message via Skype™ to Snake.
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 09-22-2020 , 15:06   Re: [Req] Knife Damage Always 45
Reply With Quote #2

Quote:
Originally Posted by Snake. View Post
Players will always get 45 damage from knife. (including hs, back, every part). I searched but could not find plugin as my request.
RIP, I dont understand anything
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 09-22-2020 , 19:55   Re: [Req] Knife Damage Always 45
Reply With Quote #3

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

public plugin_init() {
    
RegisterHam(Ham_TakeDamage"player""playerTakeDamagePre");
}

public 
playerTakeDamagePre(victiminflictorattackerdamagedamagebits) {

    if(
get_user_weapon(attacker) == CSW_KNIFE) {
        
SetHamParamFloat(445.0);
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED;

ZaX is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-22-2020 , 20:57   Re: [Req] Knife Damage Always 45
Reply With Quote #4

Do you want 45 damage or 45 loss in hp, they are not the same thing

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

public plugin_init() 
{
    
RegisterHamHam_TakeDamage "player" "playerTakeDamagePre" );
}

public 
playerTakeDamagePrevictim inflictor attacker Float:damage damagebits 
{
    if ( 
is_user_connectedattacker ) && ( get_user_weaponattacker ) == CSW_KNIFE ) ) 
    {
        
set_user_healthvictim get_user_healthvictim ) - 45 );
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

__________________
Bugsy is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 09-23-2020 , 02:59   Re: [Req] Knife Damage Always 45
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
Do you want 45 damage or 45 loss in hp, they are not the same thing

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

public plugin_init() 
{
    
RegisterHamHam_TakeDamage "player" "playerTakeDamagePre" );
}

public 
playerTakeDamagePrevictim inflictor attacker Float:damage damagebits 
{
    if ( 
is_user_connectedattacker ) && ( get_user_weaponattacker ) == CSW_KNIFE ) ) 
    {
        
set_user_healthvictim get_user_healthvictim ) - 45 );
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

Thanks, works!
Snake. is offline
Send a message via Skype™ to Snake.
Snake.
Senior Member
Join Date: Jul 2017
Old 09-23-2020 , 09:52   Re: [Req] Knife Damage Always 45
Reply With Quote #6

Quote:
Originally Posted by Bugsy View Post
Do you want 45 damage or 45 loss in hp, they are not the same thing

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

public plugin_init() 
{
    
RegisterHamHam_TakeDamage "player" "playerTakeDamagePre" );
}

public 
playerTakeDamagePrevictim inflictor attacker Float:damage damagebits 
{
    if ( 
is_user_connectedattacker ) && ( get_user_weaponattacker ) == CSW_KNIFE ) ) 
    {
        
set_user_healthvictim get_user_healthvictim ) - 45 );
        return 
HAM_SUPERCEDE;
    }
    
    return 
HAM_IGNORED;

Hey this plugin caused not to show killer and also sounds of knife stab sounds has gone. Can you make a fix?

Last edited by Snake.; 09-23-2020 at 09:53.
Snake. is offline
Send a message via Skype™ to Snake.
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-24-2020 , 12:17   Re: [Req] Knife Damage Always 45
Reply With Quote #7

Quote:
Originally Posted by Snake. View Post
Hey this plugin caused not to show killer and also sounds of knife stab sounds has gone. Can you make a fix?
Have you tried the one ZaX made?
__________________
Black Rose is offline
Snake.
Senior Member
Join Date: Jul 2017
Old 09-24-2020 , 15:24   Re: [Req] Knife Damage Always 45
Reply With Quote #8

Quote:
Originally Posted by Black Rose View Post
Have you tried the one ZaX made?
Oh yes i did not see it. Tested and works great. Thanks for reminding me.
Snake. is offline
Send a message via Skype™ to Snake.
Snake.
Senior Member
Join Date: Jul 2017
Old 09-24-2020 , 15:25   Re: [Req] Knife Damage Always 45
Reply With Quote #9

Quote:
Originally Posted by ZaX View Post
PHP Code:
#include <amxmodx>
#include <hamsandwich>

public plugin_init() {
    
RegisterHam(Ham_TakeDamage"player""playerTakeDamagePre");
}

public 
playerTakeDamagePre(victiminflictorattackerdamagedamagebits) {

    if(
get_user_weapon(attacker) == CSW_KNIFE) {
        
SetHamParamFloat(445.0);
        return 
HAM_HANDLED;
    }
    return 
HAM_IGNORED;

,

Also thanks for the code mate!
Snake. is offline
Send a message via Skype™ to Snake.
Reply


Thread Tools
Display Modes

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


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