跳到主要内容

SetPlayerWeather

描述

设置玩家的天气。

名称说明
playerid要设置天气的玩家 ID
weather要设置的天气

返回值

本函数不返回任何特定值。

示例

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

注意

提示
  • 若已启用TogglePlayerClock,天气会逐渐变化而非立即切换
  • 游戏实际仅有 21 个有效天气 ID(0-20),但系统不会进行范围校验

相关函数

相关资源