-
Notifications
You must be signed in to change notification settings - Fork 0
Extended: Others
GameRules:GetRoundTime()Gets the total round time.
Return: number
GameRules:SetRoundTime(time)Sets the total round time to given value.
time: number
GameRules:GetRoundStartTime()Gets the round start time.
Return: number
GameRules:IsInFreezeTime()Returns if is in the freeze time.
Return: true or false
string:StartsWith(str)Returns whether or not the first string starts with the second.
Return: true or false
str: string
string:EndsWith(str)Returns whether or not the second passed string matches the end of the first.
Return: true or false
str: string
string:Trim()Removes leading and trailing matches of a string.
Return: string
string:Split(splitstr, fullresult)Splits the string into a table of strings, separated by the first argument.
When fullresult is true, the table will contain extra content with empty string.
For example: String "1,,2" and split by , will return {"1", "", "2"}. false instead return {"1", "2"}.
Return: table
splitstr: string
fullresult: bool
math.clamp(number, min, max)Clamps a number between a minimum and maximum value.
Return: number
number: number
min: number
max: number
math.round(number, decimals)Rounds the given value to the nearest whole number or to the given decimal places.
Return: number
number: number
decimals: number
table.contains(self, value, ignorefonttext)Returns true if the table contains the value.
If ignorefonttext is true, when looking for string table it will ignore string like "<font>" and "</font>".
Return: true or false
self: table
value: any
ignorefonttext: bool
table.Copy(self, tbl)Creates a deep copy and returns that copy. If tbl is given, will copy to tbl instead.
Return: table
self: table
tbl: table
table.find(self, value)Try find the value in the table, returns true if the given value is found.
BUG: This will only loop the table by using ipair, so it will fail when processing table with string keys.
Return: bool, number
self: table
value: any
table.findTimer(self, value)Internal function, used to find the timer.
Return: bool, number
self: table
value: string
table.mergeDoubleQuotes(self, split_character)Use with string:Split(), this will merge the string table with double quotes exist.
For example: When giving table {"I", "Love", "You", "\"And", "I", "Love", "You\""}, this function will merge the table to: {"I", "Love", "You", "And I Love You"}.
Make sure split_character is the same value when you split the string.
self: table
split_character: string
table.shuffle(self)Performs an inline Fisher-Yates shuffle on the table in "O(n)" time.