跳到主要内容

IsPlayerSpawned

注意

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

描述

检测指定玩家是否处于重生状态。

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

返回值

true - 玩家已重生

false - 玩家未重生

示例代码

public OnPlayerText(playerid, text[])
{
if (!IsPlayerSpawned(playerid))
{
SendClientMessage(playerid, COLOR_RED, "错误:你必须重生后才能发送消息。");
return 0;
}
return 1;
}

相关函数