CLEO HELP Command to dialog..

MalikeiraOPoder

Well-Known Member
Joined
Mar 16, 2019
Messages
65
Likes
2
Points
8
5
#1
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
 
OP
OP
M

MalikeiraOPoder

Well-Known Member
Joined
Mar 16, 2019
Messages
65
Likes
2
Points
8
5
#3

Parazitas

Well-Known Member
Joined
Jan 2, 2017
Messages
1,409
Likes
153
Points
78
Location
Lithuania
Website
ugbase.eu
15
#6
PHP:
{$CLEO .cs}

0000: NOP

REPEAT
wait 0
UNTIL samp.Available()

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

0B34: samp register_client_command "show" to_label @ShowDialog

WHILE TRUE
WAIT 0
       

IF 
Dialog.IsVisible([email protected])
THEN
    SAMP.ToggleCursor(1)
    IF
    Dialog.PopEvent([email protected], [email protected], [email protected])
    THEN
        IF AND
        [email protected] == 5 // ID
        [email protected] == 257 // pressed
        THEN
            Dialog.SetVisible([email protected],0)
            SAMP.ToggleCursor(0)
        END
    END
END // END Dialog.IsVisible([email protected])  

IF
Dialog.CheckBoxIsChecked([email protected],1)
THEN
    // make something
END
      
END // END WHILE TRUE
   
:ShowDialog
Dialog.SetVisible([email protected], 1)
0B43: samp cmd_ret
 
Top