SetSunSize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
Line 24: Line 24:
addCommandHandler("setsunsize", commandSetSunSize)
addCommandHandler("setsunsize", commandSetSunSize)
</syntaxhighlight>
</syntaxhighlight>
==See Also==
==See Also==
{{World functions}}
{{World functions}}

Latest revision as of 12:03, 29 March 2013

This function is used to set the size of the sun.

Syntax

bool setSunSize ( int Size )

Required Arguments

  • Size: The size you want the sun to be in the sky.

Returns

Returns true if the size of the sun was set, false otherwise.

Example

This example lets any player set the size of the sun like /setsunsize 2

function commandSetSunSize(player, command, size)
    local size = tonumber(size)
    if (not size) then return end -- They didn't use a number
    setSunSize(size)
end
addCommandHandler("setsunsize", commandSetSunSize)

See Also