Skip to content

world.setWeather

Sets the shared weather. Every player’s game changes to it.

world.setWeather(weather: number): Promise<ActionResult>
Name Type Description
weather number GTA:SA’s weather type, 0 to 22 (for example 8 is rain); all of them on Weather.

A promise of an ActionResult: applied once the server has changed it for everyone (also when it already was so), or rejected with vetoed when a server-side rule refused it. Out of range is invalid-weather.

gamemodes/my-mode.ts
import { world } from "nativemp";
await world.setWeather(8); // rain