Freezysek Posted February 27, 2023 Share Posted February 27, 2023 Zdravím koukal sem že dost lidí schaní při prohledavaní progressbar nebo animaci. 😄 Potřebujete: Ox_lib / Ox_inventory1. Krokotevřeme si ox_inventory/client.lua nasledně si najdeme openNearbyInventory (pokud nemate upravovaný client, bývá to na řádku 542) local function openNearbyInventory() 2. KrokVložíme tento source pod local který vidíte v kroku 1. (source by měl začínat pod local function openNearbyInventory() končit před exports('openNearbyInventory', openNearbyInventory) ) if canOpenInventory() then local targetId, targetPed = Utils.GetClosestPlayer() if targetId and (client.hasGroup(shared.police) or canOpenTarget(targetPed)) then Utils.PlayAnim(1000, 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', 'machinic_loop_mechandplayer', 1.0, 1.0, -1, 50, 0.0, 0, 0, 0) exports.ox_inventory:Progress({ duration = 1000, label = 'Prohledáváš osobu', useWhileDead = false, canCancel = false, disable = { move = true, car = true, combat = true, mouse = false }, }, function(cancel) end) Utils.PlayAnim(2000, 'mp_common', 'givetake1_a', 1.0, 1.0, -1, 50, 0.0, 0, 0, 0) client.openInventory('player', GetPlayerServerId(targetId)) end end end' 3. Krok (konečná verze)Celý source by měl vypadat takto: (nasledně si mužete měnit time prohlevaní nebo animace) local function openNearbyInventory() if canOpenInventory() then local targetId, targetPed = Utils.GetClosestPlayer() if targetId and (client.hasGroup(shared.police) or canOpenTarget(targetPed)) then Utils.PlayAnim(1000, 'anim@amb@clubhouse@tutorial@bkr_tut_ig3@', 'machinic_loop_mechandplayer', 1.0, 1.0, -1, 50, 0.0, 0, 0, 0) exports.ox_inventory:Progress({ duration = 1000, label = 'Prohledáváš osobu', useWhileDead = false, canCancel = false, disable = { move = true, car = true, combat = true, mouse = false }, }, function(cancel) end) Utils.PlayAnim(2000, 'mp_common', 'givetake1_a', 1.0, 1.0, -1, 50, 0.0, 0, 0, 0) client.openInventory('player', GetPlayerServerId(targetId)) end end end exports('openNearbyInventory', openNearbyInventory) 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.