GetWaterColor: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function returns the water color of the GTA world. '''Note:''' The server can only return the water color, if it has actually been set ...") |
|||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
-- | function getWaterColor ( command ) --start function | ||
local color = getWaterColor() -- color as getWaterColor | |||
outputChatBox( "Water color is " .. color .. " !", source ) --outputchatbox for water color | |||
end | |||
addCommandHandler( "getwatercolor", getWaterColor ) --add a command "getwatercolor" | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Client water functions}} | {{Client water functions}} |
Revision as of 20:32, 25 June 2011
This function returns the water color of the GTA world.
Note: The server can only return the water color, if it has actually been set by script.
Syntax
int, int, int, int getWaterColor ( )
Returns
Returns 4 ints, indicating the color of the water. (RGBA)
Example
function getWaterColor ( command ) --start function local color = getWaterColor() -- color as getWaterColor outputChatBox( "Water color is " .. color .. " !", source ) --outputchatbox for water color end addCommandHandler( "getwatercolor", getWaterColor ) --add a command "getwatercolor"
See Also
- getWaterLevel
- isWaterDrawnLast
- setWaterDrawnLast
- Shared
- createWater
- getWaterColor
- getWaterVertexPosition
- getWaveHeight
- resetWaterColor
- resetWaterLevel
- setWaterColor
- setWaterLevel
- setWaterVertexPosition
- setWaveHeight