So owkay, since there's no opcode for that, posting this snippet refined a bit by @springfield even thought it's that small
Code:
//Usage : 0AB1: @_get_button_text 1 left_or_right 0 output 1@
//left = 0, right = 1 xd
:_get_button_text
0AA2: 13@ = load_library "samp.dll"
13@ += 0x21A0B8
0A8D: 13@ = 13@ 4 0
13@ += 0x20
0A8D: 13@ = 13@ 4 0
0@ *= 0x1168
0@ += 0x1AD
005A: 13@ += 0@
ret 1 13@