diff options
author | Joseph Botosh <rumly111@gmail.com> | 2015-09-28 12:04:09 +0300 |
---|---|---|
committer | Joseph Botosh <rumly111@gmail.com> | 2015-09-28 12:04:09 +0300 |
commit | b7a9760e769738058ddbd99bc56d809de26ee99a (patch) | |
tree | cc124e5672de00cde6441a331beed88c9012f107 | |
parent | 9ec237dbbb1b60df6bb17604520b6e546c5dd920 (diff) | |
download | serverdata-b7a9760e769738058ddbd99bc56d809de26ee99a.tar.gz serverdata-b7a9760e769738058ddbd99bc56d809de26ee99a.tar.bz2 serverdata-b7a9760e769738058ddbd99bc56d809de26ee99a.tar.xz serverdata-b7a9760e769738058ddbd99bc56d809de26ee99a.zip |
add abs(N) function
-rw-r--r-- | npc/functions/main.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/npc/functions/main.txt b/npc/functions/main.txt index d510f05b..a9edd4a1 100644 --- a/npc/functions/main.txt +++ b/npc/functions/main.txt @@ -158,3 +158,9 @@ function script npcdebug { debugmes strnpcinfo(3) + ": " + getarg(0); return; } + + +function script abs { + .@n = getarg(0); + return .@n >= 0 ? .@n : -.@n; +} |