Problem description: can use the repeat function
Photo / Video (optional):
Code (the source on which to help you, if necessary):
if and
samp.IsDialogActive(-1)
1@ == 2
then
0B54: samp 5@ = listbox_items_count
5@ -= 2
alloc 4@ 128
for 6@ = 0 to 5@
0C11: memset destination 4@ value 0 size 128
samp.GetListboxItemText(6@, 4@)
if 0C29: $NOT_USED = stristr string1 4@ string2 "[ empty ]"
then
wait 150
0B47: samp close_current_dialog_with_button 0
chatmsg "{fc7c35}[{005470}TowCar_K{fc7c35}] {ebd4b5}All cars has been towed!" -1
1@ = 0
else
if 0C29: $NOT_USED = stristr string1 4@ string2 "(spawned)"
then
wait 150
0B49: samp set_current_dialog_list_item 6@
0B47: samp close_current_dialog_with_button 1
else
if 0C29: $NOT_USED = stristr string1 4@ string2 "(despawned)"
then
wait 250
0B49: samp set_current_dialog_list_item 6@
0B47: samp close_current_dialog_with_button 1
end
end
if not 5@ == 0
then
wait 10300
say "/towcar"
end
end
end
if not 1@ == 0
then
wait 150
0B47: samp close_current_dialog_with_button 0
chatmsg "{fc7c35}[{005470}TowCar_K{fc7c35}] {ebd4b5}All cars has been towed!" -1
1@ = 0
end
free 4@
1@ = 0
end
Other remarks: how or where should i add repeat so this thing can repeat itself everytime it says "{fc7c35}[{005470}TowCar_K{fc7c35}] {ebd4b5}All cars has been towed!"