CLEO Help Double dialog

CLEO related
Status
Not open for further replies.

sza23

Active member
Joined
Apr 5, 2013
Messages
44
Reaction score
2
:D  Hello!

:arrow:  Are double dialog cleo script?

:arrow:  - ex.: open firts dialog (/v), hide and open second dialog (/teles) and enter one listitem (ex San Fierro), and show firts dialog. 

;)  Thanks answers!
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
[shcode=cpp]
{$Cleo .cs}
0000: NOP

REPEAT
  WAIT 0
UNTIL 0AFA:


if 0AAB: file_exists "CLEO\INI\Settings.ini"
then
  0AF0: 1@ getint "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
  0AF0: 2@ getint "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
else
  0AF1: write_int 500 to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
  0AF1: write_int 500 to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
end
                               
Dialog.Create(0@, "Hack Pack ")
Dialog.SetRECT(0@, 1@, 2@, 260, 150)
/// Dialog Background color
Dialog.SetBackgroundColor(0@, -16777216)
/// Dialog check Box
Dialog.AddCheckBox(0@, 1, "{FF0000}Check to move dialog", 10, 10, 200, 20)
Dialog.AddButton(0@, 5, "Close", 80, 110, 70, 20)
/// Dialog minimize off
Dialog.SetMinimized(0@, 0)
/// Dialog CheckBox colors
Dialog.SetCheckBoxColor(0@, 1, -15952405)
/// Dialog set not visibile
Dialog.SetVisible(0@,0)

/*******************************************/
Dialog.Create(21@, "Hack Pack ")
Dialog.SetRECT(21@, 1@, 2@, 260, 150)
/// Dialog Background color
Dialog.SetBackgroundColor(21@, -16777216)
/// Dialog check Box
Dialog.AddCheckBox(21@, 1, "{FF0000}Check to move dialog", 10, 10, 200, 20)
Dialog.AddButton(21@, 5, "Close", 80, 110, 70, 20)
/// Dialog minimize off
Dialog.SetMinimized(21@, 0)
/// Dialog CheckBox colors
Dialog.SetCheckBoxColor(21@, 1, -15952405)
/// Dialog set not visibile
Dialog.SetVisible(21@,0)

0B34: "dialog" @ShowDialog
0B34: "dialog2" @ShowDialog_2

while true
  wait 0
  if Dialog.IsVisible(0@)
  then
      SAMP.ToggleCursor(1)
      if 0B81: dialog 0@ pop_event_to 2@ control_id_to 3@
      then
          if and
              3@ == 1
              0B92: dialog 0@ checkbox 3@ is_checked
          then
              //move dialog
              Dialog.GetRECT(0@, 3@, 4@, 5@, 6@)
              0B5E: get_cursor_pos 1@ 2@
              000C: 3@ -= 1@
              000C: 4@ -= 2@
              while 8B81: dialog 0@ pop_event_to $n control_id_to $n
                  wait 0
                  0B5E: get_cursor_pos 1@ 2@
                  000A: 1@ += 3@
                  000A: 2@ += 4@
                  Dialog.SetRECT(0@, 1@, 2@, 5@, 6@)
              end
              //save position, will auto create file if doesn\'t exist
              Dialog.GetRECT(0@, 3@, 4@, 5@, 6@)
              0AF1: write_int 3@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
              0AF1: write_int 4@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
          end
           
          if and
              3@ == 5
              2@ == 257
          then
              Dialog.SetVisible(0@,0)
              SAMP.ToggleCursor(0)
          end
      end
  end
 
  if Dialog.IsVisible(21@)
  then
      SAMP.ToggleCursor(1)
      if 0B81: dialog 21@ pop_event_to 2@ control_id_to 3@
      then
          if and
              3@ == 1
              0B92: dialog 21@ checkbox 3@ is_checked
          then
              //move dialog
              Dialog.GetRECT(21@, 3@, 4@, 5@, 6@)
              0B5E: get_cursor_pos 1@ 2@
              000C: 3@ -= 1@
              000C: 4@ -= 2@
              while 8B81: dialog 21@ pop_event_to $n control_id_to $n
                  wait 0
                  0B5E: get_cursor_pos 1@ 2@
                  000A: 1@ += 3@
                  000A: 2@ += 4@
                  Dialog.SetRECT(21@, 1@, 2@, 5@, 6@)
              end
              //save position, will auto create file if doesn\'t exist
              Dialog.GetRECT(21@, 3@, 4@, 5@, 6@)
              0AF1: write_int 3@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
              0AF1: write_int 4@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
          end
           
          if and
              3@ == 5
              2@ == 257
          then
              Dialog.SetVisible(21@,0)
              SAMP.ToggleCursor(0)
          end
      end
  end
 
end

:ShowDialog
Dialog.SetVisible(0@, 1)
SAMP.ToggleCursor(1)
0B43:

:ShowDialog_2
Dialog.SetVisible(21@, 1)
SAMP.ToggleCursor(1)
0B43:
[/shcode]
 

MrUnknown

Active member
Joined
Oct 24, 2013
Messages
140
Reaction score
4
???????????

He literally asked if there's a cleo available to open/close two dialogs at the same time. Yet you post a code which no one understands.
Your code looks like it's to create a dialog, not really hide/unhide the server's dialogs.
 

sza23

Active member
Joined
Apr 5, 2013
Messages
44
Reaction score
2
MrUnknown said:
???????????

He literally asked if there's a cleo available to open/close two dialogs at the same time. Yet you post a code which no one understands.
Your code looks like it's to create a dialog, not really hide/unhide the server's dialogs.

:arrow:  Yes!, Parazitas not bad :cool: , he dont understand the question.
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,116
Solutions
5
Reaction score
882
Location
Lithuania
First get dialog id then u can send response and get dialog..

[shcode=cpp]
{$CLEO .cs}

0000:

wait 10000

while true
wait 0

if and
0AB0: 2 {Right muose}
8B21:  NOT_CHAT_OPENED
0B4C:  samp is_dialog_active -1
then
   0B4E: samp 1@ = get_current_dialog_id
   chatmsg "%d" -1 1@
end

if and// rangeofpoint 2203
8B21:  NOT_CHAT_OPENED
0ab0: 49 {Key 1}
then
   0BC9: samp send_dialog_response dialog_id 2203 button 1@ listitem 2@ input 3@
end

if and// /taska 13337
8B21:  NOT_CHAT_OPENED
0AB0: 50 {Key 2}
then
   0BC9: samp send_dialog_response dialog_id 13337 button 1@ listitem 2@ input 3@
end

if and// /adasveteli 4800
8B21:  NOT_CHAT_OPENED
0AB0: 51 {Key 3}
then
   0BC9: samp send_dialog_response dialog_id 4800 button 1@ listitem 2@ input 3@
end

if and// /elad 3008
8B21:  NOT_CHAT_OPENED
0AB0: 52 {Key 4}
then
   0BC9: samp send_dialog_response dialog_id 3008 button 1@ listitem 2@ input 3@
end

end // end while true
[/shcode]
 
Status
Not open for further replies.
Top