| $math(options,string) or $math(string)
The math function provides simple math operations. Valid Operators are: + - / *.
The string is evaluated from left to right. No precedence is given for operators.
Options can be one of the following:
int (default) - Displays output in an integer.
.# - Displays the output to a precision of # if applicable.
%string - Formats the output to the given c style sprintf string, like "%04d".
Improper of the c style sprintf string may result in crashing QLAD.
This option is only allowed if the "AllowMathsprintf" option is set to 1 for the server. It is off by default.
Example:
| QLAD Script |
on pcmd_kpm cmd /say_stat * You have an alltime stat of $math(.2,$(pa-t.k.e)/$(pa-t.minutesplayed)) kills per minute.;
|
|
|