Mouse MOVE EVENT

Snippet which allows you to call mouse events.
With these functions you can move the Gta Sa Camera.
Usually these snippet is used for aimbots and other things..
Originally made by @Opcode.eXe and lost after forum updates..

PHP:
:MouseMOVE_RIGHT
// 0AB1: @MouseMOVE_RIGHT 0 
0AA2: 31@ = load_library "user32.dll"
0AA4: 30@ = get_proc_address "mouse_event" library 31@ 
IF
0A4C:   mouse_not_inverted_vertically
THEN
    0AA5: call 30@ num_params 5 pop 0 0 0 0 -2 0
ELSE
    0AA5: call 30@ num_params 5 pop 0 0 0 0 2 0
END
0AA3: free_library 31@
0AB2: 0
PHP:
:MouseMOVE_LEFT
// 0AB1: @MouseMOVE_LEFT 0 
0AA2: 31@ = load_library "user32.dll"
0AA4: 30@ = get_proc_address "mouse_event" library 31@ 
IF
0A4C:   mouse_not_inverted_vertically
THEN
    0AA5: call 30@ num_params 5 pop 0 0 0 0 2 0
ELSE
    0AA5: call 30@ num_params 5 pop 0 0 0 0 -2 0
END
0AA3: free_library 31@
0AB2: 0
PHP:
:MouseMOVE_DOWN
// 0AB1: @MouseMOVE_DOWN 0 
0AA2: 31@ = load_library "user32.dll"
0AA4: 30@ = get_proc_address "mouse_event" library 31@ 
0AA5: call 30@ num_params 5 pop 0 0 0 -2 0 0
0AA3: free_library 31@
0AB2: 0
PHP:
:MouseMOVE_UP
// 0AB1: @MouseMOVE_UP 0
0AA2: 31@ = load_library "user32.dll"
0AA4: 30@ = get_proc_address "mouse_event" library 31@ 
0AA5: call 30@ num_params 5 pop 0 0 0 2 0 0
0AA3: free_library 31@
0AB2: 0
 

Fr0z3n

Well-known member
Joined
Nov 20, 2019
Messages
294
Reaction score
36
Location
Srbija
I've made some changes, removing unnecessary checks, explaining what it does, and optimizing as much as it can... I hope this helps someone that wanna learn :)

PHP:
:MouseMOVE_RIGHT

// Load the "user32.dll" library and get the address of the "mouse_event" function
load_library "user32.dll"
get_proc_address "mouse_event" library 0AA2

// Call the "mouse_event" function to move the mouse right
call 0AA4 num_params 5 pop 0 0 0 0 -2 0

// If the mouse is inverted vertically,
if 0A4C: mouse_inverted_vertically
then
    // Call the "mouse_event" function to move the mouse down
    call 0AA4 num_params 5 pop 0 0 0 0 2 0
end

// Free the library
free_library 0AA2


PHP:
:MouseMOVE_LEFT

// Load the "user32.dll" library and get the address of the "mouse_event" function
load_library "user32.dll"
get_proc_address "mouse_event" library 0AA2

// Call the "mouse_event" function to move the mouse left
call 0AA4 num_params 5 pop 0 0 0 0 2 0

// If the mouse is inverted vertically,
if 0A4C: mouse_inverted_vertically
then
    // Call the "mouse_event" function to move the mouse up
    call 0AA4 num_params 5 pop 0 0 0 0 -2 0
end

// Free the library
free_library 0AA2

PHP:
:MouseMOVE_DOWN

// Load the "user32.dll" library and get the address of the "mouse_event" function
0AA2: load_library "user32.dll"
0AA4: get_proc_address "mouse_event" library 0AA2

// Call the "mouse_event" function to move the mouse down
0AA5: call 0AA4 num_params 5 pop 0 0 0 -2 0 0

// Free the library
0AA3: free_library 0AA2

PHP:
:MouseMOVE_UP

// Load the "user32.dll" library and get the address of the "mouse_event" function
load_library "user32.dll"
get_proc_address "mouse_event" library 0AA2

// Call the "mouse_event" function to move the mouse up
call 0AA4 num_params 5 pop 0 0 0 2 0 0

// Free the library
free_library 0AA2
 

not

New member
Joined
Oct 17, 2021
Messages
3
Reaction score
0
Hi, how can I change the function so that it clicks?
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
Hi, how can I change the function so that it clicks?
 

not

New member
Joined
Oct 17, 2021
Messages
3
Reaction score
0
I tried like this but the character doesn't shoot. I mean, it doesn't do the clicking action. I do not know what I'm doing wrong
 
Top