Raised This Month: $ Target: $400
 0% 

Need an event


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-19-2010 , 08:30   Need an event
Reply With Quote #1

Hello guys =)

How is the event called, witch is fired when anybody is aiming at a player?
I need the id of the player im aiming at.

Hope u can help me.


Mottzi
mottzi is offline
Send a message via MSN to mottzi
hzqst
Senior Member
Join Date: Jul 2008
Old 06-19-2010 , 11:49   Re: Need an event
Reply With Quote #2

witch? in L4D?

hook FM_TraceLine and

get_tr(TR_pHit) to get the entity you are aiming at
hzqst is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-19-2010 , 14:22   Re: Need an event
Reply With Quote #3

no, i want the id of the player im aiming. i dont want a entity
mottzi is offline
Send a message via MSN to mottzi
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-19-2010 , 14:24   Re: Need an event
Reply With Quote #4

See StatusText and StatusValue, but it's depending on mp_playerid value.
Otherwise see get_user_aiming native, but you gonna need to fire it quite often.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-19-2010 , 14:42   Re: Need an event
Reply With Quote #5

can you give me an example how to do this?

In the doc stands if a player aims to another player get_user_aiming returns the id (2. paramather)
mottzi is offline
Send a message via MSN to mottzi
RedRobster
Veteran Member
Join Date: Apr 2010
Location: Your Closet
Old 06-19-2010 , 15:44   Re: Need an event
Reply With Quote #6

After looking at the command, it looks as if you could do this.

PHP Code:
new targetid
get_user_aiming
(idtargetid
id would be the id of the player who is aiming
targetid is the id of who the player is aiming at
RedRobster is offline
grimvh2
Veteran Member
Join Date: Nov 2007
Location: Fishdot Nation
Old 06-19-2010 , 17:19   Re: Need an event
Reply With Quote #7

Buh im doing this on prethink.
__________________
I am out of order!
grimvh2 is offline
mottzi
Veteran Member
Join Date: May 2010
Location: Switzerland
Old 06-19-2010 , 17:33   Re: Need an event
Reply With Quote #8

Quote:
Originally Posted by RedRobster View Post
After looking at the command, it looks as if you could do this.

PHP Code:
new targetid
get_user_aiming
(idtargetid
id would be the id of the player who is aiming
targetid is the id of who the player is aiming at
thank you very much
mottzi is offline
Send a message via MSN to mottzi
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 14:53.


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