GetPlayerSpecialAction
描述
获取玩家当前激活的特殊动作状态
参数名 | 说明 |
---|---|
playerid | 需要查询的玩家 ID |
返回值
返回玩家的特殊动作状态(参见:特殊动作 ID 列表)
示例代码
public OnPlayerUpdate(playerid)
{
// 检测玩家是否使用喷气背包并封禁
if (GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
{
Ban(playerid);
}
return 1;
}
相关函数
- SetPlayerSpecialAction: 设置玩家特殊动作
- GetPlayerState: 获取玩家当前状态