GetBirdsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Needs Example}}__NOTOC__{{Client function}} This function will tell you if the birds are enabled or disabled. ==Syntax== <syntaxhighlight lang="lua"> bool getBirdsEnabled () </syntaxhighlight> ===Ret...")
 
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Needs Example}}__NOTOC__{{Client function}}
__NOTOC__
{{Client function}}
This function will tell you if the birds are enabled or disabled.  
This function will tell you if the birds are enabled or disabled.  


Line 10: Line 11:
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 the Birds 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 the birds state.
end
addCommandHandler("birds", areBirdsEnabled) -- Add the command handler attached to the function "areBirdsEnabled".
</syntaxhighlight>
</syntaxhighlight>
</section>


==Requirements==
==Requirements==
Line 19: Line 26:


==See Also==
==See Also==
{{World functions}}
{{Client_world_functions}}

Latest revision as of 06:08, 10 April 2014

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 the Birds state.

Click to collapse [-]
Client
function areBirdsEnabled()
	outputChatBox("The birds are currently ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- Output the birds state.
end
addCommandHandler("birds", areBirdsEnabled) -- Add the command handler attached to the function "areBirdsEnabled".

Requirements

Minimum server version 1.3
Minimum client version 1.3

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3" client="1.3" />

See Also