GetWaterColor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Undo revision 26172 by Kamek (talk))
Line 15: Line 15:
==Example==  
==Example==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function getWaterColor ( command ) --start function
--TODO
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 22:22, 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

--TODO

See Also