updateInvest
exports["RiP-Invest"]:updateInvest(investSymbol, investPrice, xPlayer)
This function updates a stock/crypto price
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
investSymbol | String | No | Stock/Crypto symbol (3 letters) |
investPrice | Integer | No | New stock/crypto price |
xPlayer | Object | Yes | ESX 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