News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: What is the codes to toggle buttons  (Read 1047 times)

0 Members and 1 Guest are viewing this topic.

Offline QWEQWEQWEQWEQWE

  • Jr. Member
  • **
  • Posts: 7
  • Busta
    • View Profile
What is the codes to toggle buttons
« 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

Offline Dacasin

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: What is the codes to toggle buttons
« Reply #1 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"()
« Last Edit: October 19, 2021, 08:35:21 AM by Dacasin »