最简单的方法是要求许可证 esx_weaponshop 并在许可菜单中检查玩家的等级。
config.luaConfig.LicenseEnable = true -- enable this
Config.LicensePrice = 5000
Config.LicenseRank = 50 -- add this line
esx_weaponshop/client/main.lua找到这一行:
OpenBuyLicenseMenu(CurrentActionData.zone)
并替换为:if ESX.GetPlayerData().rank >= Config.LicenseRank then
OpenBuyLicenseMenu(CurrentActionData.zone)
else
ESX.ShowNotification("~r~ERROR: ~w~A rank of ~g~".. Config.LicenseRank .. " ~w~需要购买武器许可证!")
end
请确保您开启了 esx_license.
|