Posts: 498
Threads: 233
Joined: Aug 2013
Reputation:
0
I would like to know which are the functions that might make the server laggy,And what i should prevent from using in the script to avoid getting lag and which callbacks should not be used much, And stuff on improving script and making it less laggy by the script.
Posts: 6,242
Threads: 8
Joined: Jun 2008
It's not so much about what callbacks not to use, it's all about what callback to use, where it's appropriate. And if you are using those callbacks, to check for things in a structured manner, and making sure that you use your structures correctly would be priority.
Logic, is a major portion in working with a language such as this.
This is also where copy-pasters fail, as they simply lump big segments of code together, and it ends up as a terrible mish-mash pile of crap. Then they wonder why the script is falling over, and bugging out.
Then they can't update the code for the script as they can't touch it without it falling over, because they don't understand it, then they mysteriously 'retire' releasing the script as they go.
Posts: 175
Threads: 1
Joined: Apr 2017
Reputation:
0
There are plenty of factors which could come in play here. One being a crappy machine which the server is hosted on.
I'd advise getting someone knowledgeable to have a look at the script if you don't know what you're doing, there's more to it than just changing a few things if you want a more performance friendly script.
Posts: 637
Threads: 23
Joined: Feb 2013
Reputation:
0
You should check which part of script is causing lag.
A little Tip
Many people do GetPlayerName when ever they need the name. But the best way is simply storing player name in a string and using it when needed.
Posts: 6,242
Threads: 8
Joined: Jun 2008
Quote:
Originally Posted by CheezIt
Optimizations that make an insignificant difference like the ones above does not define a laggy script.
|
What you think is an "insignificant difference" has the potential, left unchecked, of crashing the server, and causing player disconnects.