Raised This Month: $ Target: $400
 0% 

How to get the coordinate of gunpoint


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-19-2009 , 13:52   Re: How to get the coordinate of gunpoint
Reply With Quote #1

If you need the origin of an attachment, try EngFunc_GetAttachment.

new Float:Origin[3], Float:Angles[3];
engfunc( EngFunc_GetAttachment, Id, Attachment, Origin, Angles );
__________________

Last edited by Arkshine; 08-19-2009 at 13:54.
Arkshine is offline
akn
Junior Member
Join Date: Aug 2009
Old 08-20-2009 , 08:03   Re: How to get the coordinate of gunpoint
Reply With Quote #2

Quote:
Originally Posted by Arkshine View Post
If you need the origin of an attachment, try EngFunc_GetAttachment.

new Float:Origin[3], Float:Angles[3];
engfunc( EngFunc_GetAttachment, Id, Attachment, Origin, Angles );

I tried with below code, and cs crashed, did I use error attachmentID or anything else I did wrong?

//amxx 1.8.1 all needed inc included

new wid=fm_get_user_weapon_entity(playerID)
//playerID is 1, i am the only one in server
//wid is returned, such as 240, 241, etc

new Float:Origin[3], Float:Angles[3];

engfunc( EngFunc_GetAttachment, wid, attachmentID, Origin, Angles);
//crash at this line
//I try attachmentID with 0, 1, 2, all same result
akn 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 15:06.


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