Raised This Month: $ Target: $400
 0% 

catch knife attack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-10-2009 , 20:32   catch knife attack
Reply With Quote #1

how to catch knife-attack,knife-attacker, victim & the dmg?


* the attackers weapon can be knife but he can make dmg with touching the victim. so i cant check attackers weapon.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Jon
Veteran Member
Join Date: Dec 2007
Old 10-10-2009 , 20:35   Re: catch knife attack
Reply With Quote #2

Ham_TakeDamage? Didn't quite understand this: * the attackers weapon can be knife but he can make dmg with touching the victim.
Jon is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-10-2009 , 20:38   Re: catch knife attack
Reply With Quote #3

Quote:
Originally Posted by Jon View Post
Ham_TakeDamage? Didn't quite understand this: * the attackers weapon can be knife but he can make dmg with touching the victim.
so i have to get the weapon of the attacker when i register an event "ham_takedamage". but as i said, users weapon can be knife but i need only the knife damage. nothing else.

the user can make damage without any weapons. for example by jumping or touching other players. in this case the weapon can be all weapons.
i need to get only the damage which made by knife.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-10-2009 , 21:51   Re: catch knife attack
Reply With Quote #4

Quote:
Originally Posted by One View Post
so i have to get the weapon of the attacker when i register an event "ham_takedamage". but as i said, users weapon can be knife but i need only the knife damage. nothing else.

the user can make damage without any weapons. for example by jumping or touching other players. in this case the weapon can be all weapons.
i need to get only the damage which made by knife.
When the victim takes damage, check if attackers current weapon is knife? Am I missing something here? Your explanation sounds odd, you are looking to catch knife damage, then you say you cant check the attackers weapon because he can issue damage just by touching the victim. But won't he need to be holding the knife to issue knife damage?

PHP Code:
#define IsPlayer(%1)            (1<=%1<=g_MaxClients)

RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" )

public 
fw_HamTakeDamageVictim Inflictor Attacker Float:fDamage BitDamage 
{
    if ( 
IsPlayerAttacker ) && ( get_user_weaponAttacker ) == CSW_KNIFE ) ) 
    {
        
//Victim hurt with knife
    
}

__________________
Bugsy is offline
ieGaming
Junior Member
Join Date: Nov 2006
Old 10-10-2009 , 22:51   Re: catch knife attack
Reply With Quote #5

What I think he means is that he wants the plugin to damage the victim if the attacker has a knife out. And right now its damaging with all weapons correct?

Last edited by ieGaming; 10-10-2009 at 22:53.
ieGaming is offline
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-11-2009 , 03:36   Re: catch knife attack
Reply With Quote #6

One means that he has an other plugin in his server which makes players able to damage other players by just touching them. Like this they can do damage by touching and just holding knife out. One doesn't want to get that damage but only the real damage done with knife.
SnoW is offline
Send a message via MSN to SnoW
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-11-2009 , 04:54   Re: catch knife attack
Reply With Quote #7

Quote:
Originally Posted by SnoW View Post
One means that he has an other plugin in his server which makes players able to damage other players by just touching them. Like this they can do damage by touching and just holding knife out. One doesn't want to get that damage but only the real damage done with knife.
perfect .
yea i just want to give em victim the damage as HP back. but the damage which players do with jumping or touching other users, is real & victim will take damage. only no knife damage.

( i dont want to disable the knife damage. because when you knife anyone, player can't walk anymore or will be slower. so i can't disable the knife damage but i can to give the damage which made by knife, back to the victim. ) i hope unterstand what i mean.
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Jon
Veteran Member
Join Date: Dec 2007
Old 10-11-2009 , 05:05   Re: catch knife attack
Reply With Quote #8

PHP Code:

// Bugsy's code

#define IsPlayer(%1)            (1<=%1<=g_MaxClients)

RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" )

public 
fw_HamTakeDamageVictim Inflictor Attacker Float:fDamage BitDamage 
{
    if ( 
IsPlayerAttacker ) && ( cs_get_weapon_idInflictor ) == CSW_KNIFE ) ) 
    {
        
//Victim hurt with knife, NOT JUMPING
    
}


Last edited by Jon; 10-11-2009 at 05:25.
Jon is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 10-11-2009 , 05:18   Re: catch knife attack
Reply With Quote #9

Quote:
Originally Posted by Jon View Post
PHP Code:

// Bugsy's code

#define IsPlayer(%1)            (1<=%1<=g_MaxClients)

RegisterHamHam_TakeDamage "player" "fw_HamTakeDamage" )

public 
fw_HamTakeDamageVictim Inflictor Attacker Float:fDamage BitDamage 
{
    if ( 
IsPlayerAttacker ) && ( cs_get_weapon_idInflictor ) == CSW_KNIFE ) ) 
    {
        
//Victim hurt with knife
    
}

you wanna kidding me? oO i said i cant use this. i dont want to give a user hp back when the attacker made damage by jumping & not knife. oO


imaing : there is a mod, which strips all you'r weapon & you just get a knife. you can kill an enemey by jumping/touching the players. so you'r weapon which you have in you'r hand is KNIFE but you dont make damage with the knife. you just make the damage with jumping.
so now i want to disable knife's damage but the effect which a knife damage do ( slowdown when attacked ) must be there. you just get damage when knifed but after 0.00000000000x sec. you become the damage back & you can't die by knife damages. only jump or touch damage can kill you oO
__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
Jon
Veteran Member
Join Date: Dec 2007
Old 10-11-2009 , 05:25   Re: catch knife attack
Reply With Quote #10

I'm not kidding you, if you look at the code I changed it. It checks if the weapon used was knife, so the statement will return false if the attacker damaged the victim by touching him.
Jon 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 22:43.


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