PaymentMethod
is a FiveM resource that allows players to select a payment method for each purchase. This script provides an export function, requestPaymentMethod
, which enables developers to easily integrate customizable payment options into their FiveM servers.
- Allow players to choose between different payment methods (And cancel).
- Supports both in-game cash and bank account as payment methods.
- Easy integration with existing scripts.
- Download the resource:
- Download the newest version from GitHub.
- Add to your FiveM server:
- Place the
paymentmethod
folder into your server'sresources
directory.
- Update
server.cfg
:
- Add the following line to your
server.cfg
to ensure the resource starts when your server does:ensure paymentmethod
You can use the requestPaymentMethod
export in your scripts to prompt the player for a payment method. Here's how it works:
local paymentMethod = exports.paymentmethod:requestPaymentMethod(300)
if not paymentMethod then return print('Payment was canceled!') end
print(paymentMethod) -- Either 'money' or 'bank'
TriggerServerEvent('yourEvent:buyItems', paymentMethod, ...)