Hello, i would like to have your help here, i'm quite advanced scripter but i can't find the mistake here. My opinion is that 0B4C: crashes the whole script. If i change 0B4C: for any other condition it's ok, the script works, but only for 0B4C: crashes.
What i wanna do is to type /sayhi and then i select a dialog from scoreboard and when it opens, it should enter ''sup bro'' as message in that dialog, then closes the dialog with left buttom.
i tried to change the code to this, however still crash.
I personaly don't wish to place the code inside ''WHILE TRUE'' loop because i want to add more commands like keybinds, and diferent stuff...
What might be the problem....
What i wanna do is to type /sayhi and then i select a dialog from scoreboard and when it opens, it should enter ''sup bro'' as message in that dialog, then closes the dialog with left buttom.
Code:
{$CLEO .cs}
//-------------MAIN---------------//
0000: NOP
REPEAT
WAIT 5000
UNTIL 0AFA:
0AF8: "Intructor.cs leaded! use /comand for help" 0xFF0080 {chatmsg}
0B34: "instructor" @ONOFF
0B34: "wave" @WAVE
0B34: "comand" @COMAND
WHILE TRUE
WAIT 0
END
:COMAND { THIS ONE WORKS PROPERLY, I HAVE NO PROBLEM WITH THIS LABEL}
WAIT 0
0AF8: "{FF0000}/comand: {FF0080}see list of commands." -1
Samp.CmdRet()
:WAVE { THIS IS THE LABEL WHERE I CRASH WHEN I TYPE THE COMMAND IN CHAT..}
WAIT 0
IF 12@ == 1
THEN
0AF8: "*It's ON" -1
REPEAT
WAIT 0
PRINTF "WAITING FOR THE DIALOG TO BE OPENED." 1000
UNTIL 0B4C: samp is_dialog_active 14
////////////////////////////////////CLEO CRASHES WHEN ARRIVES TO: UNTIL 0B4C: samp is_dialog_active 14 ///////////////////////////////////////////////////////
0B4B: samp set_current_dialog_editbox_text "sup bro" {text message inside dialog}
0B47: samp close_current_dialog_with_button 1 {send buttom}
END
Samp.CmdRet()
:ONOFF
0B12: 12@ = 12@ XOR 1
IF 12@ == 1
THEN
PRINTF "CLEONAME ~G~[ON]" 500
END
IF 12@ == 0
THEN
PRINTF "CLEONAME ~R~[OFF]" 500
END
Samp.CmdRet()
i tried to change the code to this, however still crash.
Code:
:WAVE
WAIT 0
IF
0B4C: samp is_dialog_active 14 {I TRIED: -1 AND 1@ AND STILL CRASH}
JF @WAVE
PRINTF "ENTER YOUR TEXT MESSAGE NOW" 1000
0B4B: samp set_current_dialog_editbox_text "sup bro" {text message inside dialog}
0B47: samp close_current_dialog_with_button 1 {send buttom}
Samp.CmdRet()
I personaly don't wish to place the code inside ''WHILE TRUE'' loop because i want to add more commands like keybinds, and diferent stuff...
What might be the problem....