SA-MP Forums Archive
[FilterScript] Calculator System [+ - / *] Awesome FS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Calculator System [+ - / *] Awesome FS (/showthread.php?tid=565211)



Calculator System [+ - / *] Awesome FS - TheSnaKe - 25.02.2015

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 :


Re: Calculator System [+ - / *] Awesome FS - Dry - 25.02.2015

@_@ Nice.


Re: Calculator System [+ - / *] Awesome FS - SickAttack - 26.02.2015

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


Re: Calculator System [+ - / *] Awesome FS - Abagail - 26.02.2015

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
}



Re: Calculator System [+ - / *] Awesome FS - SickAttack - 26.02.2015

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.


Re: Calculator System [+ - / *] Awesome FS - TheSnaKe - 26.02.2015

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.


Re: Calculator System [+ - / *] Awesome FS - Toolkit - 26.02.2015

Good contribution.


Re: Calculator System [+ - / *] Awesome FS - SickAttack - 26.02.2015

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!


Re: Calculator System [+ - / *] Awesome FS - TheSnaKe - 26.02.2015

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.


AW: Calculator System [+ - / *] Awesome FS - Flori - 26.02.2015

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