[FilterScript] Calculator System [+ - / *] Awesome FS
#1

Hello SA-MP members, i would like to share with you my great FilterScript - [Calculator System]

It's very easy to use and simple filterscript.


You can calculate everything, like +(plus) -(negative) /(divide) *(multiply)

Commands:

/calculate (number) [+ - / *] (number) - (Calculates the equation and gives the correct answer)
--------------
Example: (/calculate 10 + 5) - After pressing enter, the answer will appear automatically, check the pictures for more info.

Pictures/Screens
  1. http://postimg.org/image/clrgjwd8d/
  2. http://postimg.org/image/eh3h7zib9/
  3. http://postimg.org/image/5176lvd6b/
  4. http://postimg.org/image/xgrnjtldf/
  5. http://postimg.org/image/dy427cbml/
  6. http://postimg.org/image/9v3xrnhhv/
-----------------
PasteBin :
Reply
#2

@_@ Nice.
Reply
#3

It's really simple, it would be nice to see a complex calculator. Ex: 4 + 2 - 12 * 5 ^ 2.
Reply
#4

That isn't really complex, it's just a matter of combining things.

Example:

pawn Код:
if(sscanf(params, "dsdSDSDSD", numb1, op1, numb2, op2, numb3, op3, numb4, op4))
{
    // Code
}
Reply
#5

Quote:
Originally Posted by Abagail
Посмотреть сообщение
That isn't really complex, it's just a matter of combining things.

Example:

pawn Код:
if(sscanf(params, "dsdSDSDSD", numb1, op1, numb2, op2, numb3, op3, numb4, op4))
{
    // Code
}
Assuming that you will have to repeat that over and over regarding to the amount of operations the player inputs, it's just inefficient. And that people don't usually input spaces between arithmetic operators. Ex: 2+5/2*5^8.

This is possible though, you just have to use the other side of your brain, it's already clear to me. I was just saying that it would be nice if he actually made it support more operations.

I will post some screenshots of it when it's finished.
Reply
#6

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
It's really simple, it would be nice to see a complex calculator. Ex: 4 + 2 - 12 * 5 ^ 2.
Quote:
Originally Posted by Abagail
Посмотреть сообщение
That isn't really complex, it's just a matter of combining things.

Example:

pawn Код:
if(sscanf(params, "dsdSDSDSD", numb1, op1, numb2, op2, numb3, op3, numb4, op4))
{
    // Code
}
I will try to do this, maybe in the next version if i release it, thanks for your suggestion.
Reply
#7

Good contribution.
Reply
#8

Well, I went in and made it. At the moment it only supports pluses and minuses, later it will support more. However, you can add as much operations as you like, as long as it fits in the chatbox!

Brief Screenshots:





Anyway, good luck with your release!
Reply
#9

Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Well, I went in and made it. At the moment it only supports pluses and minuses, later it will support more. However, you can add as much operations as you like, as long as it fits in the chatbox!

Brief Screenshots:





Anyway, good luck with your release!
Nice one, also thanks for your idea.
Reply
#10

Good job. Would also be cool with dialogs or with textdraws. Keep it up mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)