[Release] [ESX] loffe_robbery

@Loffes Translation pull request in Github now :slight_smile:

I dont think so

standalone please

how to make it give dirty money? ive trid changing it to xPlayer.addAccountMoney but that didnt work and just broke the script

xPlayer.addAccountMoney(account, amount)
so
xPlayer.addAccountMoney(dirty_money, 100)
something like that.

Yea, don’t forget to make it a string so
xPlayer.addAccountMoney(‘dirty_money’, 100)

1 Like

just look for the part where it increases time. i already done it on mine.

where the trigger of increase time robbery?

RegisterNetEvent(‘loffe_robbery:rob’)
AddEventHandler(‘loffe_robbery:rob’, function(i)
if not IsPedDeadOrDying(peds[i]) then
SetEntityCoords(peds[i], Config.Shops[i].coords)
loadDict(‘mp_am_hold_up’)
TaskPlayAnim(peds[i], “mp_am_hold_up”, “holdup_victim_20s”, 8.0, -8.0, -1, 2, 0, false, false, false)
while not IsEntityPlayingAnim(peds[i], “mp_am_hold_up”, “holdup_victim_20s”, 3) do Wait(0) end
local timer = GetGameTimer() + 120000
while timer >= GetGameTimer() do
if IsPedDeadOrDying(peds[i]) then
break
end
Wait(0)
end

this one?

You have to create another event and edit a existing one

I hope you’ll release a standalone version soon :pray:t3::muscle:t3: Can’t wait for that :grin:

Fantastic script! Thank you!

Is it working?

@dutchlionsesports

1 Like

I guess it does seen the reactions! :slight_smile:

1 Like

I don’t mind that all the players involved in the robbery can pickup the bag. I just used a lower amount of cash given.

You can set the cash

I literally just said that.

I keep getting resource warnings and when I check the console its spamming with

GetNetworkObject: no object by ID 7
GetNetworkObject: no object by ID 6

https://gyazo.com/08b2477e1212078626265fb05955af08
i have problem

So as im unfamiliar with scripting, is there a way to trigger the alarm when the robbery starts ?

Looking at this code

RegisterServerEvent(‘loffe_robbery:rob’)
AddEventHandler(‘loffe_robbery:rob’, function(store)
local src = source
Config.Shops[store].robbed = true
local xPlayers = ESX.GetPlayers()
for i = 1, #xPlayers do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == ‘police’ then
TriggerClientEvent(‘loffe_robbery:msgPolice’, xPlayer.source, store, src)
end
end
TriggerClientEvent(‘loffe_robbery:rob’, -1, store)
Wait(30000)
TriggerClientEvent(‘loffe_robbery:robberyOver’, src)

It seems to me that the police is triggered before the robery is over ?

Also, the Ped dissapears whenever i change the config(change the cooldown or change the money) :frowning: → attempt to index a nil value