GetBirdsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
Line 10: Line 10:
Returns ''true'' if the birds are enabled or ''false'' if the birds are disabled.  
Returns ''true'' if the birds are enabled or ''false'' if the birds are disabled.  


==Example==
==Example==  
This example outputs a message with the Birds current state.
<section name="Client" class="client" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
-- todo
function areBirdsEnabled()
  outputChatBox("The birds are currently ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- output if the Birds are Enabled or Disabled.
end
addCommandHandler("birds",areBirdsEnabled) -- add the command handler.
</syntaxhighlight>
</syntaxhighlight>
</section>


==Requirements==
==Requirements==

Revision as of 23:05, 28 January 2012

Accessories-text-editor.png Script Example Missing Function GetBirdsEnabled needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This function will tell you if the birds are enabled or disabled.

Syntax

bool getBirdsEnabled ()

Returns

Returns true if the birds are enabled or false if the birds are disabled.

Example

This example outputs a message with the Birds current state.

Click to collapse [-]
Client
function areBirdsEnabled()
   outputChatBox("The birds are currently ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- output if the Birds are Enabled or Disabled.
end
addCommandHandler("birds",areBirdsEnabled) -- add the command handler.

Requirements

This template will be deleted.

See Also