DuFF
Member
- Joined
- Apr 5, 2014
- Messages
- 20
- Reaction score
- 0
Hello!
I would like to ask.. Is there any way how to open dialog on server if I know the dialog's ID? For example I know that ID of registration dialog is 1, so how can I open it?
I have already tried this code, which I made myself:
So at first, I used /getid when registration dialog was opened. I found out that it's ID is 1. After that I closed that dialog and I typed /dialog 1 1 (I wanted to open it using 0B86) and my game crashed.
Thank you for help guys..
I would like to ask.. Is there any way how to open dialog on server if I know the dialog's ID? For example I know that ID of registration dialog is 1, so how can I open it?
I have already tried this code, which I made myself:
{$CLEO .cs}
thread 'DIALOG'
:Load
wait 30
if
SAMP.Available
else_jump @Load
0B34: samp register_client_command "dialog" to_label @DIALOG
0B34: samp register_client_command "getid" to_label @GETID
while true
wait 0
end
IALOG
0B35: samp 0@ = get_last_command_params
if
0AD4: 1@ = scan_string 0@ format "%d %d" 2@ 3@
then
0B86: dialog 2@ set_visible 3@
else
0AF8: samp add_message_to_chat "/dialog <ID> <0/1>" color -1
end
SAMP.CmdRet
:GETID
0B4E: samp 1@ = get_current_dialog_id
alloc 29@ 64
format 29@ "ID of current dialog = %d" 1@
0AF8: samp add_message_to_chat 29@ -1
SAMP.CmdRet
thread 'DIALOG'
:Load
wait 30
if
SAMP.Available
else_jump @Load
0B34: samp register_client_command "dialog" to_label @DIALOG
0B34: samp register_client_command "getid" to_label @GETID
while true
wait 0
end
IALOG
0B35: samp 0@ = get_last_command_params
if
0AD4: 1@ = scan_string 0@ format "%d %d" 2@ 3@
then
0B86: dialog 2@ set_visible 3@
else
0AF8: samp add_message_to_chat "/dialog <ID> <0/1>" color -1
end
SAMP.CmdRet
:GETID
0B4E: samp 1@ = get_current_dialog_id
alloc 29@ 64
format 29@ "ID of current dialog = %d" 1@
0AF8: samp add_message_to_chat 29@ -1
SAMP.CmdRet
So at first, I used /getid when registration dialog was opened. I found out that it's ID is 1. After that I closed that dialog and I typed /dialog 1 1 (I wanted to open it using 0B86) and my game crashed.
Thank you for help guys..