Skip to content

Commit

Permalink
Merge pull request #37 from GodyFromDiscord/main
Browse files Browse the repository at this point in the history
Some new additions.
  • Loading branch information
JustLazzy authored Nov 20, 2022
2 parents 724d3ac + 83d803b commit 7e89006
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 5 deletions.
7 changes: 7 additions & 0 deletions client/boosting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ local function Notify(text, type, time)
"#00008B",
time
)
elseif Config.Boosting.Notifications == "npwd" then
TriggerServerEvent('qb-phone:server:sendNewMail', {
sender = Lang:t('boosting.info.phonenotify'),
subject = 'Boosting',
message = text,
button = {}
})
else
QBCore.Functions.Notify(text, type, time)
end
Expand Down
18 changes: 18 additions & 0 deletions client/darkweb.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local QBCore = exports['qb-core']:GetCoreObject()
local crates = {}
local crateBlip = nil

local function openCrate(crate)
local crateID = NetworkGetNetworkIdFromEntity(crate)
Expand Down Expand Up @@ -37,6 +38,7 @@ local function breakCrate(entity)
exports['ps-ui']:Thermite(function(success)
if success then
TriggerServerEvent('jl-laptop:server:crateOpened', NetworkGetNetworkIdFromEntity(entity))
if crateBlip then RemoveBlip(crateBlip) end
end
end, 10, 3, 3) -- Time, Gridsize (5, 6, 7, 8, 9, 10), IncorrectBlocks
else
Expand Down Expand Up @@ -88,6 +90,22 @@ RegisterNetEvent('darkweb:client:cratedrop', function(netID)
local obj = NetworkGetEntityFromNetworkId(netID)
PlaceObjectOnGroundProperly(obj)

if PZone then PZone:destroy() PZone = nil end

if crateBlip then RemoveBlip(crateBlip) end

local crateCoords = GetEntityCoords(obj)

if Config.Boosting.Debug then SetNewWaypoint(crateCoords.x, crateCoords.y) end

if Config.DarkWeb.CrateBlip then
crateBlip = AddBlipForRadius(crateCoords.x + math.random(-100, 100), crateCoords.y + math.random(-100, 100), crateCoords.z, 250.0)
SetBlipAlpha(crateBlip, 150)
SetBlipHighDetail(crateBlip, true)
SetBlipColour(crateBlip, 1)
SetBlipAsShortRange(crateBlip, true)
end

exports['qb-target']:AddTargetEntity(obj, {
options = {
{
Expand Down
13 changes: 9 additions & 4 deletions server/boosting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,24 @@ local currentContracts = {}
local LookingForContracts = {}




local function Notify(src, text, type, time)
if Config.Boosting.Notifications == "phone" then
TriggerClientEvent("qb-phone:client:CustomNotification", src,
TriggerClientEvent('qb-phone:client:CustomNotification', src,
Lang:t('boosting.info.phonenotify'),
text,
"fas fa-user-secret",
"#00008B",
time
)
elseif Config.Boosting.Notifications == "npwd" then
TriggerEvent('qb-phone:server:sendNewMail', {
sender = Lang:t('boosting.info.phonenotify'),
subject = 'Boosting',
message = text,
button = {}
})
else
TriggerClientEvent('QBCore:Notify', src, text, type, time)
QBCore.Functions.Notify(src, text, type, time)
end
end

Expand Down
2 changes: 1 addition & 1 deletion shared/boosting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Config.Boosting = {}

Config.Boosting.MinCops = 0

Config.Boosting.Notifications = "phone" -- Use this for qb // renewed phone intergration, use "notify" for normal QBCore Notifications
Config.Boosting.Notifications = "phone" -- Use this for qb // renewed phone intergration, use "notify" for normal QBCore Notifications // NWPD for New Phone Who Dis

Config.Boosting.Debug = true -- Make this true to make boosting faster lmao

Expand Down
2 changes: 2 additions & 0 deletions shared/darkweb.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ Config.DarkWeb = {}

Config.DarkWeb.Police = 2 -- Maybe we need this? just remove it if we don't need it Zoo

Config.DarkWeb.CrateBlip = true -- Shows a radius around the dark web crate

Config.DarkWeb.CrateSpawn = {
[1] = {
coords = vector3(1546.62, 3821.22, 30.94),
Expand Down

0 comments on commit 7e89006

Please sign in to comment.