Roderen Posted July 25, 2021 Share Posted July 25, 2021 Should I write server and client parts in separate files or all in one? Or how is it convenient for me? Link to comment
Moderators IIYAMA Posted July 25, 2021 Moderators Share Posted July 25, 2021 44 minutes ago, Roderen said: Should I write server and client parts in separate files or all in one? You should only combine them when for example they contain utility functions, like: https://wiki.multitheftauto.com/wiki/CheckPassiveTimer When setting the file to shared, it will make a file copy for the server and a copy for every player/client. <script src="test.lua" type="shared" /> Serverside code runs on the server. > MTA Server.exe Clientside code runs on every player individuality. > MTA San Andreas.exe (There are as much clientsides as there are players > variables are not shared) Running code on the wrong application, doesn't sounds like a good idea to me. Serverside shouldn't draw UI. Clientside shouldn't kick/ban players. > With other words: A player client(MTA San Andreas.exe) shouldn't be able to ban another player, because the server(MTA Server.exe) is the only application that is able to ban a player. Link to comment
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