---
title: "IsPlayerUsingOfficialClient | open.mp"
description: "检测玩家是否使用官方SA-MP客户端。"
canonical: https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerUsingOfficialClient
language: zh-CN
---

# IsPlayerUsingOfficialClient

注意

这个函数是在omp v1.1.0.2612中添加的，在以前的版本中不起作用！

## 描述

检测指定玩家是否使用官方 SA-MP 客户端。

| 参数名 | 说明 |
| --- | --- |
| playerid | 要检测的玩家 ID |

## 返回值

当玩家使用官方客户端时返回 1，否则返回 0

## 示例代码

```c
public OnPlayerConnect(playerid)
{
    if (IsPlayerUsingOfficialClient(playerid) == 0)
    {
        SendClientMessage(playerid, 0xFF0000FF, "[踢出]: 检测到你未使用官方SA-MP客户端！");
        Kick(playerid);
    }

    return 1;
}
```

## 相关函数

-   [IsPlayerUsingOmp](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/IsPlayerUsingOmp): 检测玩家是否使用 open.mp 启动器
-   [SendClientCheck](https://omp.itsneufox.com/zh-CN/docs/scripting/functions/SendClientCheck): 执行客户端内存校验
