xXNemesiSXx Posted March 29, 2011 Share Posted March 29, 2011 I've got an idea for laggy servers, like mine A script that loads resource's names that you can change and that stop and start them (alternatly) every "X" time... it will reduce a lot lags...! Link to comment
qaisjp Posted March 29, 2011 Share Posted March 29, 2011 Yeah sure, it is very easy to make. Link to comment
xXNemesiSXx Posted March 29, 2011 Author Share Posted March 29, 2011 It is an useful idea..! Link to comment
qaisjp Posted March 30, 2011 Share Posted March 30, 2011 What is the name of your resource you want to restart, i will make it. Link to comment
xXNemesiSXx Posted March 30, 2011 Author Share Posted March 30, 2011 qaisjp said: What is the name of your resource you want to restart, i will make it. i don't want to restart a resource... the script has to stop a resource every "x" time and start it evry "x" time... i'm a noob in scripting and more than a noob with setTimer function..! Link to comment
Castillo Posted March 30, 2011 Share Posted March 30, 2011 I don't understand what do you want to do... Link to comment
xXNemesiSXx Posted March 30, 2011 Author Share Posted March 30, 2011 sorry... i cant speak very well english... so... i want to make a script that stop a resource (or more than one) every "x" minutes (for example every 10 minutes) and that start it after "x" minutes (for example 20 minutes) so all the resources are not always running toghether and when a resource starts another resource stops... to reduce the lag... but the script must not stop a random resource, it must stop a resource from a list of names.. if you want to make it, you can also upload it in the community Link to comment
Castillo Posted March 30, 2011 Share Posted March 30, 2011 myResources = {"admin", "scoreboard", "killmessages"} function stopResources() for i,v in pairs(myResources) do local resource = getResourceFromName(tostring(v)) if ( getResourceState(resource) == "running" ) and ( resource ~= getThisResource() ) then stopResource(resource) end end end addCommandHandler("stopresources",stopResources) Do you mean that? Link to comment
solidsnake Posted March 30, 2011 Share Posted March 30, 2011 he means when u enter the server not all resources load at the same time he means for example: after 30 sec / 60 sec ..etc (random) but its not good idea cuz some gamemode not works well if not all resources loaded & maybe sent wrong / false value Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now