Skip to main content

reloadStocks

exports["RiP-Invest"]:reloadStocks(cb) 

This function reload and refresh all stocks

Arguments

NameTypeOptionalExplenation
cbFunctionYesCallback function

Returned Table

Returns the complete invest table with all stocks/crypto

Example

local xPlayer = ESX.GetPlayerFromId(source)

exports['RiP-Invest]:reloadStocks(function(allStocks)
for r,p in pairs(allStocks) do
print(p.id)
end
end)