AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get where a player is aiming... (https://forums.alliedmods.net/showthread.php?t=2939)

Neo-Vortex 06-21-2004 03:47

How to get where a player is aiming...
 
Is it possible to get the x/y/z coordinates of where a player is aiming? (like the wall that the crosshair is on), if so, how?

On another note, is it possible to get the x/y/z coordinates for where a player is?

AssKicR 06-21-2004 03:57

aiming = get_user_aiming(id,cords[3])
origin = get_user_origin(id,cords[3])

Ingram 06-21-2004 08:58

get_user_aiming(id,cords[3])
which include is that in?

Neo-Vortex 06-21-2004 21:48

hmmm
 
grep is your friend :)

if your not on *NIX, then this is of no use to you though...

anyway, its in amxmodx.inc

although, its not as you say...

its like this in the include file:

Code:
/* If player doesn't hit at anything function returns 0.0, * in other case the distance between hit point and player is returned. * If player is aiming at another player then the id and part of body are set. */ native Float:get_user_aiming(index,&id,&body,dist=9999);

although get_user_origion will beable to tell you where your aiming (i think)

Code:
/* Gets origin from player. * Modes: * 0 - current position. * 1 - position from eyes (weapon aiming). * 2 - end position from player position. * 3 - end position from eyes (hit point for weapon). * 4 - position of last bullet hit (only CS). */ native get_user_origin(index, origin[3], mode = 0);

using mode 3, but yeah, i am a real n00b with small scripting so yeah, i may be wrong... but anyway, what is with get_user_aiming? what ive got in the include file is way diff to what you said it was...

Deagle 06-22-2004 03:12

admin forcefire search in plugins
makes the bugger forcefire for 4 seconds in a wall so u can check the recoil and see were he aims 8)

Neo-Vortex 06-22-2004 03:19

errr
 
errr, what you on about deagle?

also, i ended up getting it working (i was right about the origion one in my last reply)

Deagle 06-22-2004 03:21

didnt realize it was scripting things going on here :D
lets say its a spam, sorry mate :oops: just woke up
coffee anybody 8)
Deag

Neo-Vortex 06-22-2004 03:45

te he, lol

makes sence now (well, why atleast) :P


All times are GMT -4. The time now is 14:39.

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