Hello. I hope you are healthy.
Recently I wrote a code that a part of that code does not work well and is disrupted in the mod
Here is all the code:
{$CLEO}
thread "Service"
repeat
wait 0
until SAMP.Available()
0B63: "servicee"
0B34: "servicee" @Service
WHILE TRUE
WAIT 0
if 0B3C: samp is_dialog_responded id 1000 button 2@ list_item $item input_text 0
then
if 0AB0: is_key_pressed 27
then
0B47: samp close_current_dialog_with_button 1@
else if 0039: 2@ == 1
then
if $item == 0
then
0B3B: samp show_dialog id 1001 caption "Confirm" text "Do you agree to we continue !?" button_1 "Confirm" button_2 "Exit" style 0
$Servicee_item = 2
end
if $item == 1
then
0B3B: samp show_dialog id 1001 caption "Confirm" text "Do you agree to we continue !?" button_1 "Confirm" button_2 "Exit" style 0
$Servicee_item = 3
end
if $item == 2
then
0B3B: samp show_dialog id 1001 caption "Confirm" text "Do you agree to we continue !?" button_1 "Confirm" button_2 "Exit" style 0
$Servicee_item = 4
end
end
end
end
if 0B3C: samp is_dialog_responded id 1001 button 2@ list_item 0 input_text 0
then
if 0AB0: is_key_pressed 27
then
0B47: samp close_current_dialog_with_button 1@
else if 0039: 2@ == 1
then
if $Servicee_item == 2
then
say "First works well."
end
if $Servicee_item == 3
then
say "Second works well."
end
if $Servicee_item == 4
then
say "Third works well."
end
end
end
end
END
:Service
0AC6: 31@ = label @Service_list offset
0B3B: samp show_dialog id 1000 caption "Menu" text 31@ button_1 "Call" button_2 "Exit" style 2
SAMP.CmdRet()
:Service_list
hex
"First"A
"Seound"A
"Third"00
end
ret 0
The main problem is here:
if 0B3C: samp is_dialog_responded id 1001 button 2@ list_item 0 input_text 0
then
if 0AB0: is_key_pressed 27
then
0B47: samp close_current_dialog_with_button 1@
else if 0039: 2@ == 1
then
if $Servicee_item == 2
then
say "First works well."
end
if $Servicee_item == 3
then
say "Second works well."
end
if $Servicee_item == 4
then
say "Third works well."
end
No message will be sent when I confirm this option
0B3B: samp show_dialog id 1001 caption "Confirm" text "Do you agree to we continue !?" button_1 "Confirm" button_2 "Exit" style 0
What do you think could be the problem?
You also have a solution?