createStock
exports["RiP-Invest"]:createStock(stockName, stockSymbol, stockPrice, xPlayer)
This function creates a new stock
Arguments
Name | Type | Optional | Explenation |
---|---|---|---|
stockName | String | No | Stock name |
stockSymbol | String | No | Stock symbol (3 letters) |
stockPrice | Integer | No | Stock 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]:createStock("RiP Development", "RIP", 999, xPlayer)
if not state then
print("error occur")
end