SkatCh Posted January 9, 2015 Share Posted January 9, 2015 guys please can anyone explane to me what does it mean bool or when we need to use it or just an example . thx Link to comment
TAPL Posted January 9, 2015 Share Posted January 9, 2015 https://wiki.multitheftauto.com/wiki/Boolean Link to comment
Gallardo9944 Posted January 9, 2015 Share Posted January 9, 2015 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now