AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Crosshair Orign (https://forums.alliedmods.net/showthread.php?t=102684)

Mr.Noobie 09-05-2009 04:06

Crosshair Orign
 
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

Bugsy 09-05-2009 10:49

Re: Crosshair Orign
 
Quote:

Originally Posted by Mr.Noobie (Post 923498)
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)


hzqst 09-05-2009 11:07

Re: Crosshair Orign
 
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; }

Bugsy 09-05-2009 12:47

Re: Crosshair Orign
 
That returns the origin where the player is aiming (in the distance, not at crosshair).

Mr.Noobie 09-06-2009 00:41

Re: Crosshair Orign
 
Quote:

Originally Posted by Bugsy (Post 923751)
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 ?


All times are GMT -4. The time now is 15:12.

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