createCode
exports["RiP-Coins"]:createCode(playerId, amount)
This function returns a new generated code
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
playerId | Integer/String | No | players server-id for logs |
amount | Integer | No | Code value |
Returned Value
This function returns the generated code. If the function isn't successful it will return false
.
Example
local xPlayer = ESX.GetPlayerFromId(source)
local code = exports["RiP-Coins"]:Coins(xPlayer.source, 1000)
if code then
print("New code generated: "..code)
else
print("Error occured")
end