Raised This Month: $51 Target: $400
 12% 

how to mouse movement left and right


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
gcz
Junior Member
Join Date: Feb 2016
Old 06-23-2017 , 16:39   how to mouse movement left and right
Reply With Quote #1

lock up and down and move left and right ?


Code:
#include < amxmodx >
#include < engine >

#define VERSION "0.0.1"

static bool:g_bHasAngleLock[ 33 ];
static Float:g_flLockedAngles[ 33 ][ 3 ];

public plugin_init() 
{
    register_plugin( "LOCK TEH ANGLEZ", VERSION,"Juice" );
    register_clcmd( "say /lock", "ClientCommand_Lock" );
}

public client_putinserver( id )     
{
    g_bHasAngleLock[ id ] = false;
    g_flLockedAngles[ id ][ 0 ] = g_flLockedAngles[ id ][ 1 ] = g_flLockedAngles[ id ][ 2 ] = 0.0; 
}

public client_disconnect( id ) 
{    
    g_bHasAngleLock[ id ] = false;
    g_flLockedAngles[ id ][ 0 ] = g_flLockedAngles[ id ][ 1 ] = g_flLockedAngles[ id ][ 2 ] = 0.0;
}

public ClientCommand_Lock( id )
{
    g_bHasAngleLock[ id ] = !g_bHasAngleLock[ id ];
    entity_get_vector( id, EV_VEC_v_angle, g_flLockedAngles[ id ] );
}

public client_PreThink( id )
{
    if( is_user_alive( id ) && g_bHasAngleLock[ id ] )
    {
        entity_set_vector( id, EV_VEC_angles, g_flLockedAngles[ id ] );
        entity_set_int( id, EV_INT_fixangle, 1 );
    }
}

Last edited by gcz; 06-23-2017 at 16:41.
gcz is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 06-25-2017 , 02:12   Re: how to mouse movement left and right
Reply With Quote #2

You are getting v_angle but set angles.
eyal282 is offline
gcz
Junior Member
Join Date: Feb 2016
Old 06-25-2017 , 15:09   Re: how to mouse movement left and right
Reply With Quote #3

i will try to fix this code , thank you

g_flLockedAngles[ id ][ 0 ] = 0.0; // x
entity_set_vector( id, EV_VEC_angles, g_flLockedAngles[ id ] ); // pev_angles
gcz 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:06.


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