Skip to content

Commit

Permalink
Ok, should be good to go now
Browse files Browse the repository at this point in the history
  • Loading branch information
MIAgimir committed Jul 5, 2023
1 parent 6d9bad0 commit 27b151b
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 25 deletions.
1 change: 1 addition & 0 deletions client/aspects/manager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ local function spawnmanager(choice)
onSelect = function()
lib.callback('mifh:give:securitycard', false, function(source)
Wait(10)
UT.mfhnotify(CG.notify.title, CG.notify.title, CG.notify.description)
exports.ox_target:removeLocalEntity(mngr.ped, { 'mngrdead' })
end)
end
Expand Down
23 changes: 19 additions & 4 deletions client/aspects/vault.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ local drillt = {
}
local vaultset


local function spawnvaultzone(choice)
local coords = choice.vaultdoor.loc
local head = choice.vaultdoor.head
Expand All @@ -30,9 +29,25 @@ local function spawnvaultzone(choice)
end,
onSelect = function()
TriggerEvent('spawnthermaldrill', choice)
lib.callback('mifh:remove:drill', false, function(source) end)
drilled = true
Wait(5000)
UT.mfhnotify(CG.notify.title, CG.notify.title, CG.notify.description)
if lib.progressBar({
duration = 5000,
label = 'Setting up Drill',
useWhileDead = false,
canCancel = true,
disable = {
car = true,
},
anim = {
dict = 'mini@repair',
clip = 'fixing_a_player'
},
})
then
lib.callback('mifh:remove:drill', false, function(source) end)
drilled = true
end
Wait(BK.banks.drilltime * 60000)
DeleteEntity(drillt.obj)
drillt.obj = nil
drillt.spawned = false
Expand Down
38 changes: 18 additions & 20 deletions client/util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,6 @@ UT.mfhremove_obj = function(obj)
DeleteEntity(obj)
end

UT.mfhteleport = function(ped, x, y, z, w)
DoScreenFadeOut(100)
Wait(100)
SetEntityCoords(ped, x, y, z, false, false, false, false)
SetEntityHeading(ped, w)
DoScreenFadeIn(750)
end

UT.mfhblip = function(blip, x, y, z, sprite, color, scale, name)
blip = AddBlipForCoord(x, y, z)
SetBlipSprite(blip, sprite)
SetBlipDisplay(blip, 4)
SetBlipColour(blip, color)
SetBlipScale(blip, scale)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName('STRING')
AddTextComponentSubstringPlayerName(name)
EndTextCommandSetBlipName(blip)
end

UT.mfhroute = function(blip)
SetBlipSprite(blip, 250)
SetBlipColour(blip, 3)
Expand All @@ -60,4 +40,22 @@ UT.mfhremove_blip = function(blip)
SetBlipAsMissionCreatorBlip(blip, false)
RemoveBlip(blip)
end
end

UT.mfhnotify = function(id, title, desc)
lib.notify({
id = id,
title = title,
description = desc,
position = CG.notify.position,
style = {
backgroundColor = CG.notify.background,
color = CG.notify.textcolor,
['.description'] = {
color = CG.notify.desccolor
}
},
icon = CG.notify.icon,
iconColor = CG.notify.iconcolor
})
end
5 changes: 5 additions & 0 deletions shared/banks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,14 @@ option to open / close vault door with inside / outside pad
]]

BK.banks = {

key = 'scard_fleeca',

hack = 'hack_tablet',

drill = 'drill_thermal',
drilltime = 1, -- time in minutes

money = 'bag_blackmoney',

alta = {
Expand Down
2 changes: 1 addition & 1 deletion shared/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CG.start = {
-- use [https://fontawesome.com/search?m=free&o=r] for icons
-- use [https://htmlcolorcodes.com] for colors
CG.notify = {
title = 'Spotted by security camera!',
title = 'Security Alerted!',
description = 'The police have been notified',
position ='top-right',
background = '#ffffff',
Expand Down

0 comments on commit 27b151b

Please sign in to comment.