Gamemode files

Hey, you know the files in a gamemode? cl_init, shared, and init? And then theres those other ones, like AddEntities.lua from DarkRP. What are those extra files, clientside, serverside, or shared? Does the coder choose? If so, how?

The coder choses. You should indicate if they are shared, clientside or serverside by adding a prefix (cl_, sh_, etc).

If you include a file in cl_init.lua (or in a file that is included in cl_init.lua), it will be clientsided.

If you include a file in init.lua (or in a file that is included in init.lua), it will be serversided.

If you do both, it will be shared.

Thank you so much :smiley: