For Developers
If you want make another scoreboard theme for ULX Shortcut?
Oh! Just start make now!
In this page, lead you to make new scoreboard for ULX Shortcut.
How to add scoreboard to ULX Shortcut?
If you want make another scoreboard theme for ULX Shortcut?
Oh! Just start make now!
In this page, lead you to make new scoreboard for ULX Shortcut.
ULX Shortcut's function
You can use some function to make scoreboard.
ULX Shortcut's function below.
ulxSTC:IsUlxInstalled()
Get ulx and ULib is installed.
Returns
bool: Returns ture when ulx and ULib is installed and running on server. If not, returns false.
ulxSTC:GetUlxModules()
Get all translated commands on ULib.
Returns
table: All modules in ulx.
ulxSTC:GetUlxCategory()
Get all commands category.
Returns
table: All categorys string array in ulx.
ulxSTC:GetModule( String cmdName )
Get module table by command name like 'ulx hp'.
Returns
table: Module's table.
ulxSTC:FilterModulesWithType( Modules mds, String argType )
Filtering modules by arg type.
argType
NumArg
PlayersArg
PlayerArg
StringArg
BoolArg
Returns
table: Sorted modules.
ulxSTC:hasPlayerArg( Module mo )
Check PlayerArg exists.
Returns
bool: True if module have PlayerArg or PlayersArg. If not, false.
ulxSTC:hasStringArg( Module mo )
Check StringArg exists.
Returns
bool: True if module have StringArg. If not, false.
ulxSTC:hasNumArg( Module mo )
Check NumArg exists.
Returns
bool: True if module have NumArg. If not, false.
ulxSTC:CalculateStr( String mat, Table targets )
For ulx shortcut advanced formula.
Returns
Number: Calculation Results, or return error string if error occurred during calculation.
ulxSTC:AddNumVar( String varStr, Function func, String help )
Add a variable value for advanced formula.
Arguments
String varStr: Name of variable value. It's not include '{' or '}'.
Function func: A calculating function. This function should return only number.
String help: Set help message. This arg is not used.
Returns
Number: Calculation Results, or return error string if error occurred during calculation.
ulxSTC:GetNumVar( String varStr, Table targets, Args arg )
Add a variable value for advanced formula.
Arguments
String varStr: Var string like '{hp}'.
Table targets: Targeted player(s).
Args arg: This arg is not used.
Returns
Number: Calculation Results, or return error string if error occurred during calculation.
ulxSTC:GetVarList()
Get Variable value list.
Returns
Table: All Vars name list (string).
ulxSTC:GetAllVars()
Get all variable value list.
Returns
Table: All Vars list.
ulxSTC:StrVarsToNumerical( String InText, Table targets )
Replace tag same as '{hp}' to number.
Arguments
String InText: Formula text that will be replaced.
Table targets: Targeted player(s).
Returns
String: Replaced formula.
ulxSTC:AddLanguage( String name, String uniName)
Add a new language.
Arguments
String name: Language name.
String uniName: Language code like 'ko'.
Returns
Table: A Language data table.
ulxSTC:ChangeLang( String uniName )
Change ulx shortcut language.
Arguments
String uniName: Language code like 'ko'.
ulxSTC:Str( String tag, Args args )
Format localization tag into string.
Arguments
String tag: A Localization Tag.
Args args: Values to be formatted into the string.
Returns
String: Localized text.
ULX Shortcut's hooks
ULXSHORTCUT_COMMANDHK_ONCHANGE()
Called when shortcut key on change or add or remove.