[PAID] [ESX] NPC Store Rob
A script by JunkBox
Price
$4.99Full Description

[ESX] Store Robbery
As it was requested, here is the ESX version of [vRP] Store Hold Up !
Give your players the opportunity to rob any store just like GTA Online!
Easily translatable to any language.
Highly configurable with modern mechanics, this script allows for more interactions and actions for your players!
Features
- NPC placed at every open store on the map
- Player interaction with NPCs by pointing a gun at them to rob
- Implementation of GTA animations and objects for a more immersive experience
- Different NPC ‘dialog’ throughout the robbery process
- Lots of configuration options which allow for different features such as different ways of interacting with the money bag, whether to alert the police or not and much more!
Requirements / Dependencies
- ESX : es_extended
- fivem-target (optional) : Click Here
Config
Config = {}
Config.robTimer = 15 -- Minutes until a robbed store can be robbed again
Config.itemMoney = false -- Give the thief item money in their inventory instead of normal clean money
Config.itemMoneyItem = "dirty_money" -- Item id of dirty money, can be any other item
Config.moneyAmount = 1000 -- Amount to give to the thief if Config.randomAmount is false
Config.randomAmount = true -- Give the thief a random amount of money when robbing a store
Config.randomMoneyMin = 100 -- Minimum amount to give to the thief if Config.randomAmount is true
Config.randomMoneyMax = 1000 -- Maximum amount to give to the thief if Config.randomAmount is true
Config.copsGroup = "police" -- Name of the police group
Config.copsAmount = 0 -- Number of cops needed to rob a store, 0 = no cops needed
Config.alertPoliceOnRobbery = true -- Alert the police on a robbery
Config.alwaysAlertPolice = false -- If the police is alerted of a store robbery every time or randomly
Config.useTarget = false -- Use the third-eye 'fivem-target' resource or button press to pickup for the money bag
Config.pickupKey = 38 -- Key ID to press in order to pick up the money bag | https://docs.fivem.net/docs/game-references/controls/#controls
Config.npcNameFont = 1 -- The font used for the NPC name
Config.npcNameSize = 1.6 -- The font size for the NPC name
Config.npcTagFont = 4 -- The font used for the NPC tag under their name
Config.npcTagSize = 1.3 -- The font size for the NPC tag under their name
Config.storePeds = {
-- {nil, NPC Name, Store Name, {x, y, z, rotation}, 0, 1}
}
ESX = nil
if(Config.oldESX)then
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
else
ESX = exports["es_extended"]:getSharedObject()
end
Config.policeAlert = function(storeID)
local xPlayers = ESX.GetPlayers()
local cops = {}
for i = 1, #xPlayers, 1 do
local copPlayer = ESX.GetPlayerFromId(xPlayers[i])
if copPlayer then
if copPlayer.job.name == Config.copsGroup then
cops[#cops+1] = copPlayer
end
end
end
for i, v in pairs(cops) do
TriggerClientEvent('chatMessage', v.source, Config.Text.tag, {255, 0, 0}, string.format(Config.Text.robInProgress, Config.storePeds[storeID].storeName))
end
end
Config.Text = {
tag = "[STORE ROB]",
robInProgress = "^1Robbery in progress at store: ^2%s",
bagName = "Money Bag",
pickup = "Pick Up",
npcTag = "[~g~CASHIER~w~]",
npcOkDialog = "[%s] ~y~Ok! Ok! I'll give you everything!",
npcCashierOpenDialog = "[%s] ~b~There! Register's open, I'll put everything in the bag, ok?",
npcNoMoneyDialog = "[%s] ~r~Please, leave me alone, I don't have any money!",
cancelRobMsg = "~r~Leaving the store will cancel the robbery!",
noCops = "~r~Not enough cops online!",
pickupText = "Press ~r~[E] ~w~to pick up",
gotDirtyMoney = "You robbed ~r~$%d ~g~%s ~w~from this store!",
gotCleanMoney = "You robbed ~g~$%d ~w~from this store!"
}
Price: £4.99 + Taxes
| This resource uses the Escrow system! | |
|---|---|
| Code is accessible | No |
| Subscription-based | No |
| Lines (approximately) | 554 |
| Requirements | ESX, fivem-target (optional) |
| Support | Yes |
Community Reviews
See what others are saying about this script.
Leave a Review
Share your experience and help others.
Features