Mdbelen Posted January 11, 2011 Posted January 11, 2011 Hi, i just saw, that there should be a refreshResources function in MTA 1.1. I guess this is supposed to refresh all resources on the server. But IMO it would be nice if you could refresh single resources, too. You could change the command to refreshResource( [theResource] ) and if theResource is nil it refreshes all. Would be useful if you change some settings of a resource (e.g. ghostmode false->true) you could refresh it without causing the lag caused by refreshing all resources at once (which is incredible high).
12p Posted January 11, 2011 Posted January 11, 2011 no, because restarting the resource makes the job. (It is stopResource => timer => startResource).
Mdbelen Posted January 11, 2011 Author Posted January 11, 2011 And what if the resource is not running? It needs to achieve the same effect as "refreshall". I don't think that this is done with a simple start of the resource.
SDK Posted January 11, 2011 Posted January 11, 2011 I'd like to see this added, our server has over 1000 maps/resources atm. When we /refresh to add new maps, it sometimes gives some small network trouble, sometimes more. Don't know if it's possible to implement it that way, I hope so.
12p Posted January 11, 2011 Posted January 11, 2011 And what if the resource is not running? It needs to achieve the same effect as "refreshall". I don't think that this is done with a simple start of the resource. No need to refresh a resource when isn't running, because when you start it, it gets refreshed -.-
Discord Moderators Zango Posted January 12, 2011 Discord Moderators Posted January 12, 2011 I think what refreshResources does is loading/unloading resources which are added/removed or changed. It doesn't affect running resources as refreshall does Sounds to me like you simply need to restart the resource? Based on your example you edit something in a script, and want it refreshed
12p Posted January 12, 2011 Posted January 12, 2011 Yes, Zango, I'm quite sure he just wants to refresh resource files, etc. after modifying some script. But it can be done just by restarting the resource lol.
Recommended Posts