跳到主要内容

NPC_GetFightingStyle

注意

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

描述

获取 NPC 的战斗风格。

参数说明
npcidNPC 的 ID

返回值

返回 NPC 的战斗风格 ID。

示例

public OnPlayerCommandText(playerid, cmdtext[])
{
if (!strcmp(cmdtext, "/checkfightingstyle", true))
{
new npcid = PlayerNPC[playerid];
if (npcid == INVALID_NPC_ID)
return SendClientMessage(playerid, 0xFF0000FF, "你没有在调试NPC。");

if (!NPC_IsValid(npcid))
return SendClientMessage(playerid, 0xFF0000FF, "无效的NPC。");

new style = NPC_GetFightingStyle(npcid);

SendClientMessage(playerid, 0x00FF00FF, "NPC %d 的战斗风格: %d", npcid, style);
return 1;
}
return 0;
}

注意事项

  • 战斗风格影响近战动画和伤害
  • 每种风格都有不同的拳击和踢腿动画
  • 默认战斗风格为 FIGHT_STYLE_NORMAL

相关函数

相关回调