example
example

已解决√ 求助 admin复活不恢复吃喝

状态
此线程已解决! 转到解决方案...

随缘1

用户
认证用户
这样会导致我一直被饿死,我更新了qb-core后我的admin复活不再恢复吃喝
 

随缘1

用户
认证用户
RegisterNetEvent('QBCore:Server:SetMetaData', function(meta, data)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
if meta == 'hunger' or meta == 'thirst' then
if data > 100 then
data = 100
end
end
Player.Functions.SetMetaData(meta, data)
TriggerClientEvent('hud:client:UpdateNeeds', src, Player.PlayerData.metadata['hunger'], Player.PlayerData.metadata['thirst'])
end)
1714154738889.png
 

随缘1

用户
认证用户
RegisterNetEvent('QBCore:Server:SetMetaData', function(meta, data)
local src = source
local Player = QBCore.Functions.GetPlayer(src)
if not Player then return end
if meta == 'hunger' or meta == 'thirst' then
if data > 100 then
data = 100
end
end
Player.Functions.SetMetaData(meta, data)
TriggerClientEvent('hud:client:UpdateNeeds', src, Player.PlayerData.metadata['hunger'], Player.PlayerData.metadata['thirst'])
end)
浏览附件1188
只需要在qb-core-server-events这里输入这些就行了,我放在这个网站保存一下
 
状态
此线程已解决! 转到解决方案...
顶部