03 Dec 14, 05:23PM
Are you confused by using Assault cube's "math operators"?You prefer using C++/C math operators? If so, this script was made for you!!
Usage:
cmop number math-operator number
Ex:
echo cmop 6 + 5
Outputs: 11
PS:
I know that this script is extremely useless but who cares!Its my first time!
[SELECT ALL] Code:
alias cmop [
if (strcmp $arg2 +) [
+ $arg1 $arg3
] [
if (strcmp $arg2 -) [
- $arg1 $arg3
] [
if (strcmp $arg2 *) [
* $arg1 $arg3
] [
if (strcmp $arg2 div) [
div $arg1 $arg3
] [
if (strcmp $arg2 mod) [
mod $arg1 $arg3
] [
if (strcmp $arg2 powf) [
powf $arg1 $arg3
] [
if (strcmp $arg2 +f) [
+f $arg1 $arg3
] [
if (strcmp $arg2 -f) [
-f $arg1 $arg3
] [
if (strcmp $arg2 *f) [
*f $arg1 $arg3
] [
if (strcmp $arg2 divf) [
divf $arg1 $arg3
] [
if (strcmp $arg2 modf) [
modf $arg1 $arg3
] [
if (strcmp $arg2 !) [
! $arg1 $arg3
] [
if (strcmp $arg2 ==) [
= $arg1 $arg3
] [
if (strcmp $arg2 !=) [
!= $arg1 $arg3
] [
if (strcmp $arg2 <) [
< $arg1 $arg3
] [
if (strcmp $arg2 >) [
> $arg1 $arg3
] [
if (strcmp $arg2 <f) [
<f $arg1 $arg3
] [
if (strcmp $arg2 >f) [
>f $arg1 $arg3
] [
if (strcmp $arg2 =f) [
=f $arg1 $arg3
] [
if (strcmp $arg2 <=) [
<= $arg1 $arg3
] [
if (strcmp $arg2 >=) [
>= $arg1 $arg3
] [
if (strcmp $arg2 div=) [
div= $arg1 $arg3
] [
if (strcmp $arg2 div=f) [
div=f $arg1 $arg3
] [
if (strcmp $arg2 !=f) [
+ $arg1 $arg3
] [
if (strcmp $arg2 &&) [
&& $arg1 $arg3
] [
if (strcmp $arg2 ||) [
|| $arg1 $arg3
] [ hudecho (c 3) Alias M: Error in second argument ]
] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]
]
Usage:
cmop number math-operator number
Ex:
echo cmop 6 + 5
Outputs: 11
PS:
I know that this script is extremely useless but who cares!Its my first time!