Guest Posted February 19, 2008 Share Posted February 19, 2008 Hello, I wanted to start scripting for MTA:SA, but I have some questions first: 1) The code looks similar to C++, is it the same, because i see some scripts using "end" instead of "}". 2) What is the difference between server-side and client-side scripting? 3) Is it possible to make a script that you can use on someone else's server? 4) Can I make a script and then run MTA to use it without owning a server> (similar t question 3) That's about it for now. Thanks for any help in advance, Stephen Link to comment
Ace_Gambit Posted February 19, 2008 Share Posted February 19, 2008 Hello, I wanted to start scripting for MTA:SA, but I have some questions first: 1) The code looks similar to C++, is it the same, because i see some scripts using "end" instead of "}". 2) What is the difference between server-side and client-side scripting? 3) Is it possible to make a script that you can use on someone else's server? 4) Can I make a script and then run MTA to use it without owning a server> (similar t question 3) That's about it for now. Thanks for any help in advance, Stephen 1) No, lua is not the same as C++. It does share common keywords and control structure like C++ has, but the syntax is different in a lot of ways. See here for more info: http://lua-users.org/wiki/TutorialDirectory. 2) Well, client-sided scripts run on the clients’ computer while server-sided scripts run solely on the remote server. It’s pretty much like server/client-side programming for the web. You code programming logic on the server-side and front-end functionality on the client-side. 3) Yes, you can redistribute your scripts. 4) Yes, see 3 Link to comment
szlend Posted February 19, 2008 Share Posted February 19, 2008 1) I wouldn't say Lua's syntax is very similar to C++. Lua: something = 1 if something == 1 then doSomething() else doSomethingElse() end C++ int something = 1; if (something == 1) { doSomething(); } else { doSomethingElse(); } 2) Server-side scripts are executed on the server while client-side scripts are downloaded for the client and executed locally. Some functions like GUI stuff can be used client-side only. 3) You can use any script on any server as long as you have admin access to it. 4) I'm not completely sure what you mean but you can't execute a script if you don't have admin access at the server. Edit: Dang, Ace_Gambit was faster ;P Link to comment
Guest Posted February 20, 2008 Share Posted February 20, 2008 Thank you very much guys...That's just the answer I was looking for.... STephengp Link to comment
Guest Posted February 25, 2008 Share Posted February 25, 2008 Oh, and just another question.... Do I have to script in LUA, will C++ code work also??? If so, how can I? Thanks, Stephen Link to comment
Ace_Gambit Posted February 25, 2008 Share Posted February 25, 2008 You will have to script in lua. 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