---
title: "SetPlayerWeather | open.mp"
description: "Magtakda ng panahon ng manlalaro."
canonical: https://omp.itsneufox.com/fil/docs/scripting/functions/SetPlayerWeather
language: fil
---

# SetPlayerWeather

## Description

Magtakda ng panahon ng manlalaro.

| Name | Description |
| --- | --- |
| playerid | Ang ID ng player na ang panahon ay itatakda. |
| weather | Ang [weather](https://omp.itsneufox.com/fil/docs/scripting/resources/weatherid) na itatakda. |

## Returns

Ang function na ito ay hindi nagbabalik ng anumang value.

## Examples

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/storm", true))
    {
        SetPlayerWeather(playerid, 8);
        return 1;
    }
    return 0;
}
```

## Notes

note

Kung pinagana ang TogglePlayerClock, dahan-dahang magbabago ang panahon sa paglipas ng panahon, sa halip na agad na magbago. Mayroon lamang valid na 21 weather ID sa laro (0 - 20), gayunpaman ang laro ay walang anumang anyo ng range check.

## Related Functions

-   [SetWeather](https://omp.itsneufox.com/fil/docs/scripting/functions/SetWeather): Itakda ang pandaigdigang panahon.
-   [SetGravity](https://omp.itsneufox.com/fil/docs/scripting/functions/SetGravity): Itakda ang global gravity.
