Jump to content

about bool


SkatCh

Recommended Posts

local MTAIsCool = true -- we set it to be true 
if MTAIsCool == true then -- you can use "if MTAIsCool then" 
  outputChatBox("Yeah, MTA is cool") 
else 
  outputChatBox("You will never get this message in the chat") -- because MTAISCool is true 
end 
  
local MTAIsCool = false -- and now it's false 
if MTAIsCool == true then -- check again... 
  outputChatBox("You will never get this message in the chat") -- because MTAISCool is false 
else 
  outputChatBox("MTA is not cool anymore, eh") 
end 
  
local MTAIsCool = not MTAIsCool -- invert it from false to true (if it was true, it becomes false) 
if MTAIsCool == true then -- you can use "if MTAIsCool then" 
  outputChatBox("Hell yeah, MTA is cool again") 
else 
  outputChatBox("You will never get this message in the chat") -- because MTAISCool is true 
end 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...