Module cl_rarity
Rarity System
Functions
| GetRarityTable (rarity) | GetRarityTable function. |
| GetRandomObject (objects, customRarities) | GetRandomObject function. |
| GetRandomObjects (objects, amount, customRarities) | GetRandomObjects function. |
Functions
- GetRarityTable (rarity)
-
GetRarityTable function.
This function returns a rarity table.
Parameters:
- rarity The rarity<. string
Returns:
-
table
Usage:
local rarityTable = exports.jones_util:GetRarityTable("common")
- GetRandomObject (objects, customRarities)
-
GetRandomObject function.
This function returns a random object from a table.
Parameters:
- objects The object table. table
- customRarities The custom rarities. table
Returns:
-
string
See also:
Usage:
local object = exports.jones_util:GetRandomObject(objects)
- GetRandomObjects (objects, amount, customRarities)
-
GetRandomObjects function.
This function returns a table of random objects.
Parameters:
- objects The object table. table
- amount The amount of objects. number
- customRarities The custom rarities. table
Returns:
-
table
See also:
Usage:
local objects = exports.jones_util:GetRandomObjects(objects, 5)