xXNemesiSXx Posted March 29, 2011 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...!
MTA Team qaisjp Posted March 29, 2011 MTA Team Posted March 29, 2011 Yeah sure, it is very easy to make.
MTA Team qaisjp Posted March 30, 2011 MTA Team Posted March 30, 2011 What is the name of your resource you want to restart, i will make it.
xXNemesiSXx Posted March 30, 2011 Author Posted March 30, 2011 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..!
xXNemesiSXx Posted March 30, 2011 Author 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
Castillo Posted March 30, 2011 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?
solidsnake Posted March 30, 2011 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
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