Raised This Month: $ Target: $400
 0% 

Getting a user's aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-07-2008 , 22:39   Getting a user's aim
Reply With Quote #1

There have been tons of threads in scripting about user aim but from what i have seen they return a point on the map. I am trying to get the user's direction of where he is aiming so i can send an object in that direction. I just do not know if I need a velocity (which seems wrong to me) or how it should be done.

Basically I guess I am just trying to get instead of a start and end point, I am trying to get a start point and a direction.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-07-2008 , 22:45   Re: Getting a user's aim
Reply With Quote #2

Code:
#include <fakemeta_util> #include <chr_engine> // ... // client = you // ent = entity being moved in direction new Float:client_origin[3], end_origin[3]; pev(client, pev_origin, client_origin); fm_get_aim_origin(client, end_origin); // change for speed of entity being moved in that direction new Float:speed = 1200.0; new Float:velocity[3]; get_speed_vector(client_origin, end_origin, speed, velocity); set_pev(ent, pev_velocity, velocity);

#include <chr_engine>
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-07-2008 , 22:56   Re: Getting a user's aim
Reply With Quote #3

thank you, just need a small part of that for the get user aiming.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
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 03:18.


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