Hello,
I've did a script a long time ago, but that was only with commands to write custom text message in chat or to get PlayerNames from IDs.. anyway.
Right now I want a script that detects an OPENED DIALOG and automatically selects from DIALOG based on a SET INTEGER.
I wanted to do something, but doesn't works. I don't like this C#. I am kinda more with JavaScript than C#.
If anyone wants to help me... hope you understand what I've wanted to do, my script:
Quick explanation what I request:
1. Press key "Z" to start/stop script to detect opened DIALOGS.
2. Once the script is started, to start detecting opened DIALOGS.
3. When a dialog is OPENED and the task Integer is 1 to select the 3rd item and then the 5th item and to close the dialog by the 1st button and set the task Integer to 2.
4. When a dialog is OPENED and the task Integer is 2 to select the 3rd item and then the 1st item and to close the dialog by the 1st button and set the task Integer back to 1.
I've did a script a long time ago, but that was only with commands to write custom text message in chat or to get PlayerNames from IDs.. anyway.
Right now I want a script that detects an OPENED DIALOG and automatically selects from DIALOG based on a SET INTEGER.
I wanted to do something, but doesn't works. I don't like this C#. I am kinda more with JavaScript than C#.
If anyone wants to help me... hope you understand what I've wanted to do, my script:
Code:
{$CLEO .cs}
0000: NOP
wait 8500 // until samp is ready
var
$TASKNUMBER : Int = 1
end
var
$BUTTON_PRESSED : Int = 0
end
while true
wait 0
if
0AB0: 90 {Z}
then
if
$BUTTON_PRESSED == 1
then
$BUTTON_PRESSED = 0
0AF8: "Script not running!"
else
$BUTTON_PRESSED = 1
0AF8: "Script running!"
end
end
if
0B4C: samp is_dialog_active -1
then
repeat
if
$BUTTON_PRESSED == 1
then
if
$TASKNUMBER == 1
then
0B49: samp set_current_dialog_list_item 3
wait 1000
0B49: samp set_current_dialog_list_item 5
$TASKNUMBER = 2
else
0B49: samp set_current_dialog_list_item 3
wait 1000
0B49: samp set_current_dialog_list_item 1
$TASKNUMBER = 1
end
end
until $BUTTON_PRESSED == 0
end
Quick explanation what I request:
1. Press key "Z" to start/stop script to detect opened DIALOGS.
2. Once the script is started, to start detecting opened DIALOGS.
3. When a dialog is OPENED and the task Integer is 1 to select the 3rd item and then the 5th item and to close the dialog by the 1st button and set the task Integer to 2.
4. When a dialog is OPENED and the task Integer is 2 to select the 3rd item and then the 1st item and to close the dialog by the 1st button and set the task Integer back to 1.
Last edited: