SetPlayerFightingStyle
描述
设置玩家的特殊战斗风格。需在游戏中瞄准后按下"次要攻击键"(默认 ENTER 键)触发。
参数名 | 说明 |
---|---|
playerid | 要设置的玩家 ID |
FIGHT_STYLE:style | 要设置的战斗风格 |
返回值
本函数没有返回值。
示例代码
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp(cmdtext, "/boxing", true) == 0)
{
SetPlayerFightingStyle(playerid, FIGHT_STYLE_BOXING);
SendClientMessage(playerid, 0xFFFFFFAA, "你的战斗风格已切换为拳击模式!");
return 1;
}
return 0;
}
注意事项
提示
此设置仅影响特殊攻击(瞄准+次要攻击键),普通拳击攻击不受影响
相关函数
- GetPlayerFightingStyle: 获取玩家的战斗风格