[Re-Release] BadgerBankRobbery

Hi there,

I’ve seen alot of people ask for an ESX version of BadgerBankRobbery, So here it is!

Like stated above, I added ESX compatibility, Minimum required cops for each group of robberies (Shops, ammunations and Banks), Rewards for these groups and either black or clean money as rewards

INFORMATION
This is a really simple script that allows realistic robberies of the banks. Currently I only have the Paleto bank and harmony Fleeca bank within it. I may add the 24/7 of Sandy Shores and Gun stores later on. Depending on suggestions of what other locations you guys want, I’ll see what I can do!

Basically this allows an animation of robbing the bank for users and fun RP for all on the server.

Banks reset every 15 minutes after a bank robbery, so this gives the cops a break (this time is subject to increase/decrease if you find it in the server.lua and simply change the value ‘15’ to another value). Once you start breaking into safes, beware that you cannot move and cannot cancel the action! This is why it’s highly suggested you rob the bank with your friends/hooligans! They will need to protect you while you steal the goods! How do you rob the bank? Very easy, just walk up to the red circle and press the ‘E’ key! Once you start breaking in, the silent alarm will be triggered and everyone will know the bank is being robbed! I’ve shown a demo gif below.

Download: Github/BadgerBankRobbery

Requirements:

CREDITS

I am re-releasing this project with the authority from @officialBadger All credit goes to hem for the original code, I only made some modifications to it! Click the link below to be redirected to his post!

Original post

4 Likes

The required “mythic_progressbar” is unsupported, is there anything else that I can do?

1 Like

Try this one https://github.com/XxFri3ndlyxX/mythic_progressbar

This is the only working progressbars I could find https://github.com/Yarpii/mythic_progressbar

1 Like

When the Robbery finishes, i dont get any reward and get stuck in the bent over animation with a crowbar in my hand, have to F8 quit to get unstuck
Any ideas why?

Anyone know how to play a sound when alarm activates instead of a silent alarm

Use [Release] Play Custom Sounds for Interactions

I attempted this below but got Error(s), warning(s):
lua5.3: …esktop/rextester_linux_2.0/usercode/962581952/source.lua:2: or ‘…’ expected near ‘100’

I am not sure what to do about this error. Any idea? I am brand new to coding lua lol.
client.lua (17.5 KB)

RegisterNetEvent('InteractSound_SV:PlayWithinDistance')
AddEventHandler('InteractSound_SV:PlayWithinDistance', function(100, 'alarm.ogg', 1.0)
  if GetConvar("onesync_enableInfinity", "false") == "true" then
    TriggerClientEvent('InteractSound_CL:PlayWithinDistanceOS', -1, GetEntityCoords(GetPlayerPed(source)), 100, 'alarm.ogg', 1.0)
  else
    TriggerClientEvent('InteractSound_CL:PlayWithinDistance', -1, source, 100, 'alarm.ogg', 1.0)
  end
end)

RegisterNetEvent('InteractSound_SV:PlayWithinDistance')
AddEventHandler('InteractSound_SV:PlayWithinDistance', function(100, 'alarm.ogg', 1.0)
    local src = source
    local DistanceLimit = 300
    if maxDistance < DistanceLimit then
	TriggerClientEvent('InteractSound_CL:PlayWithinDistance', -1, GetEntityCoords(GetPlayerPed(src)), 100, 'alarm.ogg', 1.0)
    else
        print(('[interact-sound] [^3WARNING^7] %s attempted to trigger InteractSound_SV:PlayWithinDistance over the distance limit ' .. --DistanceLimit):format(GetPlayerName(src)))
    end
end)

The register events you put in are already in the script for the interactSound, so install that resource into your server

https://plunkettscott.gitbooks.io/scott-s-script-documentation/content/scripts/interactsound.html
This is it’s documentation
But you’ll need ```
TriggerEvent(‘InteractSound_SV:PlayWithinDistance’, 0.5, ‘demo’, 1.0)


And make sure the soundfile was added to the interactSound fxmanifest

Unfortunately I’ve tried the following (see attached) but I’m getting a script error. Unexpected symbol. Not sure if I’m doing this right. It says that the ) is unexpected? But if I remove it I get other errors. But this part of the original script.

						RemoveBlip(liquorcoords.blip)
					end
				end
			end
			end
		end
	end
end)


function DisplayNotification( text )
    SetNotificationTextEntry( "STRING" )
    AddTextComponentString( text )
    DrawNotification( false, false )
end

Citizen.CreateThread(function()
	while true do
		Citizen.Wait(1000)
		TriggerServerEvent('BadgerBankRobbery:IsActive')
	end
end)

My Full Script Attached
script.txt (13.0 KB)

As for my addition… its just

if IsControlJustReleased(0, 38) then -- E key
						TriggerServerEvent('BadgerBankRobbery:SetActive', true)
						TriggerServerEvent('PrintBR:PrintMessage', bankcoords.alarm)
						TriggerEvent('InteractSound_SV:PlayWithinDistance', 0.5, 'alarm.ogg', 1.0)
						if (config.displayBlips == true) then

Not sure what I did wrong? Literally followed the instructions to a T. Also I do appreciate your input!

Try alarm instead of alarm.ogg

Try this one?
client.lua (12.8 KB)

Hey! that one didn’t work however I was able to get it working. But its playing across entire server.

I’m using Interact-Sound 0.4.1 instead of 0.5 where it didnt seem to play at all.

I put in an issue on the GitHub for Interact Sound hopefully Scott sees it and looks into the issue.

Interact Sound 0.5 was supposed to fix this issue with it playing across entire server but alas…

Using:
TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 100.0, 'alarm', 1.0)

Thank you for your help so far! @Chxttr

Change the 100.0 to something like 10.0 and see if it still goes around the server. because 100 is quite big

No matter what I’ve tried. I cannot get InteractSound 0.5 version sounds to play.
Any idea what might be wrong with 0.5 sounds not playing? OneSync maybe?

The sound does play with 0.4.1 albeit across the entire server still with OneSync enabled.

TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 1.0, 'demo', 1.0)
nor does TriggerEvent('InteractSound_SV:PlayWithinDistance', 1.0, 'demo', 1.0)

ALSO TRIED

TriggerServerEvent('InteractSound_SV:PlayWithinDistance', 100.0, 'demo', 1.0)
TriggerEvent('InteractSound_SV:PlayWithinDistance', 100.0, 'demo', 1.0)

these worked with 0.4.1 (except for the issue of playing across entire server)

Its weird how it wants to play off of the player ped as the source and not the coordinates, I believe.