Minor changes, added futher configuration

This commit is contained in:
ElPumpo
2018-08-14 17:29:34 +02:00
parent 2913e35009
commit 93c075e958
4 changed files with 35 additions and 32 deletions
+7 -1
View File
@@ -49,6 +49,7 @@ AddEventHandler('esx_holdup:rob', function(robb)
if not rob then
if cops >= Config.PoliceNumberRequired then
rob = true
for i=1, #xPlayers, 1 do
local xPlayer = ESX.GetPlayerFromId(xPlayers[i])
if xPlayer.job.name == 'police' then
@@ -73,7 +74,12 @@ AddEventHandler('esx_holdup:rob', function(robb)
if xPlayer then
local award = store.reward
TriggerClientEvent('esx_holdup:robberycomplete', savedSource, award)
xPlayer.addAccountMoney('black_money', award)
if Config.GiveBlackMoney then
xPlayer.addAccountMoney('black_money', award)
else
xPlayer.addMoney(award)
end
local xPlayers = ESX.GetPlayers()
for i=1, #xPlayers, 1 do