Raised This Month: $ Target: $400
 0% 

prethink: How to check certain movements


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 02-05-2007 , 10:53   prethink: How to check certain movements
Reply With Quote #1

Hey.. I need to know how to check if a user is turning left, right, up, or down.

Thanks for the help.
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
dutchmeat
Senior Member
Join Date: Sep 2006
Old 02-05-2007 , 10:58   Re: prethink: How to check certain movements
Reply With Quote #2

what do you mean by turning left?
strafing left, aiming to left ?
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
SweatyBanana
BANNED
Join Date: Sep 2005
Location: LOL
Old 02-05-2007 , 11:37   Re: prethink: How to check certain movements
Reply With Quote #3

Quote:
Originally Posted by dutchmeat View Post
what do you mean by turning left?
strafing left, aiming to left ?
Such as your mouse movement..

This is for amx_apache.. I want to add pitch and roll with mouse movement..
SweatyBanana is offline
Send a message via AIM to SweatyBanana Send a message via Yahoo to SweatyBanana
dutchmeat
Senior Member
Join Date: Sep 2006
Old 02-05-2007 , 12:23   Re: prethink: How to check certain movements
Reply With Quote #4

I've used this simple, but effective way of increasing roll and pitch:
Code:
    client_cmd(a,"m_yaw 0.015")  //WHILE SWOOPING DECREASE YAW AND PITCH     client_cmd(a,"m_pitch 0.015")

but you could use these pev's (FM cons):

Code:
 pev_pitch_speed,  pev_yaw_speed,

or the engine's:
Code:
 EV_FL_pitch_speed,  EV_FL_yaw_speed,
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-05-2007 , 20:40   Re: prethink: How to check certain movements
Reply With Quote #5

Code:
 #include <amxmodx>  #include <engine>  new Float:oldAngles[33][3];  public client_PreThink(id)  {     static Float:angles[3];     entity_get_vector(id,EV_VEC_v_angle,angles);     if(angles[0] < oldAngles[id][0])     {         client_print(id,print_chat,"UP");     }     else if(angles[0] > oldAngles[id][0])     {         client_print(id,print_chat,"DOWN");     }     if(angles[1] < oldAngles[id][1])     {         client_print(id,print_chat,"RIGHT");     }     else if(angles[1] > oldAngles[id][1])     {         client_print(id,print_chat,"LEFT");     }     oldAngles[id] = angles;  }

However, you'll have to figure out how to account for when angles wrap around.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 00:40.


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