Jump to content

[ASI|REL|WIP] Hardware mouse support


Recommended Posts

Hardware mouse support plugin for GTA SA.

This plugin adds 2 new opcodes:
0C20: -- toggle cursor display, incoming param(1) int. == 0 (to hide) or 1 (to show)
0C21: -- get cursor position in SA metrics, incoming param(2) variables to store X and Y (float).
Warning! this plugin is using code injection @ 0x53E972 and 0x468D5D, so it may conflict with other plugins; also it disables following functions from user32.dll, loaded by SA, "ShowCursor"(permanently) and "SetCursorPos" (while cursor is shown).
install info and source code in archive. Download link>>
i literally just started learning c++/asm with this plugin, so pls, hold your tomatos )
Cleo example (cheat "boxbox" to run, use RMB to draw box):
{$CLEO .cs}0000::Start0@ = 0while true    wait 0    if        0ADC:   test_cheat "BOXBOX"        then        0ACE: show_formatted_text_box "Drawing box"        03F0: enable_text_draw 1        0C20: show mosue cursor 1        break    end    if and        33@ > 5000        0@ == 0        then        0@ = 1        0ACE: show_formatted_text_box "Type: boxbox, to draw box."    endendWhile true    wait 0    if        0ab0: 1        then        0C21: store cursor position to 0@ 1@        repeat            wait 0            0C21: store cursor position to 2@ 3@            0063: 2@ -= 0@            0087: 4@ = 2@            if                4@ < 0                then                4@ *= -1.0            end            2@ /= 2.0              005B: 2@ += 0@            0063: 3@ -= 1@            0087: 5@ = 3@            if                5@ < 0                then                5@ *= -1.0            end            3@ /= 2.0            005B: 3@ += 1@            038E: draw_box_position 2@ 3@ size 4@ 5@ RGBA 175 175 175 175        until 8ab0: 1    end    if        0ADC:   test_cheat "BOXBOX"        then        0C20: show mosue cursor 0        jump @Start    end    end
Edited by madleg
Link to comment
https://gtaforums.com/topic/763682-asirelwip-hardware-mouse-support/
Share on other sites

  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.