GetBirdsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (In Server side return false.)
Line 16: Line 16:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function areBirdsEnabled()
function areBirdsEnabled()
outputChatBox("The birds are currently ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- Output the Birds state.
outputChatBox("The birds are currently ".. (getBirdsEnabled() and "Enabled" or "Disabled") ..".") -- Output the birds state.
end
end
addCommandHandler("birds",areBirdsEnabled) -- Add the command handler attached to the function "areBirdsEnabled".
addCommandHandler("birds", areBirdsEnabled) -- Add the command handler attached to the function "areBirdsEnabled".
</syntaxhighlight>
</syntaxhighlight>
</section>
</section>

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

This template will be deleted.

See Also