首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >尝试在FiveM esx_policejob上索引零值

尝试在FiveM esx_policejob上索引零值
EN

Stack Overflow用户
提问于 2022-01-04 12:04:32
回答 1查看 442关注 0票数 0

尝试索引零值(本地“武器”)

在第一行是错误

代码语言:javascript
复制
local component = weapon.components[i]
local hasComponent = HasPedGotWeaponComponent(playerPed, GetHashKey(v.weapon), component.hash)

if hasComponent then
    label = ('%s: <span style="color:green;">%s</span>'):format(component.label, _U('armory_owned'))
else
    if v.components[i] > 0 then
        label = ('%s: <span style="color:green;">%s</span>'):format(component.label, _U('armory_item', ESX.Math.GroupDigits(v.components[i])))
    else
        label = ('%s: <span style="color:green;">%s</span>'):format(component.label, _U('armory_free'))
    end
end

EN

回答 1

Stack Overflow用户

发布于 2022-08-10 16:51:54

我不完全确定这是否可行,但这将是我的解决办法:

看看你的剧本里有没有这个!

ESX=nil

如果不写在顶部!

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70578517

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档