✈️EXPORTS
Exports Usage (Server Side)
Create Credit Card
Using the CreateCreditCard
exports
CreateCreditCard
exportsThe 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 newPIN
.
Last updated