Skip to Content

🔫 qb-houserobbery

導入

  • プレイヤーはゲーム内の時間範囲内で特定の座標でロックピックを使用して家に入り、キャビネットや引き出しなどからアイテムを探すことができます。

[!WARNING] このリソースは、ミニゲーム用に qb-lockpick と qb-skillbar を、エクスポート用に qb-interior を利用して、設定されたシェルを生成します。

[!NOTE] プレイヤーが高度なロックピックを使用していない場合は、通常のロックピックとドライバーセットが必要です。

構成

一般的な

Config = {} Config.MinZOffset = 45 -- how far under the ground the shell will spawn Config.MinimumHouseRobberyPolice = 2 -- minimum amount of police needed to rob Config.MinimumTime = 5 -- minimum in-game hour to rob Config.MaximumTime = 22 -- maximum in-game hour to rob

報酬

Config.Rewards = { [1] = { ["cabin"] = { -- this is the searchable location "plastic", -- these are the list of items you could possibly get "diamond_ring", "goldchain", "weed_skunk", "thermite", "cryptostick", "weapon_golfclub" }, ["kitchen"] = { "tosti", "sandwich", "goldchain" }, ["chest"] = { "plastic", "rolex", "diamond_ring", "goldchain", "weed_skunk", "thermite", "cryptostick", "weapon_combatpistol" }, ["livingroom"] = { "plastic", "rolex", "diamond_ring", "goldchain", "thermite", "cryptostick", "tablet", "pistol_ammo" } } }

場所

Config.Houses = { ["perfectdrive1"] = { -- the house name ["coords"] = { -- the house location where players use lockpick ["x"] = -784.72, ["y"] = 459.77, ["z"] = 100.39, ["h"] = 34.89 }, ["opened"] = false, -- changed automatically so don't edit ["tier"] = 1, -- only works with 1 by default but can be modified ["furniture"] = { -- these are the searchable locations [1] = { ["type"] = "cabin", -- type of searchable location ["coords"] = { -- where ["x"] = 4.15, ["y"] = 7.82, ["z"] = 1.0 }, ["searched"] = false, -- changed automatically so don't edit ["isBusy"] = false, -- changed automatically so don't edit ["text"] = "Search Bedside Cabinet" -- the text that displays }, [2] = { ["type"] = "cabin", ["coords"] = {["x"] = 5.95, ["y"] = 9.34, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search Closet" }, [3] = { ["type"] = "kitchen", ["coords"] = {["x"] = -1.03, ["y"] = 0.78, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search through the kitchen cabinets" }, [4] = { ["type"] = "chest", ["coords"] = {["x"] = 6.904, ["y"] = 3.987, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search Chest" }, [5] = { ["type"] = "cabin", ["coords"] = {["x"] = 0.933, ["y"] = 1.254, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search Drawers" }, [6] = { ["type"] = "cabin", ["coords"] = {["x"] = 6.19, ["y"] = 3.35, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Night Stand Cabinet" }, [7] = { ["type"] = "kitchen", ["coords"] = {["x"] = -2.20, ["y"] = -0.30, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search through the kitchen cabinets" }, [8] = { ["type"] = "kitchen", ["coords"] = {["x"] = -4.35, ["y"] = -0.64, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search through shelves" }, [9] = { ["type"] = "livingroom", ["coords"] = {["x"] = -6.90, ["y"] = 4.42, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search through shelves" }, [10] = { ["type"] = "livingroom", ["coords"] = {["x"] = -6.98, ["y"] = 7.91, ["z"] = 1.0}, ["searched"] = false, ["isBusy"] = false, ["text"] = "Search through shelves" }, } }, }

シェルの変更

[!NOTE] 強盗に別のシェルを使いたい場合は、こちらにアクセスしてください:


qb-houserobbery -> クライアント -> main.lua -> 54行目

そこに到達したら、エクスポートを変更したり、elseifステートメントを追加したりできます。

local function enterRobberyHouse(house) TriggerServerEvent("InteractSound_SV:PlayOnSource", "houses_door_open", 0.25) openHouseAnim() Wait(250) local coords = { x = Config.Houses[house]["coords"]["x"], y = Config.Houses[house]["coords"]["y"], z= Config.Houses[house]["coords"]["z"] - Config.MinZOffset } local data if Config.Houses[house]["tier"] == 1 then data = exports['qb-interior']:CreateHouseRobbery(coords) elseif Config.Houses[house]["tier"] == 2 then data = myNewExport -- find exports in qb-interior/client/main.lua elseif Config.Houses[house]["tier"] == 3 then data = myNewExport -- find exports in qb-interior/client/main.lua elseif Config.Houses[house]["tier"] == 4 then data = myNewExport -- find exports in qb-interior/client/main.lua end Wait(100) houseObj = data[1] POIOffsets = data[2] inside = true currentHouse = house Wait(500) TriggerEvent('qb-weathersync:client:DisableSync') end
Last updated on