Raised This Month: $ Target: $400
 0% 

get user aim angle and change it (htfiwdt??)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-22-2007 , 08:40   Re: get user aim angle and change it (htfiwdt??)
Reply With Quote #2

I found that snippet to get the user aiming-angle:
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;
 }
I think with entity_set_vector()
(http://www.amxmodx.org/doc/source/fu...set_vector.htm)
you can set an angle

Hope that helps!?

greetz regalis
__________________
regalis is offline
 



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 06:46.


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