跳到主要内容

NPC_GetNodePointCount

注意

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

描述

获取 NPC 节点中点的数量。

参数说明
nodeid节点的 ID

返回值

返回节点中点的数量,若节点无效则返回 0。

示例

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/checknodepointcount ", true, 21))
{
new nodeid = strval(cmdtext[21]);

if (nodeid < 0 || nodeid > 63)
return SendClientMessage(playerid, 0xFF0000FF, "无效的节点 ID。必须在 0 到 63 之间。");

new count = NPC_GetNodePointCount(nodeid);

SendClientMessage(playerid, 0x00FF00FF, "节点 %d 有 %d 个点", nodeid, count);
return 1;
}
return 0;
}

注意事项

  • 若节点无效或未打开则返回 0
  • 点的数量表示节点内的导航路径点

相关函数

相关回调