Raised This Month: $12 Target: $400
 3% 

ld4/2 weapon coordinates


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 12-09-2019 , 13:46   ld4/2 weapon coordinates
Reply With Quote #1

Hi. How can I get the coordinates of the weapon that the player threw?
Alexmy is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 12-16-2019 , 02:33   Re: ld4/2 weapon coordinates
Reply With Quote #2

Perhaps, the same as with our Can Ignite plugin, raise bool flag when you use !drop (via AddCommandListener or drop plugin's global forward), and wait for new entity in OnEntityCreated() with the appropriate class name on SDKHook_SpawnPost.
Aftet that, use m_vecOrigin prop.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

Last edited by Dragokas; 12-16-2019 at 02:33.
Dragokas is offline
foxhound27
AlliedModders Donor
Join Date: Sep 2019
Location: Argentina
Old 12-16-2019 , 15:34   Re: ld4/2 weapon coordinates
Reply With Quote #3

i think you looking for this maybe

Code:
  float pos[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", pos);// Get the bottom position
  float two[3];
  two[2] = pos [2] + 10.0; // Get the top position (add 10 to the bottom)
foxhound27 is offline
foxhound27
AlliedModders Donor
Join Date: Sep 2019
Location: Argentina
Old 12-16-2019 , 17:25   Re: ld4/2 weapon coordinates
Reply With Quote #4

float pos[3];
GetEntPropVector(entity, Prop_Send, "m_vecOrigin", pos); with only this u ok depends on what u want

Last edited by foxhound27; 12-16-2019 at 17:52.
foxhound27 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 11:04.


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