CLEO Help CLEO help, sends a message when I'm in a certain coordinate

CLEO related
Status
Not open for further replies.

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Code:
{$CLEO .cs}

thread 'Wittzi'

:Wittzi_01
wait 0
if
0256:   player $PLAYER_CHAR defined 
else_Jump @Wittzi_01
if 
00DF:   actor $PLAYER_ACTOR driving 
else_jump @Wittzi_01
if 
00EC:   actor $PLAYER_ACTOR 0 near_point 1420.403 -1324.796 13.262 radius 80.0 80.0 
else_jump @Wittzi_01
0AF9: "/gmats" 
wait 1000
jump @Wittzi_01
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Re: CLEO help, sends a message when I'm in a certain coordin

I copied the entire script, pasted it into sanny builder, and replaced 0AF9 line with 0ACD line, compiled it, and drove till there, it kept saying me that i reached the destination. So the entire script works.

If there is a problem, then you must replace "0AF9: "/gmats" with 0AF9: samp say_msg "/gmats"


EDIT : Forgot to add, if you use this in samp, it will spam the message /gmats for each second, like typing /gmats, waiting 1 second, again /gmats, again wait 1 second, again /gmats [...], so you should add some more tricks afterwards, so that the script will wait until you get out of that coordinate's radius.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

Hmmmm can you give me some tips? I'm not familiar with the opcodes, please help me out :D :D:D thanks
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Re: CLEO help, sends a message when I'm in a certain coordin

By "help me out" if you mean the help about what i wrote after "EDIT : Forgot to add", here's what i would do to avoid the script repeating it again :

Code:
    {$CLEO .cs}

    thread 'Wittzi'

    :Wittzi_01
    wait 0
    if
    0256:   player $PLAYER_CHAR defined
    else_Jump @Wittzi_01
    if
    00DF:   actor $PLAYER_ACTOR driving
    else_jump @Wittzi_01
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1420.403 -1324.796 13.262 radius 80.0 80.0
    else_jump @Wittzi_01
    0ACD:   show_text_highpriority "~B~YOU'RE THERE!" time 1500
    wait 1500
    0ACD:   show_text_highpriority "~B~I'LL TELL YOU WHEN YOU'RE AWAY" time 2000
    wait 2000
    jump @Wittzi_02
    
    :Wittzi_02
    wait 0
    if
    00DF:   actor $PLAYER_ACTOR driving
    else_jump @Wittzi_01 
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1420.403 -1324.796 13.262 radius 80.0 80.0
    else_jump @SAYIT
    jump @Wittzi_02
    
    :SAYIT
    wait 0
    0ACD:   show_text_highpriority "~B~YOU'RE AWAY!" time 1500
    wait 1500
    jump @Wittzi_01

So basicly and entirely, this scriptflow will check if you are near a coordinate, and if so, then it will say "You're there" only once, and will wait until you get far away that coordinate. When you are out of that coordinate's radius, it will say "you're away".
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: CLEO help, sends a message when I'm in a certain coordin

Of course, for 0AF9: "/gmats" you need sampfuncs 2.3+
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

Are you guys sure that you don't need to type 0AF9: samp say_msg "/gmats" instead of only "0AF9: /gmats"? I think you should try it.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

Every time I'm near the area, this codes shows up. Any solutions?

292s9pd.png
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

Are you guys sure that you don't need to type 0AF9: samp say_msg "/gmats" instead of only "0AF9: /gmats"? I think you should try it.

I edited my codes, actually its your codes :D :D:D . I replaced the message with 0AF9: samp say_msg "/gmats"
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

Code:
 {$CLEO .cs}

    thread 'Wittzi'

    :Wittzi_01
    wait 0
    if
    0256:   player $PLAYER_CHAR defined
    else_Jump @Wittzi_01
    if
    00DF:   actor $PLAYER_ACTOR driving
    else_jump @Wittzi_01
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1423.3638 -1319.7781 13.5907 radius 2.0 2.0
    else_jump @Wittzi_01
    wait 500
    0AF9: samp say_msg "/gmats"
    jump @Wittzi_02
   
    :Wittzi_02
    wait 0
    if
    00DF:   actor $PLAYER_ACTOR driving
    else_jump @Wittzi_01
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1423.3638 -1319.7781 13.5907 radius 2.0 2.0
    else_jump @SAYIT
    jump @Wittzi_02
   
    :SAYIT
    wait 0
    jump @Wittzi_01
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: CLEO help, sends a message when I'm in a certain coordin

Are you guys sure that you don't need to type 0AF9: samp say_msg "/gmats" instead of only "0AF9: /gmats"? I think you should try it.

Doesn't matter, cleo checks the opcode and the parameters.
You're crashing because your script doesn't call for SAMPFUNCS shit. So use like this.

Code:
{$CLEO}
0000:

if 
  8AF7: get_samp_base_to 0@
then 
    0A93: end_custom_thread
end
repeat 
    wait 400
until 0AFA: is_samp_structures_available

:Wittzi_01
wait 0
if
0256:   player $PLAYER_CHAR defined 
else_Jump @Wittzi_01
if 
00DF:   actor $PLAYER_ACTOR driving 
else_jump @Wittzi_01
if 
00EC:   actor $PLAYER_ACTOR 0 near_point 1420.403 -1324.796 13.262 radius 80.0 80.0 
else_jump @Wittzi_01
0AF9: "/gmats" 
wait 1000
jump @Wittzi_01
 
Joined
Feb 18, 2005
Messages
2,965
Reaction score
271
Re: CLEO help, sends a message when I'm in a certain coordin

Not the code problem, i tested it right now and it works. Make sure you instaled sampfuncs correct.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

I pasted the samp func 2.6 correctly, yet still crashing
20foihl.png


Anyways, here are my codes
Code:
 {$CLEO .cs}

    thread 'Wittzi'

    
    :LOAD
    wait 0
    if
      8AF7: get_samp_base_to 0@
    then
        0A93: end_custom_thread
    end
    repeat
       wait 400
    until 0AFA: is_samp_structures_available

    :Wittzi_01
    wait 0
    if
    0256:   player $PLAYER_CHAR defined
    else_Jump @Wittzi_01
    if
    0449:   actor $PLAYER_ACTOR in_a_car 
    else_jump @Wittzi_01
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1423.3638 -1319.7781 13.5907 radius 2.0 2.0
    else_jump @Wittzi_01
    wait 500
    0AF9: samp say_msg '/gmats'
    jump @Wittzi_02
   
    :Wittzi_02
    wait 0
    if
    0449:   actor $PLAYER_ACTOR in_a_car 
    else_jump @Wittzi_01
    if
    00EC:   actor $PLAYER_ACTOR 0 near_point 1423.3638 -1319.7781 13.5907 radius 2.0 2.0
    else_jump @SAYIT
    jump @Wittzi_02
   
    :SAYIT
    wait 0
    jump @Wittzi_01
Actually now, it sends a message, but blank.
28cfyqd.png
 

xzytro

God
Joined
Apr 1, 2013
Messages
2,294
Reaction score
7
Re: CLEO help, sends a message when I'm in a certain coordin

:lol: :lol::lol: so weird, got no solution anymore for that sorry.
 

undiscovered

Active member
Joined
May 3, 2013
Messages
76
Reaction score
0
Re: CLEO help, sends a message when I'm in a certain coordin

I keep on changing

0AF9: samp say_msg '/gmats' ( single quote )
0AF9: samp say_msg "/gmats" ( double quote )

Do I need %s?
 
Status
Not open for further replies.
Top