mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
Minor changes, added futher configuration
This commit is contained in:
+7
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user