Jump to content

D J C

VIP
  • Posts

    1678
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by D J C

  1. What I Hate more than anything is a liar, a charlatan, someone who doesn't believe in what they say.

  2. Problem solved. Thanks for the great support.
  3. WHILE TRUE WAIT 0 if 0C89: key_just_pressed 0x1B then Dialog.SetVisible(0@, False) SAMP.SetCursorMode(0) end if Dialog.IsVisible(0@) then SAMP.SetCursorMode(2) Dialog.ListBoxGetSelectedAndCount(0@, 1, 5@, -1) if Dialog.PopEvent(0@, 3@, 4@) then if 4@ == 1 //Select then if 5@ == 1 //RowID then chatmsg "You selected Row 1 and pressed button 1" -1 wait 1000 //Anti spam end if 5@ == 2 //RowID then chatmsg "You selected Row 2 and pressed button 2" -1 wait 1000 //Anti spam end if 5@ == 3 //RowID then chatmsg "You selected Row 3 and pressed button 3" -1 wait 1000 //Anti spam end end if 4@ == 2 //Exit then Dialog.SetVisible(0@, False) SAMP.SetCursorMode(0) end end end END Seems I have mistake here, Now... When: I select "Row 1" Doesn't work. I select "Row 2" This gonna work -> chatmsg "You selected Row 1 and pressed button 1" -1 I select "Row 3" This gonna work -> chatmsg "You selected Row 2 and pressed button 2" -1 :CreateDialog Dialog.Create(0@, "DialogTitle") SAMP.GetScreenResolution(1@, 2@) 1@ /= 2 2@ /= 2 1@ -= 100 2@ -= 100 Dialog.SetRECT(0@, 1@, 2@, 469, 410) Dialog.AddListBox(0@, 1, 3, 3, 460, 340) Dialog.AddButton(0@, 1, "Select", 30, 350, 150, 35) Dialog.AddButton(0@, 2, "Exit", 250, 350, 150, 35) Dialog.ListBoxInsertElement(0@, 1, "Row 1", 1, -1) Dialog.ListBoxInsertElement(0@, 1, "Row 2", 2, -1) Dialog.ListBoxInsertElement(0@, 1, "Row 3", 3, -1) What is your solution?
  4. I also commented. I hope you always work in this field ❤️
  5. No yet. How do I add an option to the dialog? And by choosing it, do something special for me
  6. Aight, the problem has fixed, and actually it was my fault... Now, i decide to make Binder it, EX: When i pressed ESC, Dialog.SetVisible(0@, False) | SAMP.SetCursorMode(0). WHILE TRUE WAIT 0 if Dialog.IsVisible(0@) then SAMP.SetCursorMode(2) if 0C89: key_just_pressed 0x1B then Dialog.SetVisible(0@, False) SAMP.SetCursorMode(0) if Dialog.PopEvent(0@, 3@, 4@) then if 4@ == 1 then say "You clicked on button 1" end if 4@ == 2 then say "You clicked on button 2" end if 4@ == 3 then say "You clicked on button 3" end end end end END This method, ESC button can hide the dialog, but his buttons doesn't work at all, so i decide to Bring "If key just pressed" code in below: WHILE TRUE WAIT 0 if Dialog.IsVisible(0@) then SAMP.SetCursorMode(2) if Dialog.PopEvent(0@, 3@, 4@) then if 4@ == 1 then say "You clicked on button 1" end if 4@ == 2 then say "You clicked on button 2" end if 4@ == 3 then say "You clicked on button 3" end if 0C89: key_just_pressed 0x1B //ESC Button then Dialog.SetVisible(0@, False) SAMP.SetCursorMode(0) end end end END Now, ESC doesn't work, Buttons work well, ? What's the problem !? EDIT: Problem fixed WHILE TRUE WAIT 0 if 0C89: key_just_pressed 0x1B then Dialog.SetVisible(0@, False) SAMP.SetCursorMode(0) end if Dialog.IsVisible(0@) then SAMP.SetCursorMode(2) if Dialog.PopEvent(0@, 3@, 4@) then if 4@ == 1 then say "You clicked on button 1" end if 4@ == 2 then say "You clicked on button 2" end if 4@ == 3 then say "You clicked on button 3" end end end END
  7. Neah I actually fixed that: {$CLEO} 0000: repeat wait 0 until 0AFA: gosub @CreateDialog 0B34: "showdialog" @ShowDialog 0B34: "hidedialog" @HideDialog WHILE TRUE WAIT 0 ......... But still I had the same Issue. BTW, Also when I run the game. The dialogue opens automatically without me doing anything
  8. The script has a problem. The game screen sometimes turns black and returns to original state + Fps drop.
  9. Now, Where is these highlights came from ? It's related with positions or somewhat like that ? I wrote something now, and it actually failed, (Game has been slow-motion and black screens) {$CLEO} 0000: repeat wait 0 until 0AFA: gosub @Dialog 0B34: "test" to @test 0B34: "reset" to @reset while true wait 0 if Dialog.IsVisible(0@) then if 0C89: key_just_pressed 0x1B then if Dialog.IsVisible(0@) then Dialog.SetVisible(0@, 0) 0B8D: samp set_cursor_mode 0 end end if Dialog.IsVisible(0@) then 0B8D: samp set_cursor_mode 2 end END :Dialog Dialog.Create(0@, "Test") SAMP.GetScreenResolution(1@, 2@) 1@ /= 2 2@ /= 2 1@ -= 100 2@ -= 100 Dialog.SetRECT(0@, 1@, 2@, 469, 410) Dialog.AddListBox(0@, 0, 3, 3, 460, 340) Dialog.AddButton(0@, 1, "Exit", 283, 350, 150, 35) Dialog.AddButton(0@, 2, "Select", 33, 350, 150, 35) Dialog.SetVisible(0@, False) return :test gosub @Dialog Dialog.SetVisible(0@, 1) cmdret :reset 0A92: create_custom_thread "test.cs" 0A93: end_custom_thread 0ACD: show_text_highpriority "reloaded" time 1337 SAMP.CmdRet() But it seems like the main problem is from the Loop, (While true).
  10. I just decided to work on this one first. But it seems like a very difficult thing to me and it really confuses me a bit. Can you give me the necessary explanations with a simple code and explanations? If you can. Create a dialogue. The dialog has 2 buttons and 3 options: Ex: Option one | Option two | Option three And when I select the button this code should work: 0AF9: samp say_msg "I pressed the X Option".
    This update, it's actually sick!! Keep it up and much love!!
  11. ● Nume: DjC ● Rang: (5) Capitan ● Tipul de activitate: Gun Game & Hide and Seek ● Data și ora activității: 21/02/2021 Ora 20:00 ● Membri prezenți: https://imgur.com/a/zZ4o418 ● Membri învoiți: https://imgur.com/a/JumW41A ● Membri absenți: https://imgur.com/a/x31LM1v ● Alte precizări: I appreciate your presence in this Training and I hope I was able to entertain you a little, Thanks @South Andu For the help.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.