KamikazeSripterul
Well-known member
- Joined
- Jun 30, 2019
- Messages
- 353
- Reaction score
- 23
Hey guys. I have thought of the idea of making a feature to a dialog that samp doesn't have it. So this is what I thought:
If you are on the first item of a dialog, and you press up arrow, it would automatically go to the last item and vice versa. So basically you wouldn't have to press down arrow in a looooong dialog, you'd just press up arrow and you're the bottom (also working the other way around however I haven't managed to do that just yet). This is the code, and it simply doesn't work. If anybody could help me please?
If you are on the first item of a dialog, and you press up arrow, it would automatically go to the last item and vice versa. So basically you wouldn't have to press down arrow in a looooong dialog, you'd just press up arrow and you're the bottom (also working the other way around however I haven't managed to do that just yet). This is the code, and it simply doesn't work. If anybody could help me please?
Code:
{$CLEO}
{$INCLUDE SF}
0000:
thread ""
repeat
wait 0
until SAMP.Available()
0B34: "restart" @test
WHILE TRUE
WAIT 0
IF SAMP.IsDialogActive(0@)
THEN
wait 250
0B48: samp 1@ = get_current_dialog_list_item
IF AND
1@ == 0
0AB0: key_pressed 38
THEN
wait 250
0B54: samp 2@ = listbox_items_count
chatmsg "%d" -1 2@
0B49: samp set_current_dialog_list_item 2@
END
END
END
:test
SAMP.IsCommandTyped(20@)
004E: end_thread
0C62: exec_console_command "cs LastFirstItem.cs"
SAMP.CmdRet()
Last edited: