CLEO Help CLEO HELP

CLEO related
Status
Not open for further replies.

UraaUraa

Active member
Joined
Feb 28, 2022
Messages
31
Reaction score
0
Location
Russia
i Created 3 markers but i dont know how to auto removal after i I walk over it can u help me guys i begginer.... ?

{$CLEO .cs}

script_name "TEST2"

0570: 1@ = create_asset_radar_marker_with_icon 41 at 2248.0554 -1261.0439 23.9558
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2254.886 -1260.8098 23.9665
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2262.5476 -1260.6907 23.9766

03DC: 33@ = create_marker_above_pickup 33@


terminate_this_script
 

biqlesh

New member
Joined
Nov 3, 2021
Messages
1
Reaction score
0
Location
Turkey - Bartın
C:
{$CLEO .cs}

script_name "TEST2"

0570: 1@ = create_asset_radar_marker_with_icon 41 at 2248.0554 -1261.0439 23.9558
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2254.886 -1260.8098 23.9665
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2262.5476 -1260.6907 23.9766

03DC: 33@ = create_marker_above_pickup 33@

:loop
wait 0
if
0AB5: not actor 1@ in_sphere_with_radius 0@ 2.0 0.0 0.0
then
0AB6: destroy_marker 1@
goto @end
endif
jump @loop

:end
terminate_this_script
 

UraaUraa

Active member
Joined
Feb 28, 2022
Messages
31
Reaction score
0
Location
Russia
i try this icon on the map work but marker is invisable i cant see marker help ?

{$CLEO .cs}
{$USE CLEO+}
thread 'BLIPLUS'
wait 1000
0E2A: add_cleo_blip 41 position 2264.3113 -1260.7588 is_short 0 RGBA 57 105 45 255 store_to 2@
0A93: end_custom_thread
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
C:
{$CLEO .cs}

script_name "TEST2"

0570: 1@ = create_asset_radar_marker_with_icon 41 at 2248.0554 -1261.0439 23.9558
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2254.886 -1260.8098 23.9665
0570: 1@ = create_asset_radar_marker_with_icon 41 at 2262.5476 -1260.6907 23.9766

03DC: 33@ = create_marker_above_pickup 33@

:loop
wait 0
if
0AB5: not actor 1@ in_sphere_with_radius 0@ 2.0 0.0 0.0
then
0AB6: destroy_marker 1@
goto @end
endif
jump @loop

:end
terminate_this_script
Incorrect usage, you shouldn't use same variable for returning marker handle..
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
If samp version is 0.3.7 R1
Please use snippet from below:
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
Creating 100+ same threads doesn't help you to get what you want!
Next time be more patience please...

PHP:
{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

0AB1: @CreateMarker 7 ID 1 XYZ 2248.0554 -1261.0439 23.9558 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 2 XYZ 2254.886 -1260.8098 23.9665 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 3 XYZ 2262.5476 -1260.6907 23.9766 Icon 41 Color 0xFF0000FF Style 3

while true
wait 0

if 0B61:  samp is_local_player_spawned
then
    if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2248.0554 -1261.0439 23.9558 radius 2.0 2.0 2.0
    then
        0AB1: @DeleteMarker 1 ID 1
    end
    if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2254.886 -1260.8098 23.9665 radius 2.0 2.0 2.0
    then
        0AB1: @DeleteMarker 1 ID 2
    end
    if 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2262.5476 -1260.6907 23.9766 radius 2.0 2.0 2.0
    then
        0AB1: @DeleteMarker 1 ID 3
    end
end

end

:CreateMarker
{
    0.3.7 - R1
    0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
}
IF 0AA2: 31@ = "samp.dll"
THEN                 
    0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 30@ = readMem 30@ sz 4 vp 0   
 
    0A8E: 29@ = 31@ + 0x9E20 // SAMP_CREATE_MARKER_OFFSET
    0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
END
0AB2: 0

:DeleteMarker
{
    0.3.7 - R1
    0AB1: @DeleteMarker 1 ID 2
}
IF 0AA2: 31@ = "samp.dll"
THEN
    0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
    0A8D: 30@ = readMem 30@ sz 4 vp 0
 
    0A8E: 29@ = 31@ + 0x8AB0 // SAMP_DELETE_MARKER_OFFSET
    0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 Index 0@ _retVal 28@
END
0AB2: 0
 

UraaUraa

Active member
Joined
Feb 28, 2022
Messages
31
Reaction score
0
Location
Russia
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@

Why here we have ZYX not XYZ

how to use i need to add coords here or not :

0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
 

Juli4n

Active member
Joined
Mar 31, 2021
Messages
43
Solutions
1
Reaction score
19
Location
Argentina
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@

Why here we have ZYX not XYZ

how to use i need to add coords here or not :

0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@

That's just the fragment, the coordinates to modify are in these three lines at the beginning of the script.
0AB1: @CreateMarker 7 ID 1 XYZ 2248.0554 -1261.0439 23.9558 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 2 XYZ 2254.886 -1260.8098 23.9665 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 3 XYZ 2262.5476 -1260.6907 23.9766 Icon 41 Color 0xFF0000FF Style 3
 

UraaUraa

Active member
Joined
Feb 28, 2022
Messages
31
Reaction score
0
Location
Russia
Not i change it but again not work @Parazitas can u help here

{$CLEO .cs}

0000:

repeat
wait 0
until 0AFA:

0AB1: @CreateMarker 7 ID 1 XYZ 2252.7917 -1260.8202 23.9634 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 2 XYZ 2262.7031 -1260.3855 23.9766 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 3 XYZ 2279.1716 -1261.7659 23.994 Icon 41 Color 0xFF0000FF Style 3

while true
wait 0

if 0B61: samp is_local_player_spawned
then
if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2252.7917 -1260.8202 23.9634 radius 2.0 2.0 2.0
then
0AB1: @DeleteMarker 1 ID 1
end
if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2262.7031 -1260.3855 23.9766 radius 2.0 2.0 2.0
then
0AB1: @DeleteMarker 1 ID 2
end
if 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2279.1716 -1261.7659 23.994 radius 2.0 2.0 2.0
then
0AB1: @DeleteMarker 1 ID 3
end
end

end

:CreateMarker
{
0.3.7 - R1
0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0

0A8E: 29@ = 31@ + 0x9E20 // SAMP_CREATE_MARKER_OFFSET
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
END
0AB2: 0

:DeleteMarker
{
0.3.7 - R1
0AB1: @DeleteMarker 1 ID 2
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0

0A8E: 29@ = 31@ + 0x8AB0 // SAMP_DELETE_MARKER_OFFSET
0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 Index 0@ _retVal 28@
END
0AB2: 0
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
475
Solutions
9
Reaction score
168
Location
Poland
Working perfectly on SA:MP 0.3.7-R1. https://www.mediafire.com/file/3wk9y881yyv3ccc/sa-mp-0.3.7-install.exe/file
PHP:
{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC:   test_cheat "SCR"
THEN
    0B12: 31@ = 31@ XOR 1        
    IF 0039:   31@ == 1
    THEN 
        0AB1: @CreateMarker 7 ID 1 XYZ 2248.0554 -1261.0439 23.9558 Icon 41 Color 0xFF0000FF Style 3
        0AB1: @CreateMarker 7 ID 2 XYZ 2254.886 -1260.8098 23.9665 Icon 41 Color 0xFF0000FF Style 3
        0AB1: @CreateMarker 7 ID 3 XYZ 2262.5476 -1260.6907 23.9766 Icon 41 Color 0xFF0000FF Style 3    
        0AD1: show_formatted_text_highpriority "~w~Script~n~~g~ON" time 1337
    ELSE
        0AB1: @DeleteMarker 1 ID 1
        0AB1: @DeleteMarker 1 ID 2
        0AB1: @DeleteMarker 1 ID 3 
        0AD1: show_formatted_text_highpriority "~w~Script~n~~r~OFF" time 137   
    END
END

IF 31@ == 1
THEN
    IF 0256:   player $PLAYER_CHAR defined
    THEN
        IF 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2248.0554 -1261.0439 23.9558 radius 2.0 2.0 2.0
        THEN 0AB1: @DeleteMarker 1 ID 1
        ELSE
            IF 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2254.886 -1260.8098 23.9665 radius 2.0 2.0 2.0
            THEN 0AB1: @DeleteMarker 1 ID 2
            ELSE
                IF 00FE:   actor $PLAYER_ACTOR sphere 0 in_sphere 2262.5476 -1260.6907 23.9766 radius 2.0 2.0 2.0
                THEN 0AB1: @DeleteMarker 1 ID 3
                END
            END
        END
    END
END

END
0A93: terminate_this_custom_script
 

Attachments

  • Script.cs
    20 KB · Views: 8

UraaUraa

Active member
Joined
Feb 28, 2022
Messages
31
Reaction score
0
Location
Russia
@dphome

{$CLEO .cs}
{$USE bitwise}
0000:

WHILE TRUE
WAIT 0

IF 0ADC: test_cheat "SCR"
THEN
0B12: 31@ = 31@ XOR 1
IF 0039: 31@ == 1
THEN
0AB1: @CreateMarker 7 ID 1 XYZ 2248.0554 -1261.0439 23.9558 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 2 XYZ 2254.886 -1260.8098 23.9665 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 3 XYZ 2262.5476 -1260.6907 23.9766 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 4 XYZ 2228.0615 -1260.8759 23.916 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 5 XYZ 2270.2764 -1260.9529 23.8255 Icon 41 Color 0xFF0000FF Style 3
0AB1: @CreateMarker 7 ID 6 XYZ 2276.1821 -1261.4552 23.9809 Icon 41 Color 0xFF0000FF Style 3
0AD1: show_formatted_text_highpriority "~w~Script~n~~g~ON" time 1337
ELSE
0AB1: @DeleteMarker 1 ID 1
0AB1: @DeleteMarker 1 ID 2
0AB1: @DeleteMarker 1 ID 3
0AB1: @DeleteMarker 1 ID 4
0AB1: @DeleteMarker 1 ID 5
0AB1: @DeleteMarker 1 ID 6
0AD1: show_formatted_text_highpriority "~w~Script~n~~r~OFF" time 137
END
END

IF 31@ == 1
THEN
IF 0256: player $PLAYER_CHAR defined
THEN
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2248.0554 -1261.0439 23.9558 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 1
ELSE
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2254.886 -1260.8098 23.9665 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 2
ELSE
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2262.5476 -1260.6907 23.9766 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 3
ELSE
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2228.0615 -1260.8759 23.916 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 4
ELSE
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2270.2764 -1260.9529 23.8255 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 5
ELSE
IF 00FE: actor $PLAYER_ACTOR sphere 0 in_sphere 2276.1821 -1261.4552 23.9809 radius 2.0 2.0 2.0
THEN 0AB1: @DeleteMarker 1 ID 6
END
END
END
END
END
END
END
END

END
0A93: terminate_this_custom_script

:CreateMarker
{
0.3.7 - R1
0AB1: @CreateMarker 7 ID 2 XYZ 1@ 2@ 3@ Icon 23 Color 0xFF0000FF Style 1
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0

0A8E: 29@ = 31@ + 0x9E20 // SAMP_CREATE_MARKER_OFFSET
0AA8: call_function_method 29@ struct 30@ num_params 7 pop 0 Type 6@ Color 5@ Icon 4@ ZYX 3@ 2@ 1@ Index 0@ _retVal 28@
END
0AB2: 0

:DeleteMarker
{
0.3.7 - R1
0AB1: @DeleteMarker 1 ID 2
}
IF 0AA2: 31@ = "samp.dll"
THEN
0A8E: 30@ = 31@ + 0x21A0F8 // SAMP_INFO_OFFSET
0A8D: 30@ = readMem 30@ sz 4 vp 0

0A8E: 29@ = 31@ + 0x8AB0 // SAMP_DELETE_MARKER_OFFSET
0AA8: call_function_method 29@ struct 30@ num_params 1 pop 0 Index 0@ _retVal 28@
END
0AB2: 0
 
Status
Not open for further replies.
Top