From Multi Theft Auto: Wiki
Revision as of 21:07, 24 July 2013 by Emiliano Castro (talk | contribs) (In server return "attempt to call global ( a nil value)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function allows you to disable the flying birds.


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 true if the birds state was changed succesfully, false if an invalid argument was specified.


This example Enables or Disables the Birds.

Click to collapse [-]
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.
addCommandHandler("birds",setBirdsState) -- Add the command handler attached to the function "setBirdsState".


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