AllowInteriorWeapons
描述
切换是否允许玩家在室内场景使用武器。
参数名 | 说明 |
---|---|
bool:allow | 'true'允许室内使用武器(默认启用),'false'禁止室内使用武器 |
返回值
本函数无特定返回值。
示例
public OnGameModeInit()
{
// 启用室内武器使用功能
AllowInteriorWeapons(true);
return 1;
}
注意事项
注意
本功能在当前 SA-MP 版本中无效!
提示
可通过config.json配置文件实现相同功能:
"allow_interior_weapons": true,
相关函数
- AreInteriorWeaponsAllowed: 检测是否允许在室内使用武器
- SetPlayerInterior: 设置玩家所在室内场景
- GetPlayerInterior: 获取玩家当前室内场景
相关回调
- OnPlayerInteriorChange: 当玩家切换室内场景时触发