Garry's Mod Leaks

[GS] Three's Bank Robberies

Submitted by AbstractLeaker, , Thread ID: 73477

Thread Closed
04-02-2018, 11:13 PM
#1
[GS] Three's Bank Robberies
___________________________________

Three's Bank Robberies

This is an addon for DarkRP which allows players to rob banks in a simple manner. When a player hits their +USE key on a bank entity, a portion of the money will be moved into a money bag which the player must carry a configurable distance away from the bank to have the money given to them. Bags can be destroyed by a single bullet, so players need to protect them from other players and law enforcement. Banks automatically regenerate money over time, up to a configurable maximum. They are spawned in the map on load, at locations configured by the server owner.

See the demonstration videohere! (slightly outdated)

Installation/Basic Setup

Drag the addon folder (for this guide, I'm assuming it's named

Code:
threes_bank_robberies


) into your addons directory.
To configure the addon, open up


Code:
addons/threes_bank_robberies/lua/autorun/shared/bank_config.lua


.


Adding Spawn Locations

Position yourself where you want the bank to be, and type

Code:
getpos


into console. This will output your position and angles to the console. Copy the three numbers from


Code:
setpos


into the Vector, then the three numbers from


Code:
setang


into the Angle, as shown here:


[Image: 4730c62f195b.png]

From there you can save the file and either run console command

Code:
gmod_admin_cleanup


(warning: this will clean up all entities/props off the map so this is a bad idea if players are on), or just restart your server and they will be there.


For example:

[Image: e82176aeaab7.png]
Vector(3387.96, 1521.12, -115.55), Angle(0, 180, 0) (for angles you should snap to nearest 90/45 degree)


Features
  • Players can rob banks
  • Everything is configurable
  • Automatic wanting of players on bank rob
  • Can configure to disallow robbing if there are less than X cops on the server
  • Can configure to disallow police from robbing banks
  • Can configure a whitelist of jobs allowed to rob the bank
  • Animated bar visually showing how much money is in the bank
  • Animated bar showing how long until the next money generation
  • Banks can be set on cooldown once they have been fully depleted, to prevent additional robbing after X seconds
  • Players can put money bags back into the bank by colliding the bag with the bank entity
  • Alarm triggered when the bank is robbed
  • Bags despawn when the player who withdrew them disconnected
Everything is configurable in

Code:
lua/autorun/shared/bank_config.lua


:


  • Models and Sounds

  • Text shown to the player, along with color and size of the text if it is 3d2d (above banks, on bags, etc.)

  • Color of animated bars (supply one RGB color, and the system will generate the bar nicely shaded)

  • Maximum amount of money the bank can hold

  • Delay before the bank generates more money

  • Amount of money the bank generates

  • Amount of money that is put into each bag

  • The amount each bank starts with

  • Delay between bag pickups

  • Distance you must carry the bag

  • Whether to make the player wanted on robbery

  • Police jobs which are not allowed to rob the bank

  • A whitelist of jobs which are allowed to rob the bank

  • Minimum amount of above police jobs that must be online for the bank to be robbable by anyone

  • Whether to use global cooldowns

  • The global cooldown time

  • Locations to spawn the bank at

  • Whether to use alarms

  • Alarm sounds
[Image: ca382373255a54cf74af9ad0ba10c167.png]



Content locked
This content has been locked. Please login or register in order to unlock it.

Users browsing this thread: 1 Guest(s)