Help with CL, SH and SV

I just want to clarify which files of cl_, sh_ and sv_ (Client, Shared and Server respectivly) get pushed (AddCSLuaFile) and which get included (include) in a push based system:

– Client Push

– Shared Push

– Server Push


Ok. Let me explain this to you since Mister C must not have done a good job.

If you have any clientside code that must be run on the client, it must be included. cl_, sh_, and sv_ have nothing to do with sending it to the client. These are just to help the scripter to know which files are meant for which side. Just because you put cl_ in front of it does not mean anything.

Anything you want to be run clientside, you must put the AddCSLuaFile() inside a serverside script. if you put the clienside lua file call inside a clientside file, it will not be called/loaded unless it is included. Generally you will not be including any clientside files on the server’s end… ever. This is why generally you want to put in serverside code.

You also have no need to push any serverside code to the client. So if you are AddCSLuaFile’ing serverside files, you are making a mistake. Get rid of it.

He did do a good job, I just wanted to get things straight, because he explained it as an adult and child which sorta gave me the idea, and sorta confused me a tiny bit. He also showed how i can dynamically add files via their prefix and location (but my wildcards where bitching so I pulled up the evolve plugin loader, and it showed how I can referenece by using the prefix function instead of eg: cl_*.lua)

But Thanks for the clarification none the less.