This returns whether or not the player is logged into the framework. Can just return true if this doesn't apply to your framework.
--- Checks if a player is logged in--- @returnbooleanfunctionIsLoggedIn()return LocalPlayer.state.IsInSessionend
Bandana
This function checks to see if a player is wearing a bandanna. Vorp using a localplayer state. You can modify to your servers needs. Always returns true if the requirement is set to false.
--- Checks if a player has a bandana on (if required)--- @returnbooleanfunctionIsBandanaOn()ifnot Config.RequireBandana thenreturntrueendreturn LocalPlayer.state.IsBandanaOnend
Bank Hours
This function checks if a bank is open or not based on the settings in the config.lua
--- Checks if the bannk is open (if required)--- @param BankName string--- @returnbooleanfunctionIsBankOpen(BankName)ifnot Config.Banks[BankName] thenreturnfalseendifnot Config.Banks[BankName].hours thenreturntrueendlocal hour =GetClockHours()if hour >= Config.Banks[BankName].hours.open and hour < Config.Banks[BankName].hours.close thenreturntrueendreturnfalseend
Skill Checks
Various skill checks used within this resource. One triggered when planting the explosive device and the other used when cracking open a vault inside of the main vault.
Explosive device skill check. (Triggers instant explosion upon failure)
--- Minigame that is triggered when a player plants the explosive--- @returnbooleanfunctionExplosiveMiniGame()-- https://github.com/Legends-Rising/legends-keypressreturn exports['legends-keypress']:startkp(math.random(15, 20), math.random(12, 16))end
Safe crack skill check.
--- Minigame that is triggered when a player cracks the vault--- @returnbooleanfunctionVaultCrackMiniGame()-- https://github.com/GlitchOo/qadr-safereturn exports['qadr-safe']:createSafe({math.random(1, 40), math.random(20, 60), math.random(10, 99)})end
Robbery Started
This function is triggered when a robbery is started. You can use this to trigger a police notification with whatever resource you use on your server.
--- Function triggered when a bank robbery is started--- @param ServerId number -- The server ID of the player--- @param BankName string -- The name of the bankfunctionBankRobberyStarted(ServerId,BankName)end
Vault Explosion
This function is triggered when the main vault door has been opened. You can use this to trigger a police notification with whatever resource you use on your server.
--- Function triggered when a bank vault explodes--- @param ServerId number -- The server ID of the player--- @param BankName string -- The name of the bankfunctionBankVaultExplosion(ServerId,BankName)end
Ped Spawned
This function is triggered when each ped is pawned (if enabled) during the robbery. You can use this to set the health, armor and accuracy.
--- Function triggered when a law man is spawned (attacker)--- @param entity numberfunctionAttackerPedSpawned(entity)SetPedAccuracy(entity, math.random(80, 98)) -- SetPedAccuracySetEntityHealth(entity, math.random(200, 300)) -- SetEntityHealth Citizen.InvokeNative(0x4E3A0CC4, entity, math.random(100, 200)) -- SetPedArmourend