[WIP] An immersive atm hacking script with built in xp system, custom cameras, minigame difficulty per level and rewards. ONLY SUPPORTS OX INVENTORY on ESX/QBX/QB.
-- Returns (number) player's hacking level based off their xp.
local level = exports.randol_atmhacking:GetHackingLevel()
-- Returns (number) player's hacking xp.
local xp = exports.randol_atmhacking:GetExp()
-- Returns boolean (true or false) if the player is currently searching for targets.
local isHacking = exports.randol_atmhacking:isPlayerHacking()
-- Calling this will stop a player who is currently searching for targets.
exports.randol_atmhacking:StopPlayerHacking()
Server Exports
-- Returns (number) player's hacking level based off their xp.
local level = exports.randol_atmhacking:GetHackingLevel(src)
-- Returns (number) player's hacking xp.
local xp = exports.randol_atmhacking:GetExp(src)
-- Returns (number) the bonus (defined in sv_config Levels table) based off the player's xp.
local bonus = exports.randol_atmhacking:GetHackingBonus(src)
-- Returns (boolean) if the player is connected to an ATM.
local hasAtm = exports.randol_atmhacking:HasAtmOwnership(src)
-- Adds the data receiver item with metadata set. Do not use regular /giveitem commands.
exports.randol_atmhacking:AddReceiverItem(src)
Levels
{ -- Level 1 Example
value = 1, threshold = 500, bonus = 150, gain = {min = 1, max = 3},
settings = {gridSize = 6, timeLimit = 8000, charSet = 'alphabet', required = 5}
},
Value: level
Threshold: xp required to reach next level.
Bonus: the amount of bonus cash you get from your current level after hack.
Gain: the min/max xp you can gain from a single success hack at that level.
Settings: Only applies if using glow-minigames.