ajom
Well-known member
Hello, I am trying to recreate an "Instant Crosshair" Script that accurately simulate the crosshair texture in screen, But I am having a problem showing the Default GTASA Crosshair. Can anyone point out where I did it wrong? I am sure that at hud.txd there is an texture named SITEM16.
Code:
{$CLEO}
0000: instant crosshair by ajom
03F0: enable_text_draw 1
0390: load_txd_dictionary "HUD"
038F: load_texture "SITEM16" as 77
while true
wait 0
if 80E1: not player $PLAYER_CHAR pressed_key 6 // aim weapon
then
0A8D: 0@ = read_memory 0xB6EC14 size 4 virtual_protect 0 // Crosshair X multiplier
0@ *= 640.0
0A8D: 1@ = read_memory 0xB6EC10 size 4 virtual_protect 0 // Crosshair Y multiplier
1@ *= 448.0
2@ = 64.0 // 64 pixels in width
0A8D: 4@ = read_memory 0xC17044 size 4 virtual_protect 0 // full screen X
0093: 4@ = integer 4@ to_float
4@ /= 640.0
0073: 2@ /= 4@ // (float)
3@ = 64.0 // 64 pixels in height
0A8D: 4@ = read_memory 0xC17048 size 4 virtual_protect 0 // full screen Y
0093: 4@ = integer 4@ to_float
4@ /= 448.0
0073: 3@ /= 4@ // (float)
038D: draw_text 77 pos 0@ 1@ size 2@ 3@ rgba 255 255 255 255
end
end