Skip to Content

機能

セットペイメントメソッド

組み込みの支払い方法をオーバーライドします。

exports.ox_fuel:setPaymentMethod(method)

パラメータ

  • メソッドを使用する:function(): boolean?

exports.ox_fuel:setPaymentMethod(function(playerId, amount) local xPlayer = ESX.GetPlayerFromId(playerId) local bankAmount = xPlayer.getAccount('bank').money if bankAmount >= amount then xPlayer.removeAccountMoney('bank', amount) return true end TriggerClientEvent('ox_lib:notify', source, { type = 'error', description = locale('not_enough_money', amount - bankAmount) }) end)
Last updated on