Raised This Month: $ Target: $400
 0% 

Crosshair Orign


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-05-2009 , 04:06   Crosshair Orign
Reply With Quote #1

How to get the Crosshair Origin ?

When a user hold "v" his crosshair will have colourful lines.

when the user let go of the "v" the colourful lines will stop.

It like trail but it just at the crosshair
Mr.Noobie is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-05-2009 , 10:49   Re: Crosshair Orign
Reply With Quote #2

Quote:
Originally Posted by Mr.Noobie View Post
How to get the Crosshair Origin ?
Try

PHP Code:
new iOrigin];
get_user_originid iOrigin ); 
Code:
0 - current position (Default)
1 - Position from eyes (weapon aiming)
2 - End position from player position
3 - End position from eyes (hit point for weapon)
4 - Position from last bullet hit (only CS)
__________________

Last edited by Bugsy; 09-05-2009 at 11:00.
Bugsy is offline
Mr.Noobie
BANNED
Join Date: Apr 2009
Old 09-06-2009 , 00:41   Re: Crosshair Orign
Reply With Quote #3

Quote:
Originally Posted by Bugsy View Post
Try

PHP Code:
new iOrigin];
get_user_originid iOrigin ); 
Code:
0 - current position (Default)
1 - Position from eyes (weapon aiming)
2 - End position from player position
3 - End position from eyes (hit point for weapon)
4 - Position from last bullet hit (only CS)
Then how to i do the colour thing ?
Mr.Noobie is offline
Old 09-05-2009, 10:50
Bugsy
This message has been deleted by Bugsy. Reason: dbl post
hzqst
Senior Member
Join Date: Jul 2008
Old 09-05-2009 , 11:07   Re: Crosshair Orign
Reply With Quote #5

Code:
  // ported from AMXX's core get_user_origin(..., 3) (suggested by Greenberet) stock fm_get_aim_origin(index, Float:origin[3]) {  new Float:start[3], Float:view_ofs[3];  pev(index, pev_origin, start);  pev(index, pev_view_ofs, view_ofs);  xs_vec_add(start, view_ofs, start);  new Float:dest[3];  pev(index, pev_v_angle, dest);  engfunc(EngFunc_MakeVectors, dest);  global_get(glb_v_forward, dest);  xs_vec_mul_scalar(dest, 9999.0, dest);  xs_vec_add(start, dest, dest);  engfunc(EngFunc_TraceLine, start, dest, 0, index, 0);  get_tr2(0, TR_vecEndPos, origin);  return 1; }

Last edited by hzqst; 09-05-2009 at 11:15.
hzqst is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 09-05-2009 , 12:47   Re: Crosshair Orign
Reply With Quote #6

That returns the origin where the player is aiming (in the distance, not at crosshair).
__________________
Bugsy 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:12.


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