{"id":134726,"date":"2024-05-03T08:12:14","date_gmt":"2024-05-03T06:12:14","guid":{"rendered":"https:\/\/hifivem.com\/?post_type=product&#038;p=134726"},"modified":"2025-12-24T07:32:01","modified_gmt":"2025-12-24T06:32:01","slug":"cl-spawn-selektor-pro-qb","status":"publish","type":"product","link":"https:\/\/fivemx.com\/de\/cl-spawn-selector-pro-qb\/","title":{"rendered":"CL Spawn Selector Pro (QB)"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"CL Spawn Selector PRO [QBCore]\" width=\"1290\" height=\"726\" src=\"https:\/\/www.youtube.com\/embed\/SdxW07MeI6s?feature=oembed\" loading=\"lazy\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\" \/>\n\n\n\n<h2 class=\"wp-block-heading\">How to install the Spawn Selector Pro<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1: General Usage<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Drag and drop the resource named CL-SpawnSelectorPRO into your server&#8217;s resources folder.<\/li>\n\n\n\n<li>Run the SQL table named &#8220;cl_spawnselector&#8221;.<\/li>\n\n\n\n<li>Configure permissions for the editor in the config.lua file.<\/li>\n\n\n\n<li>When creating a new location using the editor, ensure to add the necessary data to config.lua under Config.Locations.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: Remove Dependency<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open fxmanifest.lua in the qb-multicharacter resource.<\/li>\n\n\n\n<li>Remove the dependency on qb-spawn, typically found at line 36.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3: Modify Prison<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Navigate to the qb-prison resource.<\/li>\n\n\n\n<li>In qb-prison &gt; client &gt; main.lua, find the event &#8220;prison:client:Enter&#8221; (Line 207).<\/li>\n\n\n\n<li>Replace the existing event with the updated event provided below:<\/li>\n<\/ol>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">RegisterNetEvent('prison:client:Enter', function(time)\n    local invokingResource = GetInvokingResource()\n    if invokingResource and invokingResource ~= 'CL-SpawnSelector' and invokingResource ~= 'qb-policejob' and invokingResource ~= 'qb-ambulancejob' and invokingResource ~= GetCurrentResourceName() then\n        -- Use QBCore.Debug here for a quick and easy way to print to the console to grab your attention with this message\n        QBCore.Debug({('Player with source %s tried to execute prison:client:Enter manually or from another resource which is not authorized to call this, invokedResource: %s'):format(GetPlayerServerId(PlayerId()), invokingResource)})\n        return\n    end\n\n    QBCore.Functions.Notify( Lang:t(\"error.injail\", {Time = time}), \"error\")\n\n    TriggerEvent(\"chatMessage\", \"SYSTEM\", \"warning\", \"Your property has been seized, you'll get everything back when your time is up..\")\n    DoScreenFadeOut(500)\n    while not IsScreenFadedOut() do\n        Wait(10)\n    end\n    local RandomStartPosition = Config.Locations.spawns[math.random(1, #Config.Locations.spawns)]\n    SetEntityCoords(PlayerPedId(), RandomStartPosition.coords.x, RandomStartPosition.coords.y, RandomStartPosition.coords.z - 0.9, 0, 0, 0, false)\n    SetEntityHeading(PlayerPedId(), RandomStartPosition.coords.w)\n    Wait(500)\n    TriggerEvent('animations:client:EmoteCommandStart', {RandomStartPosition.animation})\n\n    inJail = true\n    jailTime = time\n    local tempJobs = {}\n    local i = 1\n    for k in pairs(Config.Locations.jobs) do\n        tempJobs[i] = k\n        i += 1\n    end\n    currentJob = tempJobs[math.random(1, #tempJobs)]\n    CreateJobBlip(true)\n    TriggerServerEvent(\"prison:server:SetJailStatus\", jailTime)\n    TriggerServerEvent(\"prison:server:SaveJailItems\", jailTime)\n    TriggerServerEvent(\"InteractSound_SV:PlayOnSource\", \"jail\", 0.5)\n    CreateCellsBlip()\n    Wait(2000)\n    DoScreenFadeIn(1000)\n    QBCore.Functions.Notify( Lang:t(\"error.do_some_work\", {currentjob = Config.Jobs[currentJob] }), \"error\")\nend)<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Additionally, add <code>and invokingResource ~= 'CL-SpawnSelector'<\/code> to line 209.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">These steps should ensure the proper installation and integration of the CL-SpawnSelectorPRO resource into your server environment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Spawn Selector PRO jetzt mit mehr Funktionen, mehr Stilen und besserer Benutzeroberfl\u00e4che.<\/p>","protected":false},"featured_media":134727,"comment_status":"open","ping_status":"closed","template":"","meta":[],"product_brand":[],"product_cat":[512,2907],"product_tag":[],"class_list":["post-134726","product","type-product","status-publish","has-post-thumbnail","product_cat-qbcore-scripts","product_cat-qbox-scripts","first","instock","sale","downloadable","virtual","taxable","purchasable","product-type-simple"],"_links":{"self":[{"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/product\/134726","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/types\/product"}],"replies":[{"embeddable":true,"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/comments?post=134726"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/media\/134727"}],"wp:attachment":[{"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/media?parent=134726"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/product_brand?post=134726"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/product_cat?post=134726"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/fivemx.com\/de\/wp-json\/wp\/v2\/product_tag?post=134726"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}