so I assume this is esx then? I added to mine but never could fine the girls.-
The spawn for the girls is done by scenario files that are loaded. So, default girls. Try near Franklin’s aunt house, near strip club, the beach, etc. If you’re using a script or resource to control or stream scenarios, then it’s possible they’ve been modified to remove these “girls”.
It supports esx/qbcore/ndcore but it could also be used standalone
Just as a note to anyone downloading this script in the future: This requires game build 2060 or higher to function due to the usage of game events.
You can enforce your gamebuild to 2060 by doing a quick read up here:
Sorry got busy here is error
[ script:hookers] SCRIPT ERROR: Execution of native 000000002f7a49e6 in script host failed: Argument at index 1 was null.
[ script:hookers] > [global chunk] (TriggerClientEventInternal.lua:3)
[ script:hookers] > handler (@hookers/server.lua:45)
[ script:hookers] > <unknown> (@oxmysql/dist/build.js:22252)
[ script:hookers] > processTicksAndRejections (node:internal/process/task_queues:96)
The hooker will take the money and then just sits there and nothing happens.
Hmm… I suppose source
became nil somehow?
What if you declare src = source
on line 19 in server.lua and then replace source with src like so:
RegisterServerEvent('hookers:moneyCheck')
AddEventHandler('hookers:moneyCheck', function(service)
local cost = Config.Prices[service]
local src = source -- Maybe this needs to be declared?
if Config.Framework == "esx" then
local xPlayer = ESX.GetPlayerFromId(src)
local cash = xPlayer.getMoney()
if cash >= cost then
xPlayer.removeMoney(cost)
TriggerClientEvent('hookser:paymentReturn', src, true)
else
TriggerClientEvent('hookser:paymentReturn', src, false)
end
elseif Config.Framework == "qbcore" then
local Player = QBCore.Functions.GetPlayer(src)
local cash = Player.Functions.GetMoney('cash')
if cash >= cost then
Player.Functions.RemoveMoney('cash', cost, "Hooker")
TriggerClientEvent('hookser:paymentReturn', src, true)
else
TriggerClientEvent('hookser:paymentReturn', src, false)
end
elseif Config.Framework == "ndcore" then
local character = NDCore.Functions.GetPlayer(src)
if character.cash >= cost then
NDCore.Functions.DeductMoney(cost, src, "cash", "Hooker")
TriggerClientEvent('hookser:paymentReturn', src, true)
else
TriggerClientEvent('hookser:paymentReturn', src, false)
end
elseif Config.Framework == "standalone" then
-- Your code here
TriggerClientEvent('hookser:paymentReturn', src, true)
else
TriggerClientEvent('hookser:paymentReturn', src, true)
end
end)