Bully-Board

Bully Modding Section => Modding Questions/Help => Topic started by: QWEQWEQWEQWEQWE on October 18, 2021, 05:39:54 AM

Title: What is the codes to toggle buttons
Post by: QWEQWEQWEQWEQWE on October 18, 2021, 05:39:54 AM
like

if I pressed a down arrow button,
the game clock freeze.
and if I pressed a down arrow again,
the game clock ran
Title: Re: What is the codes to toggle buttons
Post by: Dacasin on October 19, 2021, 08:29:27 AM
Copy this
Code: [Select]
  if IsButtonBeingPressed(3,0) then
  NoTrouble = not NoTrouble
    if NoTrouble then
        DisablePunishmentSystem(true)
TextPrintString("Disabled Trouble",1,2)
      else
        DisablePunishmentSystem(False)
TextPrintString("Enabled Trouble",1,2)
      end
   end
end
and paste to your Function "your code"()