get_user_origin keeps returning 0,0,0
Hi,
I'm currently trying to log the player position in the client_PostThink code. However, get_user_origin keeps returning 0,0,0 as the position, even as I move around. Can anyone spot an error? Code:
new angle[3];James |
Re: get_user_origin keeps returning 0,0,0
Maybe using "client_PreThink" might work. Also, perhaps not having "angle" and "text" a global variable. But a local one. Like so:
Code:
|
Re: get_user_origin keeps returning 0,0,0
Nope. No luck. Still 0,0,0.
Here's my complete source file, if it helps. Code:
#include <amxmodx> |
Re: get_user_origin keeps returning 0,0,0
Oh.. Dur.. Change:
Code:
Code:
Also, that is going to be writing to a file.. A lot.. That would reach 100 lines in a few seconds. You could make a task instead, to make it write every few seconds or so. |
Re: get_user_origin keeps returning 0,0,0
It worked. Thank you very much. +karma:)
The huge text file isn't gonna be a problem. I'm analyzing aimbot behaviors, so I'm only going to record only around 100 angles deltas before each shot. Then it's straight to matlab for analysis. I'm curious as to why the float version didn't work though. Does Pawn not autocast ints to floats? |
Re: get_user_origin keeps returning 0,0,0
Quote:
Code:
|
Re: get_user_origin keeps returning 0,0,0
get_user_origin (mode 0) doesn't return any angle, only player's position...
http://www.amxmodx.org/funcwiki.php?...igin&go=search Code:
If mode is passed, the origin changes:PHP Code:
May be you could check pev_v_angle |
Re: get_user_origin keeps returning 0,0,0
I was only debugging my code with mode 0. I originally did mode 3 - mode 1, which returns the view vector. Then in my other program I batch convert them to angles.
Edit. Now I look at it, it does include traceline, which is a bit heavy. Does anyone know if pev_v_angle returns ints or floats? Edit: Here's the weird part. pev_v_angle only returns x,y view dir, but not z. Code:
new Float:angle[3]; |
| All times are GMT -4. The time now is 11:08. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.