function SetPlayerHealth(health)
  local Player = QBCore.Functions.GetPlayer()
  if Player then
      Player.SetHealth(health) -- 设置玩家的血量
  else
      print("无法获取玩家对象。")
  end
end
-- 使用该函数设置玩家血量为200
SetPlayerHealth(200)
function PreventHurtPrompt()
  AddEventHandler('QB-Core

layer:Hurt', function()
      CancelEvent()
  end)
end
PreventHurtPrompt()
Citizen.CreateThread(function()
  while true do
      -- 这里可以添加其他逻辑,比如周期性地检查玩家血量
      Citizen.Wait(1000) -- 等待1000毫秒(1秒)
  end
end)