• Vehicle Lag
    10 replies, posted
Hello, i have an issue with some costum vehicles like TDM and LWCars Everytime i spawn one of them on my server, the Server gets an big lag and display this error in the console : MDLCache: lonewolfie/chev_impala_09.mdl needs to be recompiled lonewolfie/chev_impala_09.mdl does change depends on the car i spawn. i hope you can help me with that
The lag is due to the server (and clients) caching the models. If you don't want this lag then you should precache the models, using this function: [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/util/PrecacheModel]util.PrecacheModel[/url] [editline]4th September 2015[/editline] That error has nothing to do with anything. It usually happens when models are compiled using the hacked version of StudioMDL
The lag you are getting is the model file being loaded. Your server probably has some additional addons that spawn even more models and whatnot on top of the car, so yeah, lag is to be expected.
[QUOTE=smithy285;48614173]The lag is due to the server (and clients) caching the models. If you don't want this lag then you should precache the models, using this function: [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/util/PrecacheModel]util.PrecacheModel[/url] [editline]4th September 2015[/editline] That error has nothing to do with anything. It usually happens when models are compiled using the hacked version of StudioMDL[/QUOTE] Haha, sounds funny that like TDM and LWCars creators uses hacked versions... about that util.PrecacheModel when i do that wouldnt lag that the Server/Client when an player join i was thinking about doing it with paris blabla ents.getbyclass [editline]4th September 2015[/editline] found out that its a bit tricky, do i need to set it for each car i got? help :>
[QUOTE=Spanky123;48614208]Haha, sounds funny that like TDM and LWCars creators uses hacked versions... about that util.PrecacheModel when i do that wouldnt lag that the Server/Client when an player join i was thinking about doing it with paris blabla ents.getbyclass[/QUOTE] The hacked version of StudioMDL allows developers to create models that exceed the limits of Valve's default StudioMDL. If you want high quality models, then that is what you have to use. Unfortunately, yes it will increase the loading times. However, you have to ask yourself the question: "Would I rather people lag while not in gameplay, or during gameplay?" For sandbox servers nobody will really mind the spots of lag, but in gamemodes such as DarkRP or racing gamemodes, the lag may cause problems
Can you give me an example how to precache all installed models?
[QUOTE=Spanky123;48614301]Can you give me an example how to precache all installed models?[/QUOTE] That is a very bad idea.
Well, yes this will take a while xD Didnt think about that idea, but there must be an way to prevent that MDLCache error ^^
[QUOTE=Spanky123;48614368]Well, yes this will take a while xD Didnt think about that idea, but there must be an way to prevent that MDLCache error ^^[/QUOTE] As I have said before, it is most likely that the error comes from using the hacked [URL="http://dev.cra0kalo.com/?p=21"]Studio MDL compiler[/URL]. This is an engine error, nobody can do anything to stop/prevent the error. There is a very small chance even Robotboy could fix it. As I have also previously said, the error does not do ANYTHING. It is simply a notification or a reminder.
[QUOTE=smithy285;48614598]As I have said before, it is most likely that the error comes from using the hacked [URL="http://dev.cra0kalo.com/?p=21"]Studio MDL compiler[/URL]. This is an engine error, nobody can do anything to stop/prevent the error. There is a very small chance even Robotboy could fix it. As I have also previously said, the error does not do ANYTHING. It is simply a notification or a reminder.[/QUOTE] Why does it lag then?
[QUOTE=Spanky123;48614934]Why does it lag then?[/QUOTE] Because loading models takes up your PC resources?
Sorry, you need to Log In to post a reply to this thread.