#Hookers Script For QBCore
1 messages Ā· Page 1 of 1 (latest)
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
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.
do you have the alerts ready?
Iāll have to look into it more today as one of my alerts is coming up āundefinedā
Check locals
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 āŗļø
nice awesome going to test this
hopefully my instructions make sense
Now lets try to get this so everyone can see and hear lol. @earnest cape @noble fulcrum
Did it work for you?
worked fine for me
works, great
only thing that is still a thing is others can't see the animation happening
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
Exactly, I tired the other day and failed.
right. so is it even worth doing the script in its current state if pd cant see the act happening?
i would think in the RP interaction, PD is going to have to "see" something happening
not seeing it just wouldnt make sense right
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.
I'm still toying with this. I've added a progress bar, 3rd eye, disabled movement and now relieves stress.
@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
And where is the credit for saNhje on this? š
sawu_hookers are the original source. Should add some credit š
i donāt know who made this i just got this script from a client esx server then converted to qbcore
