GetWeather

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:12, 8 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

getWeather

Returns the canonical name of the server's authoritative weather state.

Syntax

string weather = getWeather()

Parameters

This function does not accept parameters.

Returns

Returns one of sunny, cloudy, rain1, rain2, or rain3.

Examples

Report the current weather to a player:

addCommandHandler("weather", function(playerId)
    outputChatBox("Current weather: " .. getWeather(), playerId)
end)

Notes

  • Available only in server-side resource scripts.
  • The returned value is server state, not a direct read from one client's renderer.