Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
186 changes: 183 additions & 3 deletions frontend/i18n/zh-CN/code.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,19 @@
"description": "The title of the tag list page"
},
"animations.title": {
"message": "open.mp动画预览器",
"message": "open.mp 动画查看器",
"description": "Animations page title"
},
"animations.subtitle": {
"message": "浏览并预览 open.mp 中所有可用的动画。",
"description": "Animations page subtitle"
},
"animations.library": {
"message": "动作库:",
"message": "动画库:",
"description": "Library label"
},
"animations.selectLibrary": {
"message": "选择动作库...",
"message": "选择动画库...",
"description": "Select library option"
},
"animations.animation": {
Expand Down Expand Up @@ -1795,5 +1795,185 @@
"skins.additionalHint": {
"message": "于 SA-MP 0.3.7 RC3 新增,旧版客户端没有",
"description": "Tooltip on the badge of skins 300 to 311"
},
"faq.help.title": {
"message": "还是没解决?",
"description": "Title of the card at the end of the FAQ"
},
"faq.help.copy": {
"message": "去社区问问吧。说明你尝试过什么、收到了什么报错,通常很快就能得到帮助。",
"description": "Text of the card at the end of the FAQ"
},
"faq.help.forum": {
"message": "论坛",
"description": "Button to the open.mp forum"
},
"serverInfo.joined.opening": {
"message": "启动器现在应该正在打开游戏。",
"description": "Shown after pressing Join, while the launcher opens"
},
"serverInfo.joined.didntWork": {
"message": "没成功?{retry}重试。",
"description": "Shown after pressing Join. {retry} opens the server with samp:// instead."
},
"serverInfo.joined.retry": {
"message": "点击这里",
"description": "Link that retries joining through samp://"
},
"serverInfo.joined.download": {
"message": "还是没反应?你可能需要安装 {link}。",
"description": "Shown after pressing Join, under the retry line. {link} links to the launcher download page."
},
"docsIntro.tools.animations": {
"message": "动画",
"description": "Docs intro tool name"
},
"docsIntro.tools.animations.copy": {
"message": "全部动画,附视频预览。",
"description": "Docs intro tool description"
},
"docsIntro.tools.vehicles": {
"message": "载具",
"description": "Docs intro tool name"
},
"docsIntro.tools.vehicles.copy": {
"message": "浏览全部载具模型及其 ID。",
"description": "Docs intro tool description"
},
"docsIntro.tools.models": {
"message": "模型查看器",
"description": "Docs intro tool name"
},
"docsIntro.tools.models.copy": {
"message": "在 open.mp 模型库中查找物体模型。",
"description": "Docs intro tool description"
},
"docsIntro.tools.playground": {
"message": "Pawn 演练场",
"description": "Docs intro tool name"
},
"docsIntro.tools.playground.copy": {
"message": "在浏览器中编写、编译并运行 Pawn 代码。",
"description": "Docs intro tool description"
},
"docsIntro.tools.packages": {
"message": "包索引",
"description": "Docs intro tool name"
},
"docsIntro.tools.packages.copy": {
"message": "为你的游戏模式寻找 include 与插件。",
"description": "Docs intro tool description"
},
"docsIntro.tools.uid": {
"message": "UID 生成器",
"description": "Docs intro tool name"
},
"docsIntro.tools.uid.copy": {
"message": "为 open.mp 组件生成唯一 ID。",
"description": "Docs intro tool description"
},
"idBrowser.copied": {
"message": "已复制",
"description": "Shown after an ID or code was copied"
},
"idBrowser.copyId": {
"message": "复制 ID",
"description": "Tooltip on an ID button in the ID browsers"
},
"idBrowser.copyCode": {
"message": "复制代码",
"description": "Tooltip on a line of code in the ID browsers"
},
"idBrowser.none": {
"message": "没有匹配项。换个关键词,或显示全部分类。",
"description": "Shown when nothing in an ID browser matches the search and filters"
},
"idBrowser.weapons.slot": {
"message": "槽位 {slot}",
"description": "Weapon slot number. {slot} is a number."
},
"idBrowser.weapons.model": {
"message": "模型 {model}",
"description": "Weapon object model. {model} is a number."
},
"idBrowser.weapons.clip": {
"message": "弹匣容量 {clip}",
"description": "Weapon clip size. {clip} is a number or text."
},
"idBrowser.weapons.deathIcon": {
"message": "击杀提示图标",
"description": "Alt text of a weapon's kill feed icon"
},
"idBrowser.weapons.search": {
"message": "按名称、ID 或 WEAPON_ 常量搜索",
"description": "Placeholder of the weapon search box"
},
"idBrowser.weapons.label": {
"message": "搜索武器",
"description": "Accessible label of the weapon search box"
},
"idBrowser.weapons.count": {
"message": "{shown} / {total} 个武器与死亡原因",
"description": "How many weapons the filters show. {shown} and {total} are numbers."
},
"idBrowser.interiors.search": {
"message": "按名称或室内场景 ID 搜索",
"description": "Placeholder of the interior search box"
},
"idBrowser.interiors.label": {
"message": "搜索室内场景",
"description": "Accessible label of the interior search box"
},
"idBrowser.interiors.count": {
"message": "{shown} / {total} 个室内场景",
"description": "How many interiors the filters show. {shown} and {total} are numbers."
},
"idBrowser.mapIcons.crash": {
"message": "开启图例后查看地图会导致游戏崩溃",
"description": "Warning on map icons that crash the game when the map legend is shown"
},
"idBrowser.mapIcons.search": {
"message": "按名称或 ID 搜索",
"description": "Placeholder of the map icon search box"
},
"idBrowser.mapIcons.label": {
"message": "搜索地图图标",
"description": "Accessible label of the map icon search box"
},
"idBrowser.mapIcons.count": {
"message": "{shown} / {total} 个地图图标",
"description": "How many map icons the search shows. {shown} and {total} are numbers."
},
"idBrowser.pickups.search": {
"message": "按名称或模型 ID 搜索",
"description": "Placeholder of the pickup search box"
},
"idBrowser.pickups.label": {
"message": "搜索拾取物",
"description": "Accessible label of the pickup search box"
},
"idBrowser.pickups.count": {
"message": "{shown} / {total} 个拾取物模型",
"description": "How many pickup models the filters show. {shown} and {total} are numbers."
},
"idBrowser.animations.preview": {
"message": "观看预览",
"description": "Tooltip on an animation's name, which opens its video preview"
},
"idBrowser.animations.allLibraries": {
"message": "全部动画库",
"description": "Dropdown option that shows animations of every library"
},
"idBrowser.animations.search": {
"message": "按动画库、名称、描述或索引搜索",
"description": "Placeholder of the animation search box"
},
"idBrowser.animations.label": {
"message": "搜索动画",
"description": "Accessible label of the animation search box"
},
"idBrowser.animations.count": {
"message": "{shown} / {total} 个动画",
"description": "How many animations the search shows. {shown} and {total} are numbers."
}
}
2 changes: 1 addition & 1 deletion frontend/i18n/zh-CN/content/releases/launcher/v1.5.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ assets:
- 修复 `RemoveBuildingForPlayer` 崩溃并移除其限制。
- 修复当玩家使用吸烟特殊动作并按下鼠标左键(LMB)时的吸烟动画。
- 移除 LV 和 LS 体育馆的地图图标和无用的检查点。
- 修复玩家在安装了液压组件时按下 H 键导致车辆喇叭为其他玩家播放的问题。
- 修复玩家在安装了液压组件时按下 H 键导致载具喇叭为其他玩家播放的问题。
- 将截图数量上限从 1000 提高到 1,000,000。
- 原生实现 Discord 状态并将其内置于客户端模组中。
- 支持 1.0 EU 版本。
Expand Down
6 changes: 3 additions & 3 deletions frontend/i18n/zh-CN/content/releases/server/v1.4.0.2779.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ htmlUrl: https://github.com/openmultiplayer/open.mp/releases/tag/v1.4.0.2779
highlights:
- 为受支持的客户端提供的可选 open.mp 协议加密
- 递归加载组件,并改进了 Linux 链接器的行为
- 修复了车辆和物体相关的多处崩溃与同步问题
- 修复了载具和物体相关的多处崩溃与同步问题
- 新增用于检测 open.mp 客户端的原生函数 `IsPlayerUsingOmp`
assets:
- label: Windows
Expand All @@ -25,15 +25,15 @@ assets:
- 修复了在移动客户端上使用 `SetPlayerSkin` 的一个小问题。
- 新增了相机模式的有效性检查。
- 修复了 Windows 系统中 `GetTickCount` 的返回值。
- 修复了在某些事件和 Pawn 回调中销毁车辆时导致的崩溃。
- 修复了在某些事件和 Pawn 回调中销毁载具时导致的崩溃。
- 禁用了 AMX 运行时的动态 DLL 加载功能,尤其适用于从 CompuPhase 网站安装了默认 Pawn 的用户。
- 修复了 `GetVehicleLandingGearState` 返回值反转的问题。
- 修复了玩家离开服务器后,其信息仍会随机保留在启动器玩家列表中的问题。
- 为拖车和拖车同步添加了更多的有效性检查。
- 支持递归加载文件夹中的组件。
- 在 Linux 系统上,优先加载以 `$` 开头的组件,并使用 `RTLD_GLOBAL` 标志加载它们。
- 修复了与移动物体相关的崩溃问题。
- 修复了玩家车辆数据在 `OnPlayerDeath` 事件被调用前被重置的问题。
- 修复了玩家载具数据在 `OnPlayerDeath` 事件被调用前被重置的问题。
- 新增了通过原生函数 `IsPlayerUsingOmp` 检测玩家是否使用 open.mp 客户端的功能。

## 按合并的拉取请求整理的更新日志
Expand Down
8 changes: 4 additions & 4 deletions frontend/i18n/zh-CN/content/releases/server/v1.6.7.3218.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tag: v1.6.7.3218
publishedAt: "2026-10-14T22:24:31Z"
htmlUrl: https://github.com/openmultiplayer/open.mp/releases/tag/v1.6.7.3218
highlights:
- 新增 NPC 车辆位置与旋转相关原生函数,并改进 NPC 车辆的移动表现
- 新增 NPC 载具位置与旋转相关原生函数,并改进 NPC 载具的移动表现
- 修复封禁重载、连接、广播与服务器关闭等网络问题
- 修复 Pawn、组件与 C API 相关问题,并支持 Conan 2 与 macOS ARM 构建
assets:
Expand All @@ -29,7 +29,7 @@ assets:
- 修复了服务器刚启动时发起的连接因无效的网络 cookie 而被拒绝的问题。[#1213](https://github.com/openmultiplayer/open.mp/pull/1213)
- 修复了插件在发送前读取广播 RPC 载荷时该载荷被截短的问题,此问题会影响天气切换、消息发送与游戏文本等功能。[#1215](https://github.com/openmultiplayer/open.mp/pull/1215)
- 修复了 Linux 服务器在无终端环境下(例如通过 `nohup` 运行)关闭时卡死或崩溃的问题。[#1203](https://github.com/openmultiplayer/open.mp/pull/1203)
- 车辆重生时现在会重置喷漆(paintjob)。[#1213](https://github.com/openmultiplayer/open.mp/pull/1213)
- 载具重生时现在会重置喷漆(paintjob)。[#1213](https://github.com/openmultiplayer/open.mp/pull/1213)

### 脚本与组件

Expand All @@ -44,8 +44,8 @@ assets:

### NPC 相关改进

- 新增 `NPC_SetVehiclePos`、`NPC_SetVehicleRot`、`NPC_GetVehiclePos` 与 `NPC_GetVehicleRot` 原生函数。**行为变更:** `NPC_SetPos` 现在会将 NPC 从所在车辆中移出;若要在 NPC 乘坐时调整其位置,请改用车辆专用函数。[#1182](https://github.com/openmultiplayer/open.mp/pull/1182), [#1237](https://github.com/openmultiplayer/open.mp/pull/1237)
- 修复了 NPC 车辆在坡道上行驶时显得扁平或出现瞬移的问题,并改进了车辆移动的同步。[#1249](https://github.com/openmultiplayer/open.mp/pull/1249), [#1280](https://github.com/openmultiplayer/open.mp/pull/1280)
- 新增 `NPC_SetVehiclePos`、`NPC_SetVehicleRot`、`NPC_GetVehiclePos` 与 `NPC_GetVehicleRot` 原生函数。**行为变更:** `NPC_SetPos` 现在会将 NPC 从所在载具中移出;若要在 NPC 乘坐时调整其位置,请改用载具专用函数。[#1182](https://github.com/openmultiplayer/open.mp/pull/1182), [#1237](https://github.com/openmultiplayer/open.mp/pull/1237)
- 修复了 NPC 载具在坡道上行驶时显得扁平或出现瞬移的问题,并改进了载具移动的同步。[#1249](https://github.com/openmultiplayer/open.mp/pull/1249), [#1280](https://github.com/openmultiplayer/open.mp/pull/1280)
- 修复了 `NPC_PutInVehicle` 将 NPC 放入船只后,其外观仍停留在徒步状态的问题。[#1236](https://github.com/openmultiplayer/open.mp/pull/1236)
- 修复了已死亡的 NPC 在流式加载(stream in)时仍呈站立姿态的问题;`NPC_Respawn` 现在会清除其死亡状态。[#1238](https://github.com/openmultiplayer/open.mp/pull/1238), [#1184](https://github.com/openmultiplayer/open.mp/pull/1184)
- 修复了未调用 `NPC_SetAmmo` 时 NPC 弹药无限的问题,修正了 `NPC_GetSkin` 的返回值,并修复了 `NPC_SetAngleToPos` 计算出的角度。[#1165](https://github.com/openmultiplayer/open.mp/pull/1165), [#1182](https://github.com/openmultiplayer/open.mp/pull/1182), [#1252](https://github.com/openmultiplayer/open.mp/pull/1252)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
slug: vehicle-sync
title: 车辆同步
title: 载具同步
authors: southclaws
---

import vehicleSync01URL from "@site/blog/2019-11-09-vehicle-sync/vehicle_sync_01.mp4";
import vehicleSync02URL from "@site/blog/2019-11-09-vehicle-sync/vehicle_sync_02.mp4";
import vehicleSync03URL from "@site/blog/2019-11-09-vehicle-sync/vehicle_sync_03.mp4";

一篇简短的帖子展示了车辆同步技术的发展历程。
一篇简短的帖子展示了载具同步技术的发展历程。

<!-- truncate -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ native File:fopen(const name[], filemode:mode = io_readwrite);

### 常量

- `65535` 无效玩家、演员、文本绘图等的值。它也是无效车辆的值,但 `0` 有时也会作为无效车辆 ID 返回。
- `0` 无效文件的值,有时是车辆(同时也是 `65535`)。也是许多缺失事物的值,如动作状态和武器。
- `65535` 无效玩家、演员、文本绘图等的值。它也是无效载具的值,但 `0` 有时也会作为无效载具 ID 返回。
- `0` 无效文件的值,有时是载具(同时也是 `65535`)。也是许多缺失事物的值,如动作状态和武器。
- `255` 无效队伍和菜单的值。
- `-1` 无效帮派区域和武器状态的值。

Expand All @@ -84,7 +84,7 @@ native File:fopen(const name[], filemode:mode = io_readwrite);
- `ShowPlayerDialog` ID 是手动指定的,没有限制。ID 也完全没有意义,因为一个玩家一次只能看到一个对话框。
- `SetTimer` ID 会回绕,且不检查是否存在具有相同 ID 的定时器。你需要启动超过 40 亿个定时器才可能遇到这个问题,但这是可能发生的——它们甚至不必都保持运行。

当然,有些人依赖 ID 按照非常特定的顺序分配,然后当他们添加或移除一辆车辆时,就会疑惑为什么整个游戏模式会崩溃。
当然,有些人依赖 ID 按照非常特定的顺序分配,然后当他们添加或移除一辆载具时,就会疑惑为什么整个游戏模式会崩溃。

## 兼容性

Expand Down Expand Up @@ -218,7 +218,7 @@ main() {}

### 标签

现在函数几乎在所有地方都使用标签。我们试图在过多的标签警告和不足的有用信息之间找到平衡,但警告是有原因的,可以帮助发现你可能遗漏的问题。例如,将车辆作为参数传递给物体函数,或给予某人一个不存在的武器:
现在函数几乎在所有地方都使用标签。我们试图在过多的标签警告和不足的有用信息之间找到平衡,但警告是有原因的,可以帮助发现你可能遗漏的问题。例如,将载具作为参数传递给物体函数,或给予某人一个不存在的武器:

```c
// 此代码没有警告,尽管它显然是错误的。
Expand Down Expand Up @@ -269,7 +269,7 @@ native Player_Spawn(Player:playerid);

请注意,模块和标签名称总是匹配的 - `Vehicle`、`DB`、`Player` 等。[这除了保持一致性外还有其他原因](https://github.com/pawn-lang/compiler/issues/234) - 它提供了更面向对象(OO)的接口,并且更容易记忆。

然而,你可能在前面的例子中注意到函数 `Object@Create`,而不是 `Object_Create`。原因是第一个参数的内容。在上面七个例子中,第一个参数都是被操作的实体(物体、车辆、玩家等)。你想获取特定实体的位置。你想移动特定实体。你想获取特定实体的剩余时间。这再次映射到类似 OO 的 API - `Player_Spawn(playerid)` 可以看作 `player.Spawn()`。PAWN 不能这样做,但这并不意味着集成到此 API 的其他语言不能。用 C++ 术语来说 - `_` 是 `.` 或 `->`,并且始终需要将有效的 ID 作为第一个参数。
然而,你可能在前面的例子中注意到函数 `Object@Create`,而不是 `Object_Create`。原因是第一个参数的内容。在上面七个例子中,第一个参数都是被操作的实体(物体、载具、玩家等)。你想获取特定实体的位置。你想移动特定实体。你想获取特定实体的剩余时间。这再次映射到类似 OO 的 API - `Player_Spawn(playerid)` 可以看作 `player.Spawn()`。PAWN 不能这样做,但这并不意味着集成到此 API 的其他语言不能。用 C++ 术语来说 - `_` 是 `.` 或 `->`,并且始终需要将有效的 ID 作为第一个参数。

但是,函数 `Dialog_IsValid(Dialog:id)` 根据定义,其第一个参数可能不是有效 ID(否则它的意义何在[^1]?),而 `Icon_Create(image, Float:x, Float:y, Float:z)` 根本不接收 ID。因此,它们变成了 `@` 替代 - 在 C++ 语法中是 `::`。它们可能根本不接收 ID,并且绝对不需要有效的 ID(`@Destroy` 也属于这类函数,因为销毁实体是逻辑上对实体外部的操作,而不是对实体本身的操作)。

Expand Down Expand Up @@ -315,7 +315,7 @@ enum ObjectMaterialTextAlignment
```c
new Dialog:d;
```
人们遇到的最常见的错误之一是其代码只对玩家 0 有效,因为他们忘记初始化变量。如果没有玩家/物体/车辆 0,代码将不适用于任何人 - 没有人被提升为管理员比错误的人被提升为管理员要好。
人们遇到的最常见的错误之一是其代码只对玩家 0 有效,因为他们忘记初始化变量。如果没有玩家/物体/载具 0,代码将不适用于任何人 - 没有人被提升为管理员比错误的人被提升为管理员要好。

#### `-1`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ authors: potassium
- 修复了拖车同步。
- 修复了 `GetVehicleLastDriver`。
- 修复了 `GetPlayerRotationQuat`。
- 修复了车辆组件的崩溃问题。
- 修复了载具组件的崩溃问题。

## SA:MP DL

Expand Down
Loading