CLEO Help Textdraw

CLEO related
Status
Not open for further replies.

killme1st2

Member
Joined
May 25, 2013
Messages
15
Reaction score
0
Does anyone know how to make it so when a textdraw shows up on my screen, it will automatically type a command?
 

killme1st2

Member
Joined
May 25, 2013
Messages
15
Reaction score
0
bladero said:
Can you post picture and give more information about what you need to type in ?

Before:
https://image.prntscr.com/image/J_n0BeY7TaCb4KIKH1W5pw.png

After:
https://image.prntscr.com/image/0699qvOARNOq3ZKdzkze4g.png

I need it so when that fishing textdraw shows up, it will type the command /fish.
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
killme1st2 said:
bladero said:
Can you post  picture and give more information about what you need to type in ?

Before:
https://image.prntscr.com/image/J_n0BeY7TaCb4KIKH1W5pw.png

After:
https://image.prntscr.com/image/0699qvOARNOq3ZKdzkze4g.png

I need it so when that fishing textdraw shows up, it will type the command /fish.

Get textdraw id:
[shcode=cpp]
{$CLEO .cs}
0000:
 
 
REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0B34: "txd" @textdraw
 
WHILE TRUE
   WAIT 0
END
 
 
:textdraw
0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "textdraw with id %d contains %s text" -1 1@ 0@
      end
      free 2@
  end
end
0B43:
[/shcode]
 

killme1st2

Member
Joined
May 25, 2013
Messages
15
Reaction score
0
Parazitas said:
killme1st2 said:
bladero said:
Can you post  picture and give more information about what you need to type in ?

Before:
https://image.prntscr.com/image/J_n0BeY7TaCb4KIKH1W5pw.png

After:
https://image.prntscr.com/image/0699qvOARNOq3ZKdzkze4g.png

I need it so when that fishing textdraw shows up, it will type the command /fish.

Get textdraw id:
[shcode=cpp]
{$CLEO .cs}
0000:
 
 
REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0B34: "txd" @textdraw
 
WHILE TRUE
   WAIT 0
END
 
 
:textdraw
0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "textdraw with id %d contains %s text" -1 1@ 0@
      end
      free 2@
  end
end
0B43:
[/shcode]

How do I use this?
 

Parazitas

God
Staff member
Joined
Jan 2, 2017
Messages
3,315
Solutions
7
Reaction score
935
Location
Lithuania
killme1st2 said:
Parazitas said:
killme1st2 said:
bladero said:
Can you post  picture and give more information about what you need to type in ?

Before:
https://image.prntscr.com/image/J_n0BeY7TaCb4KIKH1W5pw.png

After:
https://image.prntscr.com/image/0699qvOARNOq3ZKdzkze4g.png

I need it so when that fishing textdraw shows up, it will type the command /fish.

Get textdraw id:
[shcode=cpp]
{$CLEO .cs}
0000:
 
 
REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY
 
0B34: "txd" @textdraw
 
WHILE TRUE
   WAIT 0
END
 
 
:textdraw
0B35: 0@
for 1@ = 0 to 2304
  if 0C5D: samp textdraw 1@ is_exists
  then
      alloc 2@ = 1024
      0C5A: samp textdraw 1@ get_string_to 2@
      if 0C29: 3@ = stristr string1 2@ string2 0@
      then 0AF8: "textdraw with id %d contains %s text" -1 1@ 0@
      end
      free 2@
  end
end
0B43:
[/shcode]

How do I use this?

TXD Finder Use - In server say "/txd"


Simple code do something when you know textdraw id
[shcode=cpp]
{$CLEO .cs}
0000:
 
 
REPEAT
   WAIT 0
UNTIL 0AFA:  SAMP_IS_READY

1@ = 45 // 45 is textdraw .. , change and pust your id.
 
WHILE TRUE
   WAIT 0
   
  if 0C5D: samp textdraw 1@ is_exists
  then
      say "/fish"
      wait 3000 /// Anti Spam
  end
   
END
[/shcode]
 

Attachments

  • TXD Finder.cs
    17.8 KB · Views: 29
Status
Not open for further replies.
Top