Raised This Month: $ Target: $400
 0% 

Detect awp hs kill


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-14-2013 , 10:14   Detect awp hs kill
Reply With Quote #1

It's this method correct to detect hs kill with awp ?

Code:
#include <amxmodx>

public plugin_init() {
	
	register_event( "DeathMsg", "DeathMsg", "a" )
	
}

public DeathMsg() {
	
	new headshot=read_data(3) 
        new Victim=read_data(2)
	new weapon, HitPoint, attacker = get_user_attacker(Victim, weapon, HitPoint)
	
	if(weapon == CSW_AWP && headshot) {
		
		//awp hs kill
		
	}
	
}

Last edited by HamletEagle; 09-14-2013 at 10:16.
HamletEagle is offline
~Ice*shOt
Veteran Member
Join Date: Mar 2009
Location: Lithuania
Old 09-14-2013 , 10:27   Re: Detect awp hs kill
Reply With Quote #2

Yes, but better check weapon is with

PHP Code:
read_data(3Weapon31
I think.

Last edited by ~Ice*shOt; 09-14-2013 at 10:28.
~Ice*shOt is offline
Send a message via Skype™ to ~Ice*shOt
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-14-2013 , 10:45   Re: Detect awp hs kill
Reply With Quote #3

Quote:
Originally Posted by ~Ice*shOt View Post
Yes, but better check weapon is with

PHP Code:
read_data(3Weapon31
I think.
I know but in my code I need to check all this things,not only weapon.

Last edited by HamletEagle; 09-14-2013 at 10:46.
HamletEagle is offline
dark_style
Senior Member
Join Date: Jul 2009
Location: Bulgaria
Old 09-14-2013 , 10:55   Re: Detect awp hs kill
Reply With Quote #4

https://forums.alliedmods.net/showthread.php?t=88792

Example included.
__________________



dark_style is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 09-14-2013 , 10:56   Re: Detect awp hs kill
Reply With Quote #5

Why don't you just try it instead?
__________________
Black Rose is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 09-14-2013 , 11:27   Re: Detect awp hs kill
Reply With Quote #6

Add correct filters and you don't need to check for awp or for headshot :

PHP Code:
register_event("DeathMsg""Event_DeathMsg_Awp_Hs""a""3=1""4=awp"); 
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-14-2013 , 11:27   Re: Detect awp hs kill
Reply With Quote #7

Quote:
Originally Posted by dark_style View Post
I didn't ask that. I simply ask if my method is correct. Because I can't test now,some problems with the pc. Solved,thx connor.

Last edited by HamletEagle; 09-14-2013 at 11:27.
HamletEagle is offline
Old 09-14-2013, 12:12
HamletEagle
This message has been deleted by HamletEagle.
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 19:08.


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