LEGACY SCRIPT
  • 💻LEGACY SCRIPT DOCUMENTATION
  • 🆓FREE RELEASE
    • 🏦LGF_BANKING
      • 🎲CONFIGURATION (CONVARS)
      • 🧠INSTALLATION
      • 🖋️FUNCTIONS
      • ✈️EXPORTS
    • 🚗ENT510 OX GARAGE
    • 🏠ENT510 HOUSING SYSTEM
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
    • 🦊ENT510 CHAT V1
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
      • 💻UTILITY
      • 🖇️INFORMATION
    • 🔫ENT510 CRIMINAL MENU
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮UTILITY
      • 🖇️INFORMATION
    • 👕ENT510 BAG OUTFIT
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 💻UTILITY
      • 🖇️INFORMATION
  • 💰PAID RELEASE
    • 🚗ENT510 ADVANCED GARAGE
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 📦EXPORTS
    • 🌎LEGACY JOB CREATOR
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
    • 👕LGF CHAR CREATOR
      • 🏅EXPORTS / EVENT
  • 🌎LGF UTILITY
    • 👨‍💻INIT CORE
    • ✈️COMMON
      • 🌙CL COMMON REPLACEMENT
      • 🌙SERVER COMMON REPLACEMENT
      • 🌜CL COMMON REPLACEMENT (FRAMEWORK)
      • 🌜SV COMMON REPLACEMENT (FRAMEWORK)
    • 🔋ENTITY CACHE
      • 👩‍🔬CL CACHE
    • ⚒️FUNCTION UTILITY
Powered by GitBook
On this page
  • Exports Usage (Server Side)
  • Create Credit Card
  • Using the CreateCreditCard exports
  • Example Usage
  • Change PIN (Using the ChangePin exports)
  • Example Usage (using LegacyFramework)
  1. FREE RELEASE
  2. LGF_BANKING

EXPORTS

Exports Usage (Server Side)

Create Credit Card

Using the CreateCreditCard exports

The CreateCreditCard exports allows you to create a credit card in the game with customized metadata.

exports.LGF_Banking:CreateCreditCard(source, metadata)

source: The player ID requesting the creation of the credit card. metadata: A table containing custom data for the credit card.

Example Usage

RegisterCommand('getCard', function(source, args)
    local metadata = {
        label = 'My Custom Credit Card',
        description = 'My Custom Credit Card Description',
        type = "Custom Card Type",
        price = 0,
        itemHash = 'burger',
        weight = 10,
        imageUrl = 'nui://ox_inventory/data/images/' .. itemname .. '.png'
    }
    exports.LGF_Banking:CreateCreditCard(source, metadata)
end)

RegisterCommand('getCard2', function(source, args)
    exports.LGF_Banking:CreateCreditCard(source, {
        label = 'My Custom Credit Card',
        description = 'My Custom Credit Card Description',
        type = "Custom Card Type",
        price = 0,
        itemHash = 'burger',
        weight = 10,
        imageUrl = 'nui://ox_inventory/data/images/' .. itemname .. '.png'
    })
end)
  • This format should be clearer and more structured for users to understand how to use your script.

Change PIN (Using the ChangePin exports)

The ChangePin exports allows you to change the PIN associated with a player's identifier.

exports.LGF_Banking:ChangePin(data)

data: A table containing the player's identifier and the new PIN.

Example Usage (using LegacyFramework)

RegisterCommand('newpin', function(source)
    local playerData = LGF.SvPlayerFunctions.GetPlayerData(source)[1]
    local IDent = playerData.charName
    exports.LGF_Banking:ChangePin({
        identifier = IDent, -- identifier
        pin = "1998" -- new pin (string or boolean)
    })
end)
  • This function allows you to easily update a player's PIN by specifying their identifier and the new PIN.

Last updated 1 year ago

🆓
🏦
✈️