CLEO Help [HELP] SN position + RGB format [SOLVED]

CLEO related
Status
Not open for further replies.

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
Hi,

I need an little help... So I don't know how to get position of the screen. So I looked at the code in cleo which shows numbers/text on the screen and I found that some of the ppl use
Code:
 045A: draw_text_1number 16.0 384.0GXT 'NUMBER' number 2@  // ~1~
but how do you know the numbers to get the coordinates on the screen?(do you need experiment with it or is there a easier way?).


Is there any website where I can see codes for RGB colours ?
Code:
 0340: set_text_draw_RGBA 181 121 191 258
(I look up on google but I didn't find any good ones)


Thanks...
 
Joined
Feb 18, 2005
Messages
2,963
Reaction score
267
Re: [HELP] SN position + RGB format

To find coords, make a simple test .cs using

0B5D: samp toggle_cursor 1
0B5E: get_cursor_pos 1@ 2@
0B5F: convert_window_screen_coords 1@ 2@ to_game_screen_coords 3@ 4@
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
Re: [HELP] SN position + RGB format

springfield link said:
To find coords, make a simple test .cs using

0B5D: samp toggle_cursor 1
0B5E: get_cursor_pos 1@ 2@
0B5F: convert_window_screen_coords 1@ 2@ to_game_screen_coords 3@ 4@
[member=111]springfield[/member]

How do you use it ?, I crash when I make cleo and join any server
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: [HELP] SN position + RGB format

Mr.Christmas link said:
[member=111]springfield[/member]

How do you use it ?, I crash when I make cleo and join any server

Code:
{$CLEO .cs}

0000: NOP

while true
wait 0
if
0AB0: 49
then
0B5D: samp toggle_cursor 1
0B5E: get_cursor_pos 1@ 2@
0B5F: convert_window_screen_coords 1@ 2@ to_game_screen_coords 3@ 4@
0AD1: show_formatted_text_highpriority "X: %0.f Y: %0.f" time 2000 3@ 4@ 
end
end

Press 1 to show the x and y pos.
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
Re: [HELP] SN position + RGB format

pepeelpubero link said:
Code:
{$CLEO .cs}

0000: NOP

while true
wait 0
if
0AB0: 49
then
0B5D: samp toggle_cursor 1
0B5E: get_cursor_pos 1@ 2@
0B5F: convert_window_screen_coords 1@ 2@ to_game_screen_coords 3@ 4@
0AD1: show_formatted_text_highpriority "X: %0.f Y: %0.f" time 2000 3@ 4@ 
end
end

Press 1 to show the x and y pos.
[member=8650]pepeelpubero[/member]

Doesn't work... The cursor is shown but text doesn't appear
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: [HELP] SN position + RGB format

Mr.Christmas link said:
[member=8650]pepeelpubero[/member]

Doesn't work... The cursor is shown but text doesn't appear

[member=23540]Mr.Christmas[/member] try using this 0AF8: "X: %0.f Y: %0.f" -1 3@ 4@ instead of 0AD1. It will flood a little the chat but you can use it.
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
Re: [HELP] SN position + RGB format

pepeelpubero link said:
[member=23540]Mr.Christmas[/member] try using this 0AF8: "X: %0.f Y: %0.f" -1 3@ 4@ instead of 0AD1. It will flood a little the chat but you can use it.
[member=8650]pepeelpubero[/member]

The "X:" and "Y:" is shown but after that nothing appears


5r1kSjR.jpg

http://imgur.com/5r1kSjR
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: [HELP] SN position + RGB format

Try doing this:

Press F10 at sanny builder > Formats tab > Case converting > Mark "As is" > Ok > Compile > Try it.
 

MrChristmas

Expert
Joined
Jul 29, 2014
Messages
563
Reaction score
26
Re: [HELP] SN position + RGB format

So to clear things out...



03F0: enable_text_draw 1 <-- You can see the numbers
0342: set_text_draw_centered 1 <-- ???
03F0: enable_text_draw 122 <-- R  133 <--G  129 <-- B 255 <-- ???
045A: draw_text_1number 621 <-- X  6 <-- Y







---------------------
[member=6677]TH3RM4L[/member]
[member=111]springfield[/member]
[member=8650]pepeelpubero[/member]
---------------------
 

pepeelpubero

Well-known member
Joined
Jan 21, 2014
Messages
433
Reaction score
1
Re: [HELP] SN position + RGB format

Yes, all is ok.

03F0: enable_text_draw >> 1 = enable textdraws (show) 0 = disable textdraws (hide)

0342: set_text_draw_centered >> the name says all, center the text, i don't see the changes but it must center the text.

0340: set_text_draw_RGBA 180 <- R 180 <- G 180 <- B 255 <- A (RGBA)

045A: draw_text_1number 320.0 <- X 155.333 <- Y GXT 'ALLRACE' <- GXT NAMES > number 0@ <- VAR

For example:

Code:
0@ = Actor.Health($PLAYER_ACTOR)
0340: set_text_draw_RGBA 255 0 0 255 
045A: draw_text_1number 300.0 300.0 GXT 'NUMBER' number 0@
 
Status
Not open for further replies.
Top