CLEO Help Command to dialog..

CLEO related
Status
Not open for further replies.

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
i want to do a command to open a Dialog.Create

someone can do a example code for me?

example: i type /open
and this open my dialog...

i tried so many times but i cant :/
im starter, sorry
 

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
example :
i want to do a command to open this dialog
PHP:
Dialog.Create(20@, "Menu i dont know")
Dialog.SetRECT(20@, 958, 285, 278, 463)
Dialog.AddCheckBox(20@, 2, "lean", 0, 25, 180, 25)
Dialog.AddCheckBox(20@, 3, "idk", 0, 50, 180, 25)
Dialog.AddCheckBox(20@, 4, "ik", 0, 75, 180, 25)


i type example : /open and this dialog will open with command
 

Parazitas

God
Joined
Jan 2, 2017
Messages
3,112
Solutions
5
Reaction score
878
Location
Lithuania
PHP:
{$CLEO .cs}

0000: NOP

REPEAT
wait 0
UNTIL samp.Available()

Dialog.Create(0@, "NOP Master")
Dialog.SetRECT(0@, 0, 290, 260, 290)
Dialog.AddCheckBox(0@, 1, "SetPos", 0, 0, 200, 40)
Dialog.AddCheckBox(0@, 2, "RemoveFromVeh", 0, 45, 200, 40)
Dialog.AddCheckBox(0@, 3, "EngineState", 0, 90, 200, 40)
Dialog.AddCheckBox(0@, 4, "Vehicle God", 0, 135, 200, 40)
Dialog.AddButton(0@, 5, "Close", 60, 240, 145, 20)
Dialog.SetVisible(0@,0)

0B34: samp register_client_command "show" to_label @ShowDialog

WHILE TRUE
WAIT 0
       

IF 
Dialog.IsVisible(0@)
THEN
    SAMP.ToggleCursor(1)
    IF
    Dialog.PopEvent(0@, 2@, 3@)
    THEN
        IF AND
        3@ == 5 // ID
        2@ == 257 // pressed
        THEN
            Dialog.SetVisible(0@,0)
            SAMP.ToggleCursor(0)
        END
    END
END // END Dialog.IsVisible(0@)  

IF
Dialog.CheckBoxIsChecked(0@,1)
THEN
    // make something
END
      
END // END WHILE TRUE
   
:ShowDialog
Dialog.SetVisible(0@, 1)
0B43: samp cmd_ret
 
Status
Not open for further replies.
Top