Skip to main content

updateInvest

exports["RiP-Invest"]:updateInvest(investSymbol, investPrice, xPlayer) 

This function updates a stock/crypto price

Arguments

NameTypeOptionalExplenation
investSymbolStringNoStock/Crypto symbol (3 letters)
investPriceIntegerNoNew stock/crypto price
xPlayerObjectYesESX xPlayer object

Returned Value

Returns true if the stock was created. If errors occur, the function returns false

Example

local xPlayer = ESX.GetPlayerFromId(source)

local state = exports['RiP-Invest]:updateInvest("RIP", 22, xPlayer)
if not state then
print("error occur")
end