Focalabyss / qb-fishing

GNU General Public License v3.0
9 stars 2 forks source link

Credits

I based and used some code from Lionh34rt's qb-fishing script. I was bored of the Fish anywhere catch anything fishing scripts that didn't make too much sense. So I modified it to work with PolyZones. So now if you go to a particular zone you can target certain fish depending on what you feel like catching. Also Illegal fishing is something that I had implemented myself with exotic fish such as Stingray and Whales that pay in dirty money that needs to be washed. Be careful though PD/Rangers have a chance of being called for "Possible Poaching" calls (doesn't give exact locations don't worry) using ps-dispatch.

Description

-- Config.Products: ["fishing"] = { [1] = { name = 'fishingrod', price = 100, amount = 100, info = {}, type = 'item', slot = 1, }, [2] = { name = 'fishingbait', price = 1, amount = 5000, info = {}, type = 'item', slot = 2, }, [3] = { name = 'smallchunks', price = 25, amount = 5000, info = {}, type = item, slot = 3, }, [4] = { name = 'plankton', price = 30, amount = 5000, info = {}, type = item, slot = 4, }, [5] = { name = 'sharkbait', price = 50, amount = 5000, info = {}, type = item, slot = 5, } },

## Add this to your ps-dispatch/client/cl_extraalerts.lua

local function Poaching() local currentPos = GetEntityCoords(PlayerPedId()) local locationInfo = getStreetandZone(currentPos) local gender = GetPedGender() TriggerServerEvent("dispatch:server:notify", { dispatchcodename = "poaching", -- has to match the codes in sv_dispatchcodes.lua so that it generates the right blip dispatchCode = "10-13", 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 = 'Possible Poaching', -- message job = { "police" } -- jobs that will get the alerts }) end

exports('Poaching', Poaching)

## This gets added to your ps-dispatch/server/sv_dispatchcodes.lua

["poaching"] = {displayCode = '10-60', description = "Possible Poaching", radius = 120.0, recipientList = {'police'}, blipSprite = 469, blipColour = 52, blipScale = 0, blipLength = 2, sound = "Lose_1st", sound2 = "GTAO_FM_Events_Soundset", offset = "true", blipflash = "false"},

### This is the export

exports['ps-dispatch']:Poaching()


## Add .png files from the images folder to your qb-inventory/html/images folder
# Thank You Lionh34rt!
# Original Repo Link: https://github.com/Lionh34rt/qb-fishing