SetBirdsEnabled: Difference between revisions
Jump to navigation
Jump to search
(Created page with "{{Needs Example}}__NOTOC__{{Client function}} This function allows you to disable the flying birds. ==Syntax== <syntaxhighlight lang="lua"> bool setBirdsEnabled ( bool enable ) </syntaxhighlight> ===Req...") |
m (In server return "attempt to call global ( a nil value) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | |||
{{Client function}} | |||
This function allows you to disable the flying birds. | This function allows you to disable the flying birds. | ||
Line 13: | Line 14: | ||
Returns ''true'' if the birds state was changed succesfully, ''false'' if an invalid argument was specified. | Returns ''true'' if the birds state was changed succesfully, ''false'' if an invalid argument was specified. | ||
==Example== | ==Example== | ||
This example Enables or Disables the Birds. | |||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | 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". | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==Requirements== | ==Requirements== | ||
Line 22: | Line 30: | ||
==See Also== | ==See Also== | ||
{{ | {{Client_world_functions}} |
Latest revision as of 21:07, 24 July 2013
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 [-]
Clientfunction 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".
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
- areTrafficLightsLocked
- createSWATRope
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getBirdsEnabled
- getCloudsEnabled
- getCoronaReflectionsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGravity
- getGroundPosition
- getHeatHaze
- getInteriorFurnitureEnabled
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getNearClipDistance
- getOcclusionsEnabled
- getPedsLODDistance
- getPlayerBlurLevel
- getRainLevel
- getRoofPosition
- getScreenFromWorldPosition
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getVehiclesLODDistance
- getWeather
- getWindVelocity
- getWorldFromScreenPosition
- getZoneName
- isAmbientSoundEnabled
- isGarageOpen
- isLineOfSightClear
- isWorldSoundEnabled
- isWorldSpecialPropertyEnabled
- processLineOfSight
- removeWorldModel
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetNearClipDistance
- resetPedsLODDistance
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetVehiclesLODDistance
- resetWindVelocity
- resetWorldSounds
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setAmbientSoundEnabled
- setBirdsEnabled
- setCloudsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setJetpackMaxHeight
- setMinuteDuration
- setMoonSize
- setNearClipDistance
- setOcclusionsEnabled
- setPedsLODDistance
- setPlayerBlurLevel
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightsLocked
- setTrafficLightState
- setVehiclesLODDistance
- setWeather
- setWeatherBlended
- setWindVelocity
- setWorldSoundEnabled
- setWorldSpecialPropertyEnabled
- testLineAgainstWater