Posts: 237
Threads: 18
Joined: Mar 2010
Reputation:
0
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)
Posts: 3,133
Threads: 71
Joined: Dec 2013
Reputation:
0
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!
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
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.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
@TheRohlikar - Looks pretty bad to me this is why you never create textdraws with decimal positions.