SetBirdsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Remove obsolete Requirements section)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Client function}}
This function allows you to disable the flying birds.
This function allows you to disable the flying birds.


Line 24: Line 25:
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>
==Requirements==
{{Requirements|1.3|1.3|}}


==See Also==
==See Also==
{{Client_world_functions}}
{{Client_world_functions}}

Latest revision as of 15:41, 7 November 2024

This function allows you to disable the flying birds.

Syntax

bool setBirdsEnabled ( bool enable )

Required Arguments

  • enabled: A boolean value determining if birds should be shown. Use true to show the birds and false to hide them.

Returns

Returns true if the birds state was changed succesfully, false if an invalid argument was specified.

Example

This example Enables or Disables the Birds.

Click to collapse [-]
Client
function setBirdsState()
	setBirdsEnabled(not getBirdsEnabled()) -- Disable the Birds if they're enabled, either Enable them.
	outputChatBox("The birds are now ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- Output the new Birds state.
end
addCommandHandler("birds",setBirdsState) -- Add the command handler attached to the function "setBirdsState".

See Also