Forum
CS2D General Will my server lag if there are too much scripts?Will my server lag if there are too much scripts?
7 replies 1
I'm using 800kb and it's running fine.
It'll depend on what your script is using.
Mainly hook settings ect. (second, minute, ...)
But be sure to change Always to ms100 in the script you are using
however it's actually much more complicated. here are some facts:
the size of your script does NOT really matter. there can be a 1 kb script which leads to horrible lags and a 1 mb script which runs smoothly without any lags!
it depends on the actions you perform. every Lua or CS2D command which does something which is directly visible to clients like showing text, playing sounds, killing players, giving money or health, changing positions etc. will cause additional traffic! you can easily cause high lags by using these commands too frequently!
the other thing which can cause lags is a long Lua script execution time. this can happen when you execute very long or complicated scripts or scripts with long loops.
call commands which need to send data less often and things like that...
1