From 5a3d2a496ae8bef039e0ff5d84d74f4da57cbf2c Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 15 Dec 2017 21:13:53 +0000 Subject: [PATCH] Learnt that radio buttons cant be toggled off. --- control.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/control.lua b/control.lua index 147b95fb..f35ed60f 100644 --- a/control.lua +++ b/control.lua @@ -97,10 +97,8 @@ end,function(player,element) player.cheat_mode = false end) -radio_test = Gui.inputs.add_checkbox('test-radio',true,'Cheat Mode',function(parent) - return game.players[parent.player_index].cheat_mode +radio_test = Gui.inputs.add_checkbox('test-radio',true,'Kill Self',function(parent) + return game.players[parent.player_index].in_combat end,function(player,element) - player.cheat_mode = true -end,function(player,element) - player.cheat_mode = false + if player.character then player.character.die() end end) \ No newline at end of file