[FilterScript] Calculator with textdraws
#1

Calculator with textdraws

+++++++++

Really simple filterscript that took me like 30-45 minutes to code.
I would really like to get a +REP from you guys so I can server advertise my server.

Pastebin

http://pastebin.com/G26wEe3V
Reply
#2

You should add a screenshot of the calculator, most users don't download a script if they don't know how it looks like.
You don't need to create the textdraw for every player if the text doesn't change (logo, number keys, operators, ...).
Also, you should review the OnPlayerClickTextDraw callback and change those if-if-if-... statements into a single if-else statement, because the clickedid textdraw is always checked 16 times.
For more performance, you could also create an array of booleans and set it to true if the player typed /calculator and false if the player exited it, then check it before doing all textdraws check under OnPlayerClickTextDraw.

Just some suggestions, I gave you some reputation anyway.
(sorry any mistakes, my English is a bit rusty these days)
Reply
#3

Can you show a screenshot? I'd rather not waste my time clicking the copy and paste buttons if I don't even know what it looks like!
Reply
#4

He certainly made a huge mistake not creating textdraws correctly for starters any textdraws that don't chance you only need to create them once any time you need a textdraw for all players you use player textdraws. This script doesn't destroy any textdraws either it's very shoddy.
Reply
#5

Hi,

screens:

http://www.img.tpx.cz/uploads/gta_sa...0-04-36-78.bmp
http://www.img.tpx.cz/uploads/gta_sa...0-04-44-90.bmp
http://www.img.tpx.cz/uploads/gta_sa...0-04-59-43.bmp

It's look really nice !
Reply
#6

@TheRohlikar - Looks pretty bad to me this is why you never create textdraws with decimal positions.
Reply
#7

This isn't my script.. But yes...
Reply
#8

Nice FS!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)