跳到主要内容

AllowPlayerWeapons

注意

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

描述

控制玩家是否可以使用武器。

参数名说明
playerid需要控制武器权限的玩家 ID
bool:allowtrue 允许使用武器,false 禁止使用武器

返回值

本函数始终返回 true。

示例

public OnPlayerConnect(playerid)
{
AllowPlayerWeapons(playerid, true); // 允许该玩家使用武器
return 1;
}

相关函数