Ajouter au panier
Promo !
Script QBCore

Sélecteur de spawn CL Pro (QB)

Le prix initial était : $31.00.Le prix actuel est : $16.00.

-48%

Spawn Selector PRO désormais avec plus de fonctionnalités, plus de styles et une meilleure interface utilisateur.

Ajouter au panier
CL Spawn Selector Pro (QB) Aperçu de la ressource FiveM
Sélecteur de spawn CL Pro (QB)
$31.00 Le prix initial était : $31.00.$16.00Le prix actuel est : $16.00.

Détails du produit

Framework
QBCore
Type de ressource
Script
Fichiers inclus
1 fichier téléchargeable

Détails de l’achat

Accès aux mises à jour
Accès à vie aux fichiers publiés sur cette fiche produit Lire la politique d’accès aux mises à jour
Format de téléchargement
ZIP

Comment installer Spawn Selector Pro

Étape 1 : Utilisation générale

  1. Faites glisser et déposez la ressource nommée CL-SpawnSelectorPRO dans le dossier de ressources de votre serveur.
  2. Exécutez la table SQL nommée « cl_spawnselector ».
  3. Configurez les autorisations pour l'éditeur dans le fichier config.lua.
  4. Lors de la création d'un nouvel emplacement à l'aide de l'éditeur, assurez-vous d'ajouter les données nécessaires à config.lua sous Config.Locations.

Étape 2 : Supprimer la dépendance

  1. Ouvrez fxmanifest.lua dans la ressource qb-multicharacter.
  2. Supprimez la dépendance sur qb-spawn, généralement trouvée à la ligne 36.

Étape 3 : Modifier la prison

  1. Accédez à la ressource qb-prison.
  2. Dans qb-prison > client > main.lua, recherchez l’événement « prison:client:Enter » (ligne 207).
  3. Remplacez l'événement existant par l'événement mis à jour fourni ci-dessous :
RegisterNetEvent('prison:client:Enter', function(time)
    local invokingResource = GetInvokingResource()
    if invokingResource and invokingResource ~= 'CL-SpawnSelector' and invokingResource ~= 'qb-policejob' and invokingResource ~= 'qb-ambulancejob' and invokingResource ~= GetCurrentResourceName() then
        -- Use QBCore.Debug here for a quick and easy way to print to the console to grab your attention with this message
        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)})
        return
    end

    QBCore.Functions.Notify( Lang:t("error.injail", {Time = time}), "error")

    TriggerEvent("chatMessage", "SYSTEM", "warning", "Your property has been seized, you'll get everything back when your time is up..")
    DoScreenFadeOut(500)
    while not IsScreenFadedOut() do
        Wait(10)
    end
    local RandomStartPosition = Config.Locations.spawns[math.random(1, #Config.Locations.spawns)]
    SetEntityCoords(PlayerPedId(), RandomStartPosition.coords.x, RandomStartPosition.coords.y, RandomStartPosition.coords.z - 0.9, 0, 0, 0, false)
    SetEntityHeading(PlayerPedId(), RandomStartPosition.coords.w)
    Wait(500)
    TriggerEvent('animations:client:EmoteCommandStart', {RandomStartPosition.animation})

    inJail = true
    jailTime = time
    local tempJobs = {}
    local i = 1
    for k in pairs(Config.Locations.jobs) do
        tempJobs[i] = k
        i += 1
    end
    currentJob = tempJobs[math.random(1, #tempJobs)]
    CreateJobBlip(true)
    TriggerServerEvent("prison:server:SetJailStatus", jailTime)
    TriggerServerEvent("prison:server:SaveJailItems", jailTime)
    TriggerServerEvent("InteractSound_SV:PlayOnSource", "jail", 0.5)
    CreateCellsBlip()
    Wait(2000)
    DoScreenFadeIn(1000)
    QBCore.Functions.Notify( Lang:t("error.do_some_work", {currentjob = Config.Jobs[currentJob] }), "error")
end)

De plus, ajoutez and invokingResource ~= 'CL-SpawnSelector' jusqu'à la ligne 209.

Ces étapes devraient garantir l’installation et l’intégration correctes de la ressource CL-SpawnSelectorPRO dans votre environnement serveur.

Avis

Il n’y a pas encore d’avis.

Seuls les clients connectés ayant acheté ce produit ont la possibilité de laisser un avis.