Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.38 KB

README.md

File metadata and controls

41 lines (26 loc) · 1.38 KB

PaymentMethod - FiveM Script

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.

Preview

image

Features

  • 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.

Installation

  1. Download the resource:
  • Download the newest version from GitHub.
  1. Add to your FiveM server:
  • Place the paymentmethod folder into your server's resources directory.
  1. Update server.cfg:
  • Add the following line to your server.cfg to ensure the resource starts when your server does:
    ensure paymentmethod
    

Usage

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, ...)