I try something like this, but I didn't get what I wanted
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA: SAMP_IS_READY
WHILE TRUE
WAIT 0
IF
0B4C: samp is_dialog_active 250
THEN
alloc 1@ 512 //alloc
0BD8: samp get_dialog_caption 3@
IF
0AD4: $NOT_NEEDED = scan_string 0@ format "Enter %d" 5@
THEN
alloc 2@ 8
format 2@ "%d" 5@
0AF9: samp say_msg "/locate %d" 0@
wait 2000
free 2@
free 5@
0B47: samp close_current_dialog_with_button 0
ELSE
0AF8: samp add_message_to_chat "Erro" color 0xFFFFFF 0@
END
END
END
SAMP.CmdRet()
//get number of dialog elements
0B54: samp 1@ = listbox_items_count
//substract one from total cout
1@ -= 1 //last item is actually the null terminator
chatmsg "num of elements %d" -1 1@
for 0@ = 0 to 1@
alloc 2@ = 1024
0B5B: samp get_listbox_item 0@ text_to 2@
chatmsg "element %d - text: %s" -1 0@ 2@
free 2@
end
ThanksPHP://get number of dialog elements 0B54: samp 1@ = listbox_items_count //substract one from total cout 1@ -= 1 //last item is actually the null terminator chatmsg "num of elements %d" -1 1@ for 0@ = 0 to 1@ alloc 2@ = 1024 0B5B: samp get_listbox_item 0@ text_to 2@ chatmsg "element %d - text: %s" -1 0@ 2@ free 2@ end
Have any command to get a specific line?You getting text fom every line..
use it.
Show what you made..Have any command to get a specific line?
Show what you made..
{$CLEO .cs}
0000:
REPEAT
WAIT 0
UNTIL 0AFA:
WHILE TRUE
WAIT 0
IF 0AB0: 123 // F12
THEN
REPEAT
WAIT 0
UNTIL 8AB0: 123
IF
6@ == false
THEN
6@ = 1
0AD1: "ON" 1337
ELSE
6@ = 0
0AD1: "OFF" 1337
END
END
IF
6@ == 1
THEN
0B54: samp 1@ = listbox_items_count
1@ -= 1
FOR 0@ = 0 to 1@
alloc 2@ = 256
0B5B: samp get_listbox_item 0@ text_to 2@
chatmsg "Elementos %d - Jogador(a): %s" -1 0@ 2@
0AF9: samp say_msg "/localizar %d" 0@
wait 5000
free 2@
END
END
END
What is your final destination??