[shcode=cpp]
{$Cleo .cs}
0000: NOP
REPEAT
WAIT 0
UNTIL 0AFA:
if 0AAB: file_exists "CLEO\INI\Settings.ini"
then
0AF0: 1@ getint "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
0AF0: 2@ getint "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
else
0AF1: write_int 500 to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
0AF1: write_int 500 to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
end
Dialog.Create(0@, "Hack Pack ")
Dialog.SetRECT(0@, 1@, 2@, 260, 150)
/// Dialog Background color
Dialog.SetBackgroundColor(0@, -16777216)
/// Dialog check Box
Dialog.AddCheckBox(0@, 1, "{FF0000}Check to move dialog", 10, 10, 200, 20)
Dialog.AddButton(0@, 5, "Close", 80, 110, 70, 20)
/// Dialog minimize off
Dialog.SetMinimized(0@, 0)
/// Dialog CheckBox colors
Dialog.SetCheckBoxColor(0@, 1, -15952405)
/// Dialog set not visibile
Dialog.SetVisible(0@,0)
/*******************************************/
Dialog.Create(21@, "Hack Pack ")
Dialog.SetRECT(21@, 1@, 2@, 260, 150)
/// Dialog Background color
Dialog.SetBackgroundColor(21@, -16777216)
/// Dialog check Box
Dialog.AddCheckBox(21@, 1, "{FF0000}Check to move dialog", 10, 10, 200, 20)
Dialog.AddButton(21@, 5, "Close", 80, 110, 70, 20)
/// Dialog minimize off
Dialog.SetMinimized(21@, 0)
/// Dialog CheckBox colors
Dialog.SetCheckBoxColor(21@, 1, -15952405)
/// Dialog set not visibile
Dialog.SetVisible(21@,0)
0B34: "dialog" @ShowDialog
0B34: "dialog2" @ShowDialog_2
while true
wait 0
if Dialog.IsVisible(0@)
then
SAMP.ToggleCursor(1)
if 0B81: dialog 0@ pop_event_to 2@ control_id_to 3@
then
if and
3@ == 1
0B92: dialog 0@ checkbox 3@ is_checked
then
//move dialog
Dialog.GetRECT(0@, 3@, 4@, 5@, 6@)
0B5E: get_cursor_pos 1@ 2@
000C: 3@ -= 1@
000C: 4@ -= 2@
while 8B81: dialog 0@ pop_event_to $n control_id_to $n
wait 0
0B5E: get_cursor_pos 1@ 2@
000A: 1@ += 3@
000A: 2@ += 4@
Dialog.SetRECT(0@, 1@, 2@, 5@, 6@)
end
//save position, will auto create file if doesn\'t exist
Dialog.GetRECT(0@, 3@, 4@, 5@, 6@)
0AF1: write_int 3@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
0AF1: write_int 4@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
end
if and
3@ == 5
2@ == 257
then
Dialog.SetVisible(0@,0)
SAMP.ToggleCursor(0)
end
end
end
if Dialog.IsVisible(21@)
then
SAMP.ToggleCursor(1)
if 0B81: dialog 21@ pop_event_to 2@ control_id_to 3@
then
if and
3@ == 1
0B92: dialog 21@ checkbox 3@ is_checked
then
//move dialog
Dialog.GetRECT(21@, 3@, 4@, 5@, 6@)
0B5E: get_cursor_pos 1@ 2@
000C: 3@ -= 1@
000C: 4@ -= 2@
while 8B81: dialog 21@ pop_event_to $n control_id_to $n
wait 0
0B5E: get_cursor_pos 1@ 2@
000A: 1@ += 3@
000A: 2@ += 4@
Dialog.SetRECT(21@, 1@, 2@, 5@, 6@)
end
//save position, will auto create file if doesn\'t exist
Dialog.GetRECT(21@, 3@, 4@, 5@, 6@)
0AF1: write_int 3@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionxy"
0AF1: write_int 4@ to_ini_file "Cleo\INI\Settings.ini" section "DialogPosition" key "Positionz"
end
if and
3@ == 5
2@ == 257
then
Dialog.SetVisible(21@,0)
SAMP.ToggleCursor(0)
end
end
end
end
:ShowDialog
Dialog.SetVisible(0@, 1)
SAMP.ToggleCursor(1)
0B43:
:ShowDialog_2
Dialog.SetVisible(21@, 1)
SAMP.ToggleCursor(1)
0B43:
[/shcode]