1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-02 07:48:15 +02:00
parent dfc233c1db
commit caa1a1929c
19 changed files with 584 additions and 134 deletions

View file

@ -0,0 +1,36 @@
---
name: Bug report
about: Create a bug report
title: ''
labels: bug
assignees: IamLation
---
**Describe the bug**
A clear and concise description of what the bug is.
**Framework**
The framework your server uses (e.g. Ox, ESX, QBox, etc).
**Inventory**
The inventory your server uses (e.g. Ox, QB, Quasar, etc)
**Resource version**
The version number listed in fxmanifest.lua.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View file

@ -0,0 +1,2 @@
# Ignore the .vscode folder
.vscode/

View file

@ -0,0 +1,115 @@
<h1 align="center">
<br>
<a href="https://lationscripts.com?utm_source=github&utm_medium=free-script"><img src="https://img.lationscripts.com/icons/lation-scripts-logo.png" alt="Lation Scripts logo"><a>
<br>
Lation Scripts
<br>
</h1>
<h4 align="center">The most popular 24/7 store robbery script on FiveM.</h4>
<p align="center">
<img src="https://img.shields.io/github/stars/iamlation/lation_247robbery?logo=github" alt="Gitter">
<img src="https://img.shields.io/github/downloads/iamlation/lation_247robbery/total?logo=github&style=social">
</p>
<p align="center">
<a href="#key-features">Key Features</a>
<a href="#dependencies">Dependencies</a>
<a href="#installation">Installation</a>
<a href="#support">Support</a>
<a href="#more-scripts">More Scripts</a>
</p>
[![lation 247robbery youtube preview](https://img.lationscripts.com/other/store-robbery-thumbnail-preview.jpg)](https://www.youtube.com/watch?v=L5fWSR1G_mA)
## 🔑 Key Features
* Supports all major FiveM frameworks
- [ESX](https://github.com/esx-framework)
- [QBCore](https://github.com/qbcore-framework)
- [QBox](https://github.com/Qbox-project)
- [Ox](https://github.com/overextended)
* Built-in log support
- [Fivemanage](https://fivemanage.com/?utm_source=github&utm_medium=lation)
- [Fivemerr](https://fivemerr.com/?utm_source=github&utm_medium=lation)
- Discord (not recommended)
* Supports most major 24/7 store maps
- Default (GTA V/FiveM)
- [Gabz 24/7](https://fivem.gabzv.com/package/5024641/?utm_source=github&utm_medium=lation)
- [FM Shop Supermarkets](https://fmshop.tebex.io/category/2175260/?utm_source=github&utm_medium=lation)
* Supports most police dispatching systems
- [Codesign](https://codesign.pro/product/4206357/?utm_source=github&utm_medium=lation)
- [Project Sloth](https://github.com/Project-Sloth/ps-dispatch)
- [Quasar](https://www.quasar-store.com/en/package/5695149/?utm_source=github&utm_medium=lation)
- [C8re](https://www.c8re.store/package/4462305/?utm_source=github&utm_medium=lation)
- [rcore](https://store.rcore.cz/package/5789351/?utm_source=github&utm_medium=lation)
- & many more
* Supports many notification systems
- [ox_lib](https://github.com/overextended/ox_lib)
- [Lation](https://lationscripts.com/product/modern-ui)
- ESX
- QBCore
- [okok](https://okok.tebex.io/package/4724993/?utm_source=github&utm_medium=lation)
- [Wasabi](https://wasabiscripts.com/product/6215100/?utm_source=github&utm_medium=lation)
- [Samuel](https://github.com/Samuels-Development/sd-notify)
- & more
* Locales support by [ox_lib](https://github.com/overextended/ox_lib)
- en, es, cs, etc
- (looking for contributors - [learn more](https://github.com/IamLation/translations))
* Customize requirements
- Set required item to begin robbery
- Require a specific number of police online
* Cooldown options after robbery
- Set a per-player cooldown
- Or use a global cooldown
* Customize reward payout
- Reward the player with dirty money, cash, or items
- Individual rewards can be assigned for registers & safes
- Reward multiple items for registers & safes if desired
- Optionally, increase the reward payout based on number of police
* Set limits
- Set a maximum limit of failed attempts before resetting
* Questionnaire hack
- Built-in questionnaire hack for computer hacking
- Create as many or as few custom questions and answers as you wish
- Or disable altogether, and use a standard skillcheck
## ⚠️ Dependencies
The following resources are **required** in order to setup this resource:
* [ox_lib](https://github.com/overextended/ox_lib/releases)
* [ox_target](https://github.com/overextended/ox_target/releases), [qb-target](https://github.com/qbcore-framework/qb-target) or [interact](https://github.com/darktrovx/interact)
## 🖥️ Installation
* **Step 1**
- Install (*or ensure you have the latest of*) each dependency listed above
* **Step 2**
- Download the latest release of ```lation_247robbery```
* **Step 3**
- Extract the zipped folder into your servers main ```resources``` directory
* **Step 4**
- Add ```ensure lation_247robbery``` in your ```server.cfg``` file *after* all dependencies
* **Step 5**
- Restart your server & enjoy!
## Support
If you have any suggestions for new features, discovered a bug or having a problem with the script, feel free to contact us at anytime via:
* [Discord](https://discord.gg/9EbY4nM5uu)
* [Email](mailto:support@lationscripts.com)
Or by submitting a new issue on the Github page!
## 👉 More Scripts
If you've enjoyed (*or are enjoying*) this script, you'd probably really enjoy our other scripts!
* 🌿 [Advanced Weed Growing](https://lationscripts.com/product/weed-growing?utm_source=github&utm_medium=free-script)
* ❄️ [Advanced Cocaine](https://lationscripts.com/product/coke-processing?utm_source=github&utm_medium=free-script)
* 💉 [Advanced Meth Crafting](https://lationscripts.com/product/meth-crafting?utm_source=github&utm_medium=free-script)
* 🔨 [Advanced Chop Shop](https://lationscripts.com/product/chop-shop?utm_source=github&utm_medium=free-script)
* 💰 [Advanced Money Laundering](https://lationscripts.com/product/money-wash?utm_source=github&utm_medium=free-script)
* 🔍 [Advanced Metal Detecting](https://lationscripts.com/product/metal-detecting?utm_source=github&utm_medium=free-script)
* 🤿 [Advanced Scuba Diving](https://lationscripts.com/product/scuba-diving?utm_source=github&utm_medium=free-script)
* 💊 [Advanced Drug Sales](https://lationscripts.com/product/drug-selling?utm_source=github&utm_medium=free-script)
* ⚙️ [Modern UI](https://lationscripts.com/product/modern-ui?utm_source=github&utm_medium=free-script)

View file

@ -2,7 +2,7 @@
Framework, Inventory = nil, nil
-- Initialize config(s)
local sh_config = require 'config.shared'
local shared = require 'config.shared'
-- Get framework
local function InitializeFramework()
@ -98,7 +98,7 @@ end
--- @return number
function GetPoliceCount()
local count, jobs = 0, {}
for _, job in pairs(sh_config.police.jobs) do
for _, job in pairs(shared.police.jobs) do
jobs[job] = true
end
if Framework == 'esx' then

View file

@ -1,23 +1,25 @@
-- Initialize config(s)
local sh_config = require 'config.shared'
local shared = require 'config.shared'
-- Display a notification
--- @param message string
--- @param type string
function ShowNotification(message, type)
if sh_config.setup.notify == 'ox_lib' then
lib.notify({ description = message, type = type, position = 'top', icon = 'fas fa-store' })
elseif sh_config.setup.notify == 'esx' then
if shared.setup.notify == 'lation_ui' then
exports.lation_ui:notify({ title = 'Convenience Store', message = message, type = type, icon = 'fas fa-store' })
elseif shared.setup.notify == 'ox_lib' then
lib.notify({ description = message, type = type, icon = 'fas fa-store' })
elseif shared.setup.notify == 'esx' then
ESX.ShowNotification(message)
elseif sh_config.setup.notify == 'qb' then
elseif shared.setup.notify == 'qb' then
QBCore.Functions.Notify(message, type)
elseif sh_config.setup.notify == 'okok' then
elseif shared.setup.notify == 'okok' then
exports['okokNotify']:Alert('Convenience Store', message, 5000, type, false)
elseif sh_config.setup.notify == 'sd-notify' then
elseif shared.setup.notify == 'sd-notify' then
exports['sd-notify']:Notify('Convenience Store', message, type)
elseif sh_config.setup.notify == 'wasabi_notify' then
elseif shared.setup.notify == 'wasabi_notify' then
exports.wasabi_notify:notify('Convenience Store', message, 5000, type, false, 'fas fa-store')
elseif sh_config.setup.notify == 'custom' then
elseif shared.setup.notify == 'custom' then
-- Add custom notification export/event here
end
end
@ -32,8 +34,18 @@ end)
-- Display a minigame
--- @param data table
function Minigame(data)
if lib.skillCheck(data.difficulty, data.inputs) then
return true
if shared.setup.minigame == 'lation_ui' then
if exports.lation_ui:skillCheck(nil, data.difficulty, data.inputs) then
return true
end
return false
elseif shared.setup.minigame == 'ox_lib' then
if lib.skillCheck(data.difficulty, data.inputs) then
return true
end
return false
elseif shared.setup.minigame == 'custom' then
-- Add your custom minigame here
end
return false
end
@ -41,7 +53,31 @@ end
-- Display a progress bar
--- @param data table
function ProgressBar(data)
if sh_config.setup.progress == 'ox_lib' then
if shared.setup.progress == 'lation_ui' then
if exports.lation_ui:progressBar({
label = data.label,
description = data.description or nil,
icon = data.icon or nil,
duration = data.duration,
useWhileDead = data.useWhileDead,
canCancel = data.canCancel,
disable = data.disable,
anim = {
dict = data.anim.dict or nil,
clip = data.anim.clip or nil,
flag = data.anim.flag or nil
},
prop = {
model = data.prop.model or nil,
bone = data.prop.bone or nil,
pos = data.prop.pos or nil,
rot = data.prop.rot or nil
}
}) then
return true
end
return false
elseif shared.setup.progress == 'ox_lib' then
-- Want to use ox_lib's progress circle instead of bar?
-- Change "progressBar" to "progressCircle" below & done!
if lib.progressBar({
@ -66,7 +102,7 @@ function ProgressBar(data)
return true
end
return false
elseif sh_config.setup.progress == 'qbcore' then
elseif shared.setup.progress == 'qbcore' then
local p = promise.new()
QBCore.Functions.Progressbar(data.label, data.label, data.duration, data.useWhileDead, data.canCancel, {
disableMovement = data.disable.move,
@ -95,18 +131,47 @@ function ProgressBar(data)
end
end
-- Display an alert dialog
--- @param data table
function ShowAlert(data)
if shared.setup.dialogs == 'lation_ui' then
return exports.lation_ui:alert(data)
elseif shared.setup.dialogs == 'ox_lib' then
return lib.alertDialog(data)
elseif shared.setup.dialogs == 'custom' then
-- Add your custom alert dialog here
end
end
function ShowInput(data)
if shared.setup.dialogs == 'lation_ui' then
return exports.lation_ui:input({
title = data.title,
subtitle = data.subtitle,
submitText = data.submitText,
cancelText = data.cancelText,
type = data.type,
options = data.options
})
elseif shared.setup.dialogs == 'ox_lib' then
return lib.inputDialog(data.title, data.options)
elseif shared.setup.dialogs == 'custom' then
-- Add your custom input dialog here
end
end
-- Send police dispatch message
--- @param data table data.coords, data.street
function PoliceDispatch(data)
if not data then print('^1[ERROR]: Failed to retrieve dispatch data, cannot proceed^0') return end
if sh_config.police.dispatch == 'cd_dispatch' then
if shared.police.dispatch == 'cd_dispatch' then
local playerData = exports['cd_dispatch']:GetPlayerInfo()
if not playerData then
print('^1[ERROR]: cd_dispatch failed to return playerData, cannot proceed^0')
return
end
TriggerServerEvent('cd_dispatch:AddNotification', {
job_table = sh_config.police.jobs,
job_table = shared.police.jobs,
coords = playerData.coords,
title = '10-88 - Store Robbery',
message = 'An alarm has been triggered at 24/7 on ' ..playerData.street,
@ -123,7 +188,7 @@ function PoliceDispatch(data)
radius = 0,
}
})
elseif sh_config.police.dispatch == 'ps-dispatch' then
elseif shared.police.dispatch == 'ps-dispatch' then
local alert = {
coords = data.coords,
message = 'An alarm has been triggered at 24/7 on ' ..data.street,
@ -136,7 +201,7 @@ function PoliceDispatch(data)
length = 3
}
exports["ps-dispatch"]:CustomAlert(alert)
elseif sh_config.police.dispatch == 'qs-dispatch' then
elseif shared.police.dispatch == 'qs-dispatch' then
local playerData = exports['qs-dispatch']:GetPlayerInfo()
if not playerData then
print('^1[ERROR]: qs-dispatch failed to return playerData, cannot proceed^0')
@ -144,7 +209,7 @@ function PoliceDispatch(data)
end
exports['qs-dispatch']:getSSURL(function(image)
TriggerServerEvent('qs-dispatch:server:CreateDispatchCall', {
job = sh_config.police.jobs,
job = shared.police.jobs,
callLocation = playerData.coords,
callCode = { code = '10-88', snippet = 'Store Robbery' },
message = 'An alarm has been triggered at 24/7 on ' ..playerData.street_1,
@ -160,13 +225,13 @@ function PoliceDispatch(data)
}
})
end)
elseif sh_config.police.dispatch == 'core_dispatch' then
elseif shared.police.dispatch == 'core_dispatch' then
local gender = IsPedMale(cache.ped) and 'male' or 'female'
TriggerServerEvent('core_dispatch:addCall', '10-88', 'Potential Store Robbery',
{{icon = 'fa-venus-mars', info = gender}},
{data.coords.x, data.coords.y, data.coords.z},
'police', 30000, 52, 1, false)
elseif sh_config.police.dispatch == 'rcore_dispatch' then
elseif shared.police.dispatch == 'rcore_dispatch' then
local playerData = exports['rcore_dispatch']:GetPlayerData()
if not playerData then
print('^1[ERROR]: rcore_dispatch failed to return playerData, cannot proceed^0')
@ -176,7 +241,7 @@ function PoliceDispatch(data)
code = '10-88 - Store Robbery',
default_priority = 'low',
coords = playerData.coords,
job = sh_config.police.jobs,
job = shared.police.jobs,
text = 'An alarm has been triggered at 24/7 on ' ..playerData.street_1,
type = 'alerts',
blip_time = 30,
@ -190,9 +255,9 @@ function PoliceDispatch(data)
}
}
TriggerServerEvent('rcore_dispatch:server:sendAlert', alert)
elseif sh_config.police.dispatch == 'aty_dispatch' then
TriggerEvent('aty_dispatch:SendDispatch', 'Potential Store Robbery', '10-88', 52, sh_config.police.jobs)
elseif sh_config.police.dispatch == 'op-dispatch' then
elseif shared.police.dispatch == 'aty_dispatch' then
TriggerEvent('aty_dispatch:SendDispatch', 'Potential Store Robbery', '10-88', 52, shared.police.jobs)
elseif shared.police.dispatch == 'op-dispatch' then
local job = 'police'
local text = 'An alarm has been triggered at 24/7 on ' ..data.street
local coords = data.coords
@ -200,7 +265,7 @@ function PoliceDispatch(data)
local title = '10-88 - Store Robbery'
local panic = false
TriggerServerEvent('Opto_dispatch:Server:SendAlert', job, title, text, coords, panic, id)
elseif sh_config.police.dispatch == 'origen_police' then
elseif shared.police.dispatch == 'origen_police' then
local alert = {
coords = data.coords,
title = '10-88 - Store Robbery',
@ -209,9 +274,9 @@ function PoliceDispatch(data)
job = 'police',
}
TriggerServerEvent("SendAlert:police", alert)
elseif sh_config.police.dispatch == 'emergencydispatch' then
elseif shared.police.dispatch == 'emergencydispatch' then
TriggerServerEvent('emergencydispatch:emergencycall:new', 'police', '10-88 | Potential Store Robbery', data.coords, true)
elseif sh_config.police.dispatch == 'custom' then
elseif shared.police.dispatch == 'custom' then
-- Add your custom dispatch system here
else
print('^1[ERROR]: No dispatch system was detected - please visit config/shared.lua "police" section^0')
@ -221,23 +286,23 @@ end
-- Add circle target zones
--- @param data table
function AddCircleZone(data)
if sh_config.setup.interact == 'ox_target' then
if shared.setup.interact == 'ox_target' then
exports.ox_target:addSphereZone(data)
elseif sh_config.setup.interact == 'qb-target' then
elseif shared.setup.interact == 'qb-target' then
exports['qb-target']:AddCircleZone(data.name, data.coords, data.radius, {
name = data.name,
debugPoly = sh_config.setup.debug}, {
debugPoly = shared.setup.debug}, {
options = data.options,
distance = 2,
})
elseif sh_config.setup.interact == 'interact' then
elseif shared.setup.interact == 'interact' then
exports.interact:AddInteraction({
coords = data.coords,
interactDst = 2.0,
id = data.name,
options = data.options
})
elseif sh_config.setup.interact == 'custom' then
elseif shared.setup.interact == 'custom' then
-- Add support for a custom target system here
else
print('^1[ERROR]: No interaction system was detected - please visit config/shared "setup" section^0')

View file

@ -1,6 +1,6 @@
-- Initialize config(s)
local sh_config = require 'config.shared'
local cl_config = require 'config.client'
local shared = require 'config.shared'
local client = require 'config.client'
local icons = require 'config.icons'
-- Initialize variables to track active locations
@ -16,8 +16,8 @@ local wrongPIN, failedHack = 0, 0
local questionData = {}
-- Build the input dialog for questionnaire if applicable
if sh_config.computers.questionnaire then
for _, question in ipairs(sh_config.questionnaire.questions) do
if shared.computers.questionnaire then
for _, question in ipairs(shared.questionnaire.questions) do
questionData[#questionData + 1] = {
type = question.type,
label = question.label,
@ -34,9 +34,9 @@ end
-- Used to check if the answers submitted are correct
--- @param answers table
local function AreAnswersCorrect(answers)
for question, answer in ipairs(sh_config.questionnaire.answers) do
for question, answer in ipairs(shared.questionnaire.answers) do
local submitted_answer = answers[question]
if sh_config.questionnaire.questions[question].type == 'select' then
if shared.questionnaire.questions[question].type == 'select' then
if tonumber(submitted_answer) ~= answer then
return false
end
@ -53,11 +53,11 @@ end
local function InitiateRegisterRobbery()
local canStart = lib.callback.await('lation_247robbery:StartRobbery', false)
if not canStart then activeRegister = false return end
local dict, anim = cl_config.anims.lockpick.dict, cl_config.anims.lockpick.clip
local dict, anim = client.anims.lockpick.dict, client.anims.lockpick.clip
lib.requestAnimDict(dict)
while not HasAnimDictLoaded(dict) do Wait(0) end
TaskPlayAnim(cache.ped, dict, anim, 8.0, 8.0, -1, 51, 1.0, false, false, false)
local skillcheck = Minigame(sh_config.registers.minigame)
local skillcheck = Minigame(shared.registers.minigame)
ClearPedTasks(cache.ped)
if not skillcheck then
TriggerServerEvent('lation_247robbery:DoesLockpickBreak')
@ -70,15 +70,16 @@ local function InitiateRegisterRobbery()
street = GetStreetNameFromHashKey(GetStreetNameAtCoord(coords.x, coords.y, coords.z))
}
PoliceDispatch(data)
if ProgressBar(cl_config.anims.register) then
if ProgressBar(client.anims.register) then
local codeChance = math.random(100)
if codeChance <= sh_config.registers.noteChance then
if codeChance <= shared.registers.noteChance then
local generatedCode = math.random(1111, 9999)
if safePin then safePin = nil end
safePin = generatedCode
local note = lib.alertDialog({
local note = ShowAlert({
header = locale('alerts.note.header'),
content = locale('alerts.note.content', safePin),
icon = icons.received_pin,
centered = true,
cancel = false,
})
@ -99,7 +100,7 @@ end
-- Function to handle hacking the computer if required
local function InitiateComputerHack()
activeComputer = false -- Deactive target
if failedHack >= sh_config.computers.maxAttempts then
if failedHack >= shared.computers.maxAttempts then
activeRegister = false
activeComputer = false
failedHack = 0
@ -107,12 +108,12 @@ local function InitiateComputerHack()
TriggerServerEvent('lation_247robbery:FailedRobbery')
return
end
local dict, anim = cl_config.anims.hackPC.dict, cl_config.anims.hackPC.clip
local dict, anim = client.anims.hackPC.dict, client.anims.hackPC.clip
lib.requestAnimDict(dict)
while not HasAnimDictLoaded(dict) do Wait(0) end
TaskPlayAnim(cache.ped, dict, anim, 8.0, 8.0, -1, 1, 1, false, false, false)
if sh_config.computers.questionnaire then
local questions = lib.inputDialog(locale('inputs.questions.header'), questionData)
if shared.computers.questionnaire then
local questions = ShowInput({ title = locale('inputs.questions.header'), options = questionData })
if not questions then
activeComputer = true
ClearPedTasks(cache.ped)
@ -124,9 +125,10 @@ local function InitiateComputerHack()
local generatedCode = math.random(1111, 9999)
if safePin then safePin = nil end
safePin = generatedCode
lib.alertDialog({
ShowAlert({
header = locale('alerts.hack.header'),
content = locale('alerts.hack.content', safePin),
icon = icons.received_pin,
centered = true,
cancel = false
})
@ -138,7 +140,7 @@ local function InitiateComputerHack()
ShowNotification(locale('notify.failed-hack'), 'error')
end
else
local skillcheck = Minigame(sh_config.computers.minigame)
local skillcheck = Minigame(shared.computers.minigame)
if not skillcheck then
ClearPedTasks(cache.ped)
activeComputer = true
@ -151,9 +153,10 @@ local function InitiateComputerHack()
local generatedCode = math.random(1111, 9999)
if safePin then safePin = nil end
safePin = generatedCode
lib.alertDialog({
ShowAlert({
header = locale('alerts.hack.header'),
content = locale('alerts.hack.content', safePin),
icon = icons.received_pin,
centered = true,
cancel = false
})
@ -164,7 +167,7 @@ end
-- Function to handle the safe robbery
local function InitiateSafeRobbery()
activeSafe = false
if wrongPIN >= sh_config.safes.maxAttempts then
if wrongPIN >= shared.safes.maxAttempts then
activeRegister = false
activeSafe = false
wrongPIN = 0
@ -172,14 +175,17 @@ local function InitiateSafeRobbery()
TriggerServerEvent('lation_247robbery:FailedRobbery')
return
end
local inputCode = lib.inputDialog(locale('inputs.safe.header'), {
{
type = 'input',
label = locale('inputs.safe.label'),
description = locale('inputs.safe.desc'),
placeholder = locale('inputs.safe.placeholder'),
icon = icons.safe_pin,
required = true
local inputCode = ShowInput({
title = locale('inputs.safe.header'),
options = {
{
type = 'input',
label = locale('inputs.safe.label'),
description = locale('inputs.safe.desc'),
placeholder = locale('inputs.safe.placeholder'),
icon = icons.safe_pin,
required = true
}
}
})
if not inputCode then activeSafe = true return end
@ -191,7 +197,7 @@ local function InitiateSafeRobbery()
elseif convertedCode == safePin then
activeSafe = false
wrongPIN = 0
if ProgressBar(cl_config.anims.safe) then
if ProgressBar(client.anims.safe) then
activeRegister = false
TriggerServerEvent('lation_247robbery:CompleteSafeRobbery')
safePin = nil
@ -211,7 +217,7 @@ AddEventHandler('lation_247robbery:onPlayerLoaded', function()
name = 'cash_register' ..key,
coords = coord,
radius = 0.35,
debug = sh_config.setup.debug,
debug = shared.setup.debug,
options = {
{
label = locale('target.register'),
@ -242,7 +248,7 @@ AddEventHandler('lation_247robbery:onPlayerLoaded', function()
name = 'computer' ..key,
coords = coord,
radius = 0.35,
debug = sh_config.setup.debug,
debug = shared.setup.debug,
options = {
{
label = locale('target.computer'),
@ -267,7 +273,7 @@ AddEventHandler('lation_247robbery:onPlayerLoaded', function()
name = 'safe' ..key,
coords = coord,
radius = 0.45,
debug = sh_config.setup.debug,
debug = shared.setup.debug,
options = {
{
label = locale('target.safe'),

View file

@ -10,7 +10,9 @@ return {
clip = 'hassle_intro_loop_f'
},
register = {
label = 'Kasse leeren..',
label = 'Looting register..',
description = 'You begin emptying the register of all cash',
icon = 'fas fa-sack-dollar',
duration = 30000,
position = 'bottom',
useWhileDead = false,
@ -24,7 +26,9 @@ return {
clip = 'cop_b_idle'
},
safe = {
label = 'Tresor leeren..',
label = 'Looting safe..',
description = 'You begin emptying the safe of all cash',
icon = 'fas fa-sack-dollar',
duration = 30000,
position = 'bottom',
useWhileDead = false,

View file

@ -9,6 +9,9 @@ return {
safe = 'fas fa-key',
safe_color = '',
-- Alerts
received_pin = 'fas fa-lock-open',
-- Safe input
safe_pin = 'fas fa-lock'
}

View file

@ -8,16 +8,16 @@ return {
-- What logging service do you want to use?
-- Available options: 'fivemanage', 'fivemerr', 'discord' & 'none'
-- It is highly recommended to use a proper logging service such as Fivemanage or Fivemerr
service = 'discord',
service = 'none',
-- Do you want to include screenshots with your logs?
-- This is only applicable to Fivemanage and Fivemerr
screenshots = false,
-- You can enable (true) or disable (false) specific player events to log here
events = {
-- register_robbed is when a register has been robbed
register_robbed = true,
register_robbed = false,
-- safe_robbed is when.. come on now, you gotta know..
safe_robbed = true
safe_robbed = false
},
-- If service = 'discord', you can customize the webhook data here
-- If not using Discord, this section can be ignored
@ -25,7 +25,7 @@ return {
-- The name of the webhook
name = '24/7 Robbery Logs',
-- The webhook link
link = 'https://discord.com/api/webhooks/1379948922344050768/GYG104XUy2wIVDRMeoRLnk8QbvMnEJjsz4yLsrzM0rJO_ZYOV_n8NUowjT1ez2SaQTTb',
link = '',
-- The webhook profile image
image = 'https://i.imgur.com/ILTkWBh.png',
-- The webhook footer image

View file

@ -3,7 +3,7 @@ lua54 'yes'
game 'gta5'
name 'lation_247robbery'
author 'iamlation'
version '1.5.0'
version '1.5.1'
repository 'https://github.com/IamLation/lation_247robbery'
description 'FiveM\'s most popular 24/7 store robbery script'

View file

@ -0,0 +1,44 @@
{
"notify": {
"cancel-rob": "Přestal jsi vykrádat pokladnu.",
"cooldown": "Tohle se zdá jako špatný nápad - měl bych počkat.",
"no-police": "Ve městě není dostatek policistů.",
"missing-item": "Myslím, že by to bylo jednodušší, kdybych měl nějaký nástroj.",
"item-broke": "Zlomil jsi paklíč a nepodařilo se ti otevřít pokladnu.",
"failed-hack": "Nepodařilo se ti nabourat do počítače.",
"wrong-pin": "Tohle nevypadá správně... je to stále zamčené.",
"failed-limit": "Pokusil ses příliš mnohokrát a nepodařilo se ti vykrást obchod."
},
"target": {
"register": "Vykrást pokladnu",
"computer": "Přihlásit se",
"safe": "Odemknout"
},
"alerts": {
"note": {
"header": "Nalezená poznámka",
"content": "Našel jsi zajímavou poznámku pod pokladnou, na které jsou napsána pouze následující čísla: %s"
},
"hack": {
"header": "Kód odhalen",
"content": "Úspěšně ses naboural do počítače a našel jsi následující kód: %s"
}
},
"inputs": {
"questions": {
"header": "Bezpečnostní otázky"
},
"safe": {
"header": "Trezor obchodu",
"label": "Zadej PIN",
"desc": "Zadej PIN k odemknutí trezoru.",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Pokladna vykradena",
"register-robbed-message": "%s (identifikátor: %s) úspěšně vykradl pokladnu za %s",
"safe-robbed-title": "Trezor vykraden",
"safe-robbed-message": "%s (identifikátor: %s) úspěšně vykradl trezor za %s"
}
}

View file

@ -0,0 +1,44 @@
{
"notify": {
"cancel-rob": "Du hörst auf, die Kasse auszurauben",
"cooldown": "Geschäfte können nicht so oft ausgeraubt werden bitte warte und versuche es später erneut",
"no-police": "Es sind nicht genügend Polizisten in der Stadt",
"missing-item": "Ich denke, das wäre einfacher, wenn ich ein Werkzeug hätte",
"item-broke": "Du hast das Dietrich-Set zerbrochen und konntest die Kasse nicht öffnen",
"failed-hack": "Du hast es nicht geschafft, den Computer zu hacken",
"wrong-pin": "Das scheint nicht richtig zu sein... es ist immer noch gesperrt",
"failed-limit": "Du hast zu oft versagt und konntest den Laden nicht ausrauben"
},
"target": {
"register": "Kasse ausrauben",
"computer": "Einloggen",
"safe": "Aufschließen"
},
"alerts": {
"note": {
"header": "Notiz Gefunden",
"content": "Du hast eine interessante Notiz unter der Kasse gefunden, auf der nur die folgenden Zahlen stehen: %s"
},
"hack": {
"header": "Code Enthüllt",
"content": "Du hast den Computer erfolgreich gehackt und den folgenden Code gefunden: %s"
}
},
"inputs": {
"questions": {
"header": "Sicherheitsfragen"
},
"safe": {
"header": "Ladentresor",
"label": "PIN eingeben",
"desc": "Gib die PIN ein, um den Tresor zu öffnen",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Kasse ausgeraubt",
"register-robbed-message": "%s (Kennung: %s) hat erfolgreich eine Kasse für %s ausgeraubt",
"safe-robbed-title": "Tresor ausgeraubt",
"safe-robbed-message": "%s (Kennung: %s) hat erfolgreich einen Tresor für %s ausgeraubt"
}
}

View file

@ -0,0 +1,44 @@
{
"notify": {
"cancel-rob": "Du stoppede med at berøve kassen",
"cooldown": "Det her virker som en dårlig ide - jeg burde vente",
"no-police": "Der er ikke nok politibetjente i byen",
"missing-item": "Jeg tror det her ville være lettere hvis jeg havde et redskab",
"item-broke": "Du knækkede dirkesættet og kunne ikke åbne kassen",
"failed-hack": "Du mislykkedes med at hacke dig ind på computeren",
"wrong-pin": "Det her virker ikke rigtigt.. den er stadig låst",
"failed-limit": "Du fejlede for mange gange og mislykkedes med at berøve butikken"
},
"target": {
"register": "Berøv kasse",
"computer": "Log ind",
"safe": "Lås op"
},
"alerts": {
"note": {
"header": "Note fundet",
"content": "Du fandt en interessant note under kassen med intet andet end de følgende numre på den: %s"
},
"hack": {
"header": "Kode udsat",
"content": "Du hackede computeren med succes og fandt den følgende kode: %s"
}
},
"inputs": {
"questions": {
"header": "Sikkerheds spørgsmål"
},
"safe": {
"header": "Forretning pengeskab",
"label": "Tilføj PIN-kode",
"desc": "Tilføj PIN-koden for at låse pengeskabet op",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Kasse berøvet",
"register-robbed-message": "%s (identifier: %s) har berøvet en kasse succesfuldt for %s",
"safe-robbed-title": "Pengeskabet berøvet",
"safe-robbed-message": "%s (identifier: %s) har berøvet et pengeskab succesfuldt for %s"
}
}

View file

@ -1,45 +1,44 @@
{
"notify": {
"cancel-rob": "Du hast aufgehört, die Kasse auszurauben",
"cooldown": "Das scheint keine gute Idee zu sein - ich sollte warten",
"no-police": "Es sind nicht genug Polizisten in der Stadt",
"missing-item": "Ich denke, das wäre einfacher mit einem Werkzeug",
"item-broke": "Du hast den Dietrich zerbrochen und konntest die Kasse nicht öffnen",
"failed-hack": "Der Hack des Computers ist fehlgeschlagen",
"wrong-pin": "Das scheint nicht richtig zu sein... es ist noch verschlossen",
"failed-limit": "Du hast zu oft versagt und den Raub nicht geschafft"
},
"target": {
"register": "Kasse ausrauben",
"computer": "Anmelden",
"safe": "Entsperren"
},
"alerts": {
"note": {
"header": "Notiz gefunden",
"content": "Du hast unter der Kasse eine interessante Notiz gefunden, auf der nur folgende Zahlen stehen: %s"
},
"hack": {
"header": "Code aufgedeckt",
"content": "Du hast den Computer erfolgreich gehackt und den folgenden Code gefunden: %s"
}
},
"inputs": {
"questions": {
"header": "Sicherheitsfragen"
},
"safe": {
"header": "Tresor",
"label": "PIN eingeben",
"desc": "Gib die PIN ein, um den Tresor zu entsperren",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Kasse ausgeraubt",
"register-robbed-message": "%s (Kennung: %s) hat erfolgreich eine Kasse um %s ausgeraubt",
"safe-robbed-title": "Tresor ausgeraubt",
"safe-robbed-message": "%s (Kennung: %s) hat erfolgreich einen Tresor um %s ausgeraubt"
"notify": {
"cancel-rob": "You stopped robbing the register",
"cooldown": "This seems like a bad idea - I should wait",
"no-police": "There are not enough police in the city",
"missing-item": "I think this would be easier if I had a tool",
"item-broke": "You broke the lockpick and failed to open the register",
"failed-hack": "You failed hacking into the computer",
"wrong-pin": "This doesn't seem right.. it's still locked",
"failed-limit": "You failed too many times and failed to rob the store"
},
"target": {
"register": "Rob register",
"computer": "Login",
"safe": "Unlock"
},
"alerts": {
"note": {
"header": "Note Found",
"content": "You found an interesting note under the register with nothing but the following numbers written on it: %s"
},
"hack": {
"header": "Code Exposed",
"content": "You successfully hacked the computer and find the following code: %s"
}
},
"inputs": {
"questions": {
"header": "Security Questions"
},
"safe": {
"header": "Store Safe",
"label": "Enter PIN",
"desc": "Input the PIN to unlock the safe",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Register Robbed",
"register-robbed-message": "%s (identifier: %s) has successfully robbed a register for %s",
"safe-robbed-title": "Safe Robbed",
"safe-robbed-message": "%s (identifier: %s) has successfully robbed a safe for %s"
}
}

View file

@ -0,0 +1,44 @@
{
"notify": {
"cancel-rob": "Dejaste de robar la caja registradora",
"cooldown": "Esto parece una mala idea, debería esperar",
"no-police": "No hay suficientes policías en la ciudad",
"missing-item": "Creo que esto sería más fácil si tuviera una herramienta",
"item-broke": "Rompiste la ganzúa y fallaste al abrir la caja registradora",
"failed-hack": "Fallaste al hackear el ordenador",
"wrong-pin": "Esto no parece correcto... sigue bloqueado",
"failed-limit": "Fallaste demasiadas veces y no pudiste robar la tienda"
},
"target": {
"register": "Robar caja registradora",
"computer": "Iniciar sesión",
"safe": "Desbloquear"
},
"alerts": {
"note": {
"header": "Nota encontrada",
"content": "Encontraste una nota interesante debajo de la caja registradora con solo los siguientes números escritos: %s"
},
"hack": {
"header": "Código encontrado",
"content": "Hackeaste con éxito el ordenador y encontraste el siguiente código: %s"
}
},
"inputs": {
"questions": {
"header": "Preguntas de seguridad"
},
"safe": {
"header": "Caja fuerte de la tienda",
"label": "Introducir PIN",
"desc": "Introduce el PIN para desbloquear la caja fuerte",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Caja registradora robada",
"register-robbed-message": "%s (identificador: %s) ha robado con éxito una caja registradora por %s",
"safe-robbed-title": "Caja fuerte robada",
"safe-robbed-message": "%s (identificador: %s) ha robado con éxito una caja fuerte por %s"
}
}

View file

@ -0,0 +1,44 @@
{
"notify": {
"cancel-rob": "Kasayı soymayı bıraktın",
"cooldown": "Bu pek iyi bir fikir gibi görünmüyor - Biraz beklemeliyim",
"no-police": "Şehirde yeterli polis yok",
"missing-item": "Bir aletim olsaydı bu daha kolay olurdu",
"item-broke": "Maymuncuğun kırıldı ve kasayı açmayı başaramadın",
"failed-hack": "Bilgisayarı hacklemeyi başaramadın",
"wrong-pin": "Bu doğru görünmüyor.. hala kilitli",
"failed-limit": "Çok fazla başarısız oldun ve dükkânı soymayı başaramadın"
},
"target": {
"register": "Kasayı Soy",
"computer": "Giriş Yap",
"safe": "Kilit Aç"
},
"alerts": {
"note": {
"header": "Not Bulundu",
"content": "Kasayı açarken ilginç bir not buldun. Üzerinde sadece şu numaralar yazıyor: %s"
},
"hack": {
"header": "Kod Ortaya Çıktı",
"content": "Bilgisayarı başarılı bir şekilde hackledin ve şu kodu buldun: %s"
}
},
"inputs": {
"questions": {
"header": "Güvenlik Soruları"
},
"safe": {
"header": "Dükkan Kasası",
"label": "PIN Gir",
"desc": "Kasayı açmak için PIN kodunu gir",
"placeholder": "1234"
}
},
"logs": {
"register-robbed-title": "Kasa Soyuldu",
"register-robbed-message": "%s (identifier: %s), %s değerinde bir kasayı başarıyla soydu",
"safe-robbed-title": "Kasa Soyuldu",
"safe-robbed-message": "%s (identifier: %s), %s değerinde bir kasayı başarıyla soydu"
}
}

View file

@ -1,6 +1,6 @@
-- Initialize config(s)
local sv_config = require 'config.server'
local sh_config = require 'config.shared'
local shared = require 'config.shared'
-- Check to see if fm-logs or fmsdk is started
local fmlogs = GetResourceState('fm-logs') == 'started'
@ -10,7 +10,7 @@ local fmsdk = GetResourceState('fmsdk') == 'started'
--- @param message string Message contents
--- @param type string Log type
function EventLog(message, type)
if not message or not sh_config.setup.debug then return end
if not message or not shared.setup.debug then return end
if sv_config.logs.service == 'fivemanage' then
if not fmsdk then return end
exports.fmsdk:LogMessage(type or 'info', message)

View file

@ -1,5 +1,5 @@
-- Initialize config(s)
local sh_config = require 'config.shared'
local shared = require 'config.shared'
local sv_config = require 'config.server'
-- Initialize global state for cooldowns
@ -45,7 +45,7 @@ end
local function CanPlayerRob(identifier)
if not identifier then return false end
local currentTime = os.time()
if sh_config.setup.global.enable then
if shared.setup.global.enable then
if GlobalState.cooldown or GlobalState.started then
return false
end
@ -53,7 +53,7 @@ local function CanPlayerRob(identifier)
if not states[identifier] then return true end
local lastCompleted = states[identifier].completed
if lastCompleted then
if (currentTime - lastCompleted) < sh_config.setup.cooldown then
if (currentTime - lastCompleted) < shared.setup.cooldown then
return false
end
end
@ -63,7 +63,7 @@ end
-- Starts & ends global cooldown if enabled
local function StartCooldown()
GlobalState.cooldown = true
local wait = math.floor(sh_config.setup.global.duration * 1000)
local wait = math.floor(shared.setup.global.duration * 1000)
SetTimeout(wait, function()
GlobalState.cooldown = false
end)
@ -88,15 +88,15 @@ lib.callback.register('lation_247robbery:StartRobbery', function(source)
EventLog('[main.lua]: lation_247robbery:StartRobbery: player not nearby any registers', 'error')
return false
end
local hasRequiredItem = GetItemCount(source, sh_config.registers.item) >= 1
local hasRequiredItem = GetItemCount(source, shared.registers.item) >= 1
if not hasRequiredItem then
TriggerClientEvent('lation_247robbery:Notify', source, locale('notify.missing-item'), 'error')
EventLog('[main.lua]: lation_247robbery:StartRobbery: player missing required item', 'error')
return false
end
if sh_config.police.count > 0 then
if shared.police.count > 0 then
local police = GetPoliceCount()
if not police or police < sh_config.police.count then
if not police or police < shared.police.count then
TriggerClientEvent('lation_247robbery:Notify', source, locale('notify.no-police'), 'error')
EventLog('[main.lua]: lation_247robbery:StartRobbery: not enough police to start robbery', 'error')
return false
@ -148,8 +148,8 @@ RegisterNetEvent('lation_247robbery:DoesLockpickBreak', function()
EventLog('[main.lua]: lation_247robbery:DoesLockpickBreak: player not nearby any registers', 'error')
return
end
if math.random(100) <= sh_config.registers.breakChance then
RemoveItem(source, sh_config.registers.item, 1)
if math.random(100) <= shared.registers.breakChance then
RemoveItem(source, shared.registers.item, 1)
TriggerClientEvent('lation_247robbery:Notify', source, locale('notify.item-broke'), 'error')
end
if GlobalState.started then GlobalState.started = false end
@ -185,13 +185,13 @@ RegisterNetEvent('lation_247robbery:CompleteRegisterRobbery', function()
EventLog('[main.lua]: lation_247robbery:CompleteRegisterRobbery: player not nearby any registers', 'error')
return
end
local police = sh_config.police.risk and GetPoliceCount() or 0
local police = shared.police.risk and GetPoliceCount() or 0
local items = {}
for _, add in pairs(sh_config.registers.reward) do
for _, add in pairs(shared.registers.reward) do
if math.random(100) <= add.chance then
local quantity = math.random(add.min, add.max)
if police > 0 then
local increase = 1 + (police * sh_config.police.percent / 100)
local increase = 1 + (police * shared.police.percent / 100)
quantity = math.floor(quantity * increase)
end
if add.metadata then
@ -249,13 +249,13 @@ RegisterNetEvent('lation_247robbery:CompleteSafeRobbery', function()
EventLog('[main.lua]: lation_247robbery:CompleteSafeRobbery: player not nearby any safes', 'error')
return
end
local police = sh_config.police.risk and GetPoliceCount() or 0
local police = shared.police.risk and GetPoliceCount() or 0
local items = {}
for _, add in pairs(sh_config.safes.reward) do
for _, add in pairs(shared.safes.reward) do
if math.random(100) <= add.chance then
local quantity = math.random(add.min, add.max)
if police > 0 then
local increase = 1 + (police * sh_config.police.percent / 100)
local increase = 1 + (police * shared.police.percent / 100)
quantity = math.floor(quantity * increase)
end
if add.metadata then

View file

@ -1,5 +1,5 @@
-- Initialize config(s)
local sh_config = require 'config.shared'
local shared = require 'config.shared'
-- Set resource
local resourceName = 'lation_247robbery'
@ -58,10 +58,10 @@ local function thankyou()
end)
end
if sh_config.setup.version then
if shared.setup.version then
checkversion()
end
if sh_config.YouFoundTheBestScripts then
if shared.YouFoundTheBestScripts then
thankyou()
end