PivityGmodStore

Hooks

BetterBanking has multiple hooks that Developers can use to hook into certain events.


Hacking

(Server) betterbanking.attempthack [ply hacker, ent atm]

Runs whenever a player attempts to hack an ATM, runs when the first click on it to begin hacking.

hacker is the player attempting to hack it. atm is the ATM entity.


(Server) betterbanking.beginhack [ply hacker, ent atm, boolean policeAlerted]

Runs whenever a player successfully begins to hack an ATM.

hacker is the player attempting to hack it. atm is the ATM entity. policeAlerted is if the police were alerted to the hack.


(Server) betterbanking.failedhack [ply hacker, ent atm, int code]

Runs when a player's ATM hack attempt has failed.

hacker is the hacker. atm is the ATM entity. code is an integer representing the reason, 0 means they went too far away, 1 means they died.


(Server) betterbanking.successfulhack [ply hacker, ent atm, int payout]

Runs when a player successfully hacks an ATM.

hack is the hacker. atm is the ATM entity. payout is how much money the hacker stole.


General

(Server) betterbanking.initalize

Runs when BetterBanking initializes initially.


(Server) betterbanking.alarm [ply alarmer, ent alarm]

Runs when a player sets off a bank alarm.

alarmer is the person triggering the alarm. alarm is the alarm entity.


(Server) betterbanking.personalaccountcreated [ply holder]

Runs when a player registers a new personal account.

holder is the person creating the account.

Returns if the account should be created or not.


(Server) betterbanking.personalaccountdeleted [ply holder]

Runs when a player deletes a personal account. There are functions to allow deleting of accounts but there is nothing in the addon itself that allows it, so most likely you can ignore this hook.

holder is the person deleting the account.

Returns if the account should be deleting or not.


(Server) betterbanking.offshoreaccountcreated [ply holder]

Runs when a player registers a new offshore account.

holder is the person creating the account.

Returns if the account should be created or not.


(Server) betterbanking.offshoreaccountdeleted [ply holder]

Runs when a player deletes a offshore account.

holder is the person deleting the account.

Returns if the account should be deleting or not.


(Server) betterbanking.interestcalc [double percentage]

Runs when interest is calculated.

percentage is the percentage of interest given, taking into account if bankers are online or not.


(Server) betterbanking.entitiessaved [ply admin]

Runs when all ATMs, Offshore Bankers, Alarms and Computers on the map are saved by an admin.

admin is the admin running the command.


(Server) betterbanking.initspawnentities

Runs when all ATMs, Offshoe Bankers, Alarms and Computers that are saved have been spawned.


(Server) betterbanking.vaultrobbed

Runs when the vault has been robbed and all players have had a cut taken out of their accounts.


(Server) betterbanking.darkrploaded

Runs when the jobs and stuff in sh_darkrp.lua have been created. Also runs after loadCustomDarkRPItems is called.


Card Readers

(Server) betterbanking.readerconfigured [ply owner, string name, int price]

Runs when a player configures their Card Reader.

owner is the owner of the reader. name is the new item name. price is the new price.


(Server) betterbanking.readerpuchased [ply owner, ply customer, string name, int price]

Runs when a player purchases an item from a card reader.

owner is the owner of the card reader. customer is the customer. name is the item name. price is the item price.

Can't find what you're looking for?

Contact support