MalikeiraOPoder
Active member
- Joined
- Mar 16, 2019
- Messages
- 100
- Reaction score
- 2
Here is my code
I want to add this code NoReloadGuns on CheckBox for work
Below is the Code
and i want to add NoSpread on AddButton, when is ON , stay green the button and when is off, stay default
Someone can help me ?
PHP:
{$CLEO}
{$INCLUDE SF}
thread "MENU TEST"
CONST
PLAYER $PLAYER_ACTOR
CHAR $PLAYER_CHAR
D_HELP 666
D_WIDTH 160 // 320
D_HEIGHT 135 // 305
K_MENU 113 //F2 for open the Dialog
HEX_G 0x66FF33 //Green
END
repeat
wait 40
until SAMP.Available()
//DIALOG
Dialog.Create(20@, "MENU")
Dialog.SetRECT(20@, 0, 0, D_WIDTH, D_HEIGHT)
Dialog.AddCheckBox(20@, 1, "NoReload Guns", 5, 30, 180, 15)
Dialog.AddButton(20@, 2, "NoSPREAD", 5, 70, 125, 25)
Dialog.SetVisible(20@, 0)
wait 3000
WHILE TRUE
WAIT 0
IF
key_down K_MENU
THEN
IF 0B87: dialog 20@ is_visible
THEN
IF 8B92: not dialog 20@ is_checked 1
THEN
0330: CHAR 0
04D8: PLAYER 1
08C6: PLAYER 0
END
02AB: PLAYER 0 0 0 0 0
0@ = 0
ELSE
00A0: PLAYER to 1@ 2@ 3@
0980: 1@ 2@ 3@ 200.0
0@ = 1
END
call @ToggleDialog 2 20@ 0@
wait 200
END
Dialog.PopEvent(20@, 0, 12@)
IF 12@ > 0
THEN
018C: play_sound 1083 at 0.0 0.0 0.0
END
IF
0B92: dialog 20@ is_checked 1
THEN
// Code NoReload Guns here
END
IF 12@ == 2
THEN
alloc 0@ 20
format 0@ "{%X}NoSPREAD: ON" HEX_G
Dialog.SetControlText(20@, 2, 0@)
free 0@
// noSpread Code Here when is ON
ELSE
Dialog.SetControlText(20@, 2, "NoSPREAD")
// noSpread Code here When is OFF
END
END
:ToggleDialog
0B86: 0@ 1@
0B5D: 1@
ret 0
I want to add this code NoReloadGuns on CheckBox for work
Below is the Code
PHP:
Player.Defined(CHAR)
THEN
0470: 1@ = actor PLAYER current_weapon
Actor.GiveWeaponAndAmmo(PLAYER, 1@, 0)
wait 150
end
and i want to add NoSpread on AddButton, when is ON , stay green the button and when is off, stay default
Someone can help me ?