CLEO Help dialog help

CLEO related
Status
Not open for further replies.

noob213

Active member
Joined
Sep 15, 2017
Messages
88
Reaction score
6
How do I make the text entered in the dialog appear in the chat

or how do I store the text of the dialogue in a variable someone knows


/// dialog_style_input

PHP:
{$CLEO .cs}
0000: NOP 


repeat
    wait 0
until SAMP.Available()
0B34: samp register_client_command "sgt" to_label @cmd_mycmd

while true
wait 0
 if     
        0B3C:  samp is_dialog_responded id 246 button 2@ list_item 3@ input_text 24@
    then   
        repeat
        wait 0
        0B4A: samp 1@ = get_current_dialog_editbox_text
        chatmsg 1@ -1
        until 8B4C: not samp is_dialog_active -1
        
       end   
 
    end
    
    
    :cmd_mycmd
    0B3B: samp show_dialog id 246 caption "Dialog" text "text" button_1 "Yes" button_2 "No" style 1
    0B43: samp cmd_ret
 

Ravenous

Active member
Joined
Jan 21, 2016
Messages
61
Reaction score
4
Like this:
Code:
{$CLEO .cs}
0000: NOP


repeat
    wait 0
until SAMP.Available()
0B34: samp register_client_command "sgt" to_label @cmd_mycmd

while true
wait 0
alloc 24@ 256
0C11: memset destination 24@ value 0 size 256
    if     
    0B3C:  samp is_dialog_responded id 246 button 2@ list_item 3@ input_text 24@
    then
        if
        2@ == 1
        then
        chatmsg "%s" -1 24@
        end
    end   
free 24@
end
    
    
:cmd_mycmd
0B3B: samp show_dialog id 246 caption "Dialog" text "text" button_1 "Yes" button_2 "No" style 1
0B43: samp cmd_ret
 
Status
Not open for further replies.
Top