CLEO Help object finder

CLEO related
Status
Not open for further replies.

n1Ki

Active member
Joined
Feb 10, 2020
Messages
50
Reaction score
5
Location
Serbia
hi ugbase , i currently making an object finder for a packet on one server model (19054,19055,19056,19057,19058) I am trying to make an rgb cube when it locates my pickup which can be seen here
thanks
 

n1Ki

Active member
Joined
Feb 10, 2020
Messages
50
Reaction score
5
Location
Serbia
Post code , so i can see.
0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 POS 7@ 8@ SIZE 35.0 35.0 RGBA 4@ 5@ 6@ 7@ THICKNESS 2.5





:asiteam
4@ = 176
5@ = 255
6@ = 0
7@ = 255
samp.CmdRet()






:DRAW_OUTLINED_BOX
0087: 14@ = 8@ // (float)
0087: 12@ = 2@ // (float)
0087: 13@ = 3@ // (float)
12@ /= 2.0 // (float)
13@ /= 2.0 // (float)
0087: 8@ = 0@ // (float)
005B: 8@ += 2@ // (float)
0063: 8@ -= 12@ // (float)
0087: 9@ = 0@ // (float)
0063: 9@ -= 2@ // (float)
005B: 9@ += 12@ // (float)
0087: 10@ = 1@ // (float)
005B: 10@ += 3@ // (float)
0063: 10@ -= 13@ // (float)
0087: 11@ = 1@ // (float) by Opkodex
0063: 11@ -= 3@ // (float)
005B: 11@ += 13@ // (float)
03F0: enable_text_draw 1 //UPALJEN TEXTDRAW
038E: draw_box_position 8@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // links
038E: draw_box_position 9@ 1@ size 14@ 3@ RGBA 4@ 5@ 6@ 7@ // rechts
038E: draw_box_position 0@ 10@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@ // oben
038E: draw_box_position 0@ 11@ size 2@ 14@ RGBA 4@ 5@ 6@ 7@






and it should to be multicolor , but its green and when i move it start blinking
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
If I understood you correctly:
  1. You don't want the box to flicker/blink.
  2. You don't want the box to be green colored.
  3. You want the box to be multicolored(combination of RGB).

Maybe like this?
PHP:
// Always use "Alpha = 0xFF = 255" to have the clearest color. Lowering the alpha value makes the color transparent.
0AB1: @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0xFF _Green 0xFF _Blue 0x00 _Alpha 0xFF _Thickness 2.5 // shows a Yellow Box
Use only the quickest wait(wait 0 ms) and avoid using other duration other than 0ms. Long wait duration is what causes the box to flicker.
 

n1Ki

Active member
Joined
Feb 10, 2020
Messages
50
Reaction score
5
Location
Serbia
If I understood you correctly:
  1. You don't want the box to flicker/blink.
  2. You don't want the box to be green colored.
  3. You want the box to be multicolored(combination of RGB).

Maybe like this?
PHP:
// Always use "Alpha = 0xFF = 255" to have the clearest color. Lowering the alpha value makes the color transparent.
0AB1: @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0xFF _Green 0xFF _Blue 0x00 _Alpha 0xFF _Thickness 2.5 // shows a Yellow Box
Use only the quickest wait(wait 0 ms) and avoid using other duration other than 0ms. Long wait duration is what causes the box to flicker.
i tried but it didnt work, i want to color changes, example for one second to blink red , one second white , one second other color etc.. like in this video
 

ajom

Well-known member
Joined
Apr 14, 2020
Messages
389
Solutions
2
Reaction score
270
Location
Pluto
You can use a timer variable that is blocked by some conditional statements.

This block is an example of a Simple blinking Box that alternates RGB
PHP:
...
If and
    TIMERA >= 166
    TIMERA <= 332
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0xFF _Green 0x00 _Blue 0x00 _Alpha 0xFF _Thickness 2.5
Else If and
    TIMERA >= 498
    TIMERA <= 664
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0x00 _Green 0xFF _Blue 0x00 _Alpha 0xFF _Thickness 2.5
Else If and
    TIMERA >= 830
    TIMERA <= 966
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0x00 _Green 0x00 _Blue 0xFF _Alpha 0xFF _Thickness 2.5
Else if TIMERA > 996
then TIMERA = 0 // RESET timer
end
End
End
End
...


While this link is an example of a more sophisticated color changer. The source code was made public for learning purposes so you better check it out and copy a part of that code that changes the color.


Just be creative and you'll be able to make a better blinking box than those examples... You can also make it distance based wherein the farther you are to the object the slower the blinking is, while the nearer you are to the object the faster it blinks
 
Last edited:

n1Ki

Active member
Joined
Feb 10, 2020
Messages
50
Reaction score
5
Location
Serbia
You can use a timer variable that is blocked by some conditional statements.

This block is an example of a Simple blinking Box that alternates RGB
PHP:
...
If and
    TIMERA >= 166
    TIMERA <= 332
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0xFF _Green 0x00 _Blue 0x00 _Alpha 0xFF _Thickness 2.5
Else If and
    TIMERA >= 498
    TIMERA <= 664
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0x00 _Green 0xFF _Blue 0x00 _Alpha 0xFF _Thickness 2.5
Else If and
    TIMERA >= 830
    TIMERA <= 966
Then 0AB1: call_scm_func @DRAW_OUTLINED_BOX 9 _XYCoords 7@ 8@ _Width 35.0 _Height 35.0 _Red 0x00 _Green 0x00 _Blue 0xFF _Alpha 0xFF _Thickness 2.5
Else if TIMERA > 996
then TIMERA = 0 // RESET timer
end
End
End
End
...


While this link is an example of a more sophisticated color changer. The source code was made public for learning purposes so you better check it out and copy a part of that code that changes the color.


Just be creative and you'll be able to make a better blinking box than those examples... You can also make it distance based wherein the farther you are to the object the slower the blinking is, while the nearer you are to the object the faster it blinks
ty man its works :D
 
Status
Not open for further replies.
Top