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

Entity index of the prop_static you're aiming at


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-06-2008 , 06:34   Entity index of the prop_static you're aiming at
Reply With Quote #1

The title says enough I guess. GetClientAimTarget(client, false) works fine for prop_physics entities, but it returns -1 for prop_static entities. I'm looking for a way to get the model of the entity you're aiming at. Is that possible for prop_static entities?

Another way would be to hook OnPlayerUse, but again only prop_physics entities fire those. I don't think I can hook +use (didn't work for me anyway), but then I'd still have the first problem.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Quimbo
Member
Join Date: May 2008
Old 08-06-2008 , 22:00   Re: Entity index of the prop_static you're aiming at
Reply With Quote #2

Maybe TR_TraceRayFilterEx with an appropriate filter function and TR_GetEntityIndex?
Quimbo is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 08-07-2008 , 10:24   Re: Entity index of the prop_static you're aiming at
Reply With Quote #3

I think that prop_static are compiled as part of the bsp instead of becoming an entity in the bsp entity list like a prop_dynamic or prop_physics.
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-07-2008 , 12:06   Re: Entity index of the prop_static you're aiming at
Reply With Quote #4

I thought so too
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
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 00:08.


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