Skip to content

Commit

Permalink
Update functions.lua
Browse files Browse the repository at this point in the history
chargeplayer
  • Loading branch information
alvwashere authored Jan 27, 2024
1 parent e1908bb commit 2c1e3b4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions server/functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ function GetJob(source)
end
end

function ChargePlayer(source, amount)
if ESX then
local xPlayer = ESX.GetPlayerFromId(source)

xPlayer.removeMoney(amount)
elseif QBCore then
local Player = QBCore.Functions.GetPlayer(source)

Player.Functions.RemoveMoney(amount)
elseif Ox then
-- No money support for Ox setup at current date.
end
end

function DiscordLog(webhook, title, message, data)
if GetResourceState('alv_lib') == 'missing' then
local color, userName, avatarUrl
Expand Down

0 comments on commit 2c1e3b4

Please sign in to comment.