CLEO Help Get string from adress

CLEO related
Status
Not open for further replies.

xAyoubx

Member
Joined
Apr 9, 2016
Messages
9
Reaction score
0
Please Help 

My problem is geting a string from an adress my code :
I tried alot but still crash =(
Code:
{$CLEO .cs}

:R
wait 0 
   SAMP.Available
else_jump @R 

:C
if key_down 20
then
alloc 10@ 100
0A8D: 10@ = read_memory 0xBAAFC6 size 120 virtual_protect 0
printf "Text is: %s " 10@
free 10@
end
wait 500
jump @C
address : 
[img=500x500]https://i.imgur.com/DrXxVWY.png[/img]
 

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
you must use the correct and necessary opcodes and get the correct memory address, since it may be changing every time you close gta_sa

my money code :D


Code:
{$CLEO .cs}
0000:

:Noname
wait 0
if
0AB0:   key_pressed 71
004D: jump_if_false @Noname
0A8D: 10@ = read_memory 0xB7CE50 size 4 virtual_protect 0 // 0xB7CE50 is playe money 4-bytes
0AD1: show_formatted_text_highpriority "Money is: %d" time 2000 10@
jump @Noname
 
Joined
Feb 18, 2005
Messages
2,964
Reaction score
269
You use 'alloc 100' then 'read 120', that's a problem.
Printf accepts up to 35 arguments, the first being the time to display the string on screen.
If it's a direct address to a text buffer, you can just pass the address printf/format.

[shcode=cpp]
printf "Text is: %s" time 100 params-> 0xBAAFC6
[/shcode]
 

xAyoubx

Member
Joined
Apr 9, 2016
Messages
9
Reaction score
0
springfield said:
You use 'alloc 100' then 'read 120', that's a problem.
Printf accepts up to 35 arguments, the first being the time to display the string on screen.
If it's a direct address to a text buffer, you can just pass the address printf/format.

[shcode=cpp]
printf "Text is: %s" time 100 params-> 0xBAAFC6
[/shcode]

thx @springfield Problem solved
 

proaleksandar

Member
Joined
Sep 29, 2017
Messages
15
Reaction score
0
xAyoubx said:
springfield said:
You use 'alloc 100' then 'read 120', that's a problem.
Printf accepts up to 35 arguments, the first being the time to display the string on screen.
If it's a direct address to a text buffer, you can just pass the address printf/format.

[shcode=cpp]
printf "Text is: %s" time 100 params-> 0xBAAFC6
[/shcode]

thx @springfield Problem solved

Is it possible locate 3dTextLabel with a name owner of the house ?
Example: /findhouse Tommy_Corleone
 

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
proaleksandar said:
xAyoubx said:
springfield said:
You use 'alloc 100' then 'read 120', that's a problem.
Printf accepts up to 35 arguments, the first being the time to display the string on screen.
If it's a direct address to a text buffer, you can just pass the address printf/format.

[shcode=cpp]
printf "Text is: %s" time 100 params-> 0xBAAFC6
[/shcode]

thx @springfield Problem solved

Is it possible locate 3dTextLabel with a name owner of the house ?
Example: /findhouse Tommy_Corleone
here is a theme and codes cleos that work well I leave it if you want to take a look http://ugbase.eu/Thread-Textdraw-or-3dtextlabel-finder
 
Status
Not open for further replies.
Top