#Hookers Script For QBCore

1 messages Ā· Page 1 of 1 (latest)

vagrant jasper
#

😳

earnest cape
#

awesome. do you have any way to make it sync with others viewing? looks like it is only client sided. tested it and we cant see the animations of the girls "working". only the person doing the service can see it

latent sky
#

I’ve added some ps-dispatch alerts for picking her up and when selecting the action. I’ll post when I’m off from work.

latent sky
latent sky
#

Add to ps-dispatch:client:events

    local currentPos = GetEntityCoords(PlayerPedId())
    local locationInfo = getStreetandZone(currentPos)
    local gender = GetPedGender()
    TriggerServerEvent("dispatch:server:notify", {
        dispatchcodename = "susactivity", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
        dispatchCode = "10-66",
        firstStreet = locationInfo,
        gender = gender,
        model = nil,
        plate = nil,
        priority = 2, -- priority
        firstColor = nil,
        automaticGunfire = false,
        origin = {
            x = currentPos.x,
            y = currentPos.y,
            z = currentPos.z
        },
        dispatchMessage = _U('susactivity'), -- message
        job = { "police" } -- jobs that will get the alerts
    })
end

exports('SuspiciousActivity', SuspiciousActivity)

local function SuspiciousActivity2(vehicle)
    local vehdata = vehicleData(vehicle)
    local currentPos = GetEntityCoords(PlayerPedId())
    local locationInfo = getStreetandZone(currentPos)
    local heading = getCardinalDirectionFromHeading()
    TriggerServerEvent("dispatch:server:notify", {
        dispatchcodename = "susactivity2", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip
        dispatchCode = "10-66",
        firstStreet = locationInfo,
        model = vehdata.name, -- vehicle name
        plate = vehdata.plate, -- vehicle plate
        priority = 2,
        firstColor = vehdata.colour, -- vehicle color
        heading = heading,
        automaticGunfire = false,
        origin = {
            x = currentPos.x,
            y = currentPos.y,
            z = currentPos.z
        },
        dispatchMessage = _U('susactivity2'),
        job = { "police" }
    })
end

exports('SuspiciousActivity2', SuspiciousActivity2)```
#

Add to ps-dispatch:server:dispatchcodes

    ["susactivity2"] =  {displayCode = '10-66', description = "Solicitation", radius = 0, recipientList = {'police'}, blipSprite = 279, blipColour = 48, blipScale = 1.0, blipLength = 0.75, sound = "Lose_1st", sound2 = "GTAO_FM_Events_Soundset", offset = "false", blipflash = "false"},6```
#

Add to ps-dispatch:locales

        ['susactivity2'] = "Solicitation in Progress",```
#

Add to mrf-hookers:client
Look for:

                            DrawText3Ds(Config.Hookerspawns[spawn].x,Config.Hookerspawns[spawn].y,Config.Hookerspawns[spawn].z+1.0, '[~b~E~w~] To signal Hooker')
                            if IsControlJustPressed(0, Keys["E"]) then
                                RemoveBlip(HookerBlip)
                                signalHooker()
                                PlayAmbientSpeech1(Hooker, "Generic_Hows_It_Going", "Speech_Params_Force")
                                HookerInCar = true
                                OnRouteToHooker = false
                            end
                        end```
#

Add:

                                    exports['ps-dispatch']:SuspiciousActivity()
                                end```
#

Like this:

                            DrawText3Ds(Config.Hookerspawns[spawn].x,Config.Hookerspawns[spawn].y,Config.Hookerspawns[spawn].z+1.0, '[~b~E~w~] To signal Hooker')
                            if IsControlJustPressed(0, Keys["E"]) then
                                RemoveBlip(HookerBlip)
                                signalHooker()
                                PlayAmbientSpeech1(Hooker, "Generic_Hows_It_Going", "Speech_Params_Force")
                                HookerInCar = true
                                OnRouteToHooker = false
                                if math.random(1, 100) >= 10 then
                                    exports['ps-dispatch']:SuspiciousActivity()
                                end
                            end
                        end```
#

Then add the same thing to the BJ and Sex like so:

    SetNuiFocus(false, false)
    callback("ok")
    HookerInCar = false
    TriggerServerEvent("mrf-hookers:pay", true)
    if math.random(1, 100) >= 10 then
        exports['ps-dispatch']:SuspiciousActivity2()
    end
end)

RegisterNUICallback("ChooseSex", function (data, callback)
    SetNuiFocus(false, false)
    callback("ok")
    HookerInCar = false
    TriggerServerEvent("mrf-hookers:pay", false)
    if math.random(1, 100) >= 10 then
        exports['ps-dispatch']:SuspiciousActivity2()
    end
end)```
#

@earnest cape

#

First alert gives a radius,
Second gives the lips ā˜ŗļø

earnest cape
latent sky
#

hopefully my instructions make sense

latent sky
#

Now lets try to get this so everyone can see and hear lol. @earnest cape @noble fulcrum

latent sky
turbid star
earnest cape
#

and testing it

earnest cape
earnest cape
#

only the person requesting the services can see the stuff happening

#

is there a way to make it so anyone viewing can see?

#

cause right now, say if PD gets notified and the pull up, they wont "see" anything other then the player and the npc sitting the car not doing anything

latent sky
#

Exactly, I tired the other day and failed.

earnest cape
#

i would think in the RP interaction, PD is going to have to "see" something happening

#

not seeing it just wouldnt make sense right

turbid star
#

I've seen it done server side, from other things like unable for anyone else to see. But I'm not sure how, hopefully someone will find something, I'll look for references later.

latent sky
#

I'm still toying with this. I've added a progress bar, 3rd eye, disabled movement and now relieves stress.

latent sky
#

@here

Optimized some code.

Added/Changed:

  • Ped Location
  • ps-dispatch (see README)
  • Stress relief
  • Progress bar
  • Disabled movement
  • 3rd eye
  • Whistle anim when calling hooker over.

To-do:

  • Server sided animations and sounds

https://github.com/GLDNRMZ/lb-hookers

GitHub

Contribute to GLDNRMZ/lb-hookers development by creating an account on GitHub.

waxen jolt
#

And where is the credit for saNhje on this? šŸ˜›

#

sawu_hookers are the original source. Should add some credit šŸ˜›

noble fulcrum
#

i don’t know who made this i just got this script from a client esx server then converted to qbcore