[DEV] - Usable Functions
This section could be usable only for developer
--[[
===========================
USABLE FUNCTIONS LIST
===========================
--]]
-- Function to close all stocks
closeAllStocks()
-- Function to close a specific stock by its code
closeStock(stockCode)
-- Function to update yesterday's close values for stocks
updateYesterdayClose()
-- Function to handle stock transactions (buy/sell)
-- Parameters:
-- userIdentifier: The identifier of the user performing the transaction
-- stockCode: The code of the stock being transacted
-- quantity: The number of shares being bought or sold
-- transactionType: The type of transaction (e.g., 'buy' or 'sell')
handleStockTransaction(userIdentifier, stockCode, quantity, transactionType)
-- Function to retrieve comments for a specific stock
-- Parameters:
-- stockCode: The code of the stock to retrieve comments for
-- limit: The maximum number of comments to fetch
getComments(stockCode, limit)
-- Function to add a comment for a specific stock
-- Parameters:
-- stockCode: The code of the stock being commented on
-- userIdentifier: The identifier of the user adding the comment
-- commentText: The text of the comment
addComment(stockCode, userIdentifier, commentText)
-- Function to check if a user exists
-- Parameters:
-- userIdentifier: The identifier of the user to check
userExists(userIdentifier)
-- Function to get details of a user's stock holding
-- Parameters:
-- userIdentifier: The identifier of the user
-- stockCode: The code of the stock to retrieve details for
getUserStockDetails(userIdentifier, stockCode)
-- Function to check if a user has a stock account
-- Parameters:
-- identifier: The identifier of the user
hasStockAccount(identifier)
-- Function to get the total shareholding for a specific stock
-- Parameters:
-- stockCode: The code of the stock
getTotalShareholding(stockCode)
-- Function to check if a player has admin permissions
-- Parameters:
-- source: The source of the player
isPlayerAdmin(source)
Last updated