HELP with MENU CheckBox

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
I need help with Dialog.AddCheckBox


I want a menu with this cheat, but I do not know how to make it work

example:

// register the Cheat dialog..
Dialog.AddCheckBox(20@, 1, "NoReload", 5, 105, 180, 15)


// For work the cheat


IF 0B92: dialog 20@ is_checked 1
Player.Defined($PLAYER_CHAR)
THEN
0470: 1@ = actor $PLAYER_ACTOR current_weapon
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, 1@, 0)
wait 150
END


This code is not working, how to make it work
 

Hidend

Expert
Joined
Mar 4, 2013
Messages
628
Reaction score
42
Have you ever tried to add some messages to debug?
 

Edvincik

Well-known member
Joined
Mar 15, 2016
Messages
399
Reaction score
26
my problem its do that work

Player.Defined($PLAYER_CHAR)
THEN
0470: 1@ = actor $PLAYER_ACTOR current_weapon
Actor.GiveWeaponAndAmmo($PLAYER_ACTOR, 1@, 0)

Code:
IF AND
    0B92:  dialog 20@ checkbox 1 is_checked
    0256:   player $PLAYER_CHAR defined
THEN 
    0470: 1@ = actor $PLAYER_ACTOR current_weapon 
    01B2: give_actor $PLAYER_ACTOR weapon 1@ ammo 0
    WAIT 150 
END
 

MalikeiraOPoder

Active member
Joined
Mar 16, 2019
Messages
100
Reaction score
2
Show us your code

Dialog.AddCheckBox(20@, 1, "NoReload", 5, 105, 180, 15)


IF AND
0B92: dialog 20@ checkbox 1 is_checked
0256: player $PLAYER_CHAR defined
THEN
0470: 1@ = actor $PLAYER_ACTOR current_weapon
01B2: give_actor $PLAYER_ACTOR weapon 1@ ammo 0
WAIT 150
END


I did so..
 
Top