robhol Posted August 8, 2009 Share Posted August 8, 2009 (edited) I've made a "little" guide that I think will prove helpful for a lot of people. Note: the guide is down for the time being. I'm not sure when it'll be back up, so stay tuned. Do NOT ask me for login details or nag me about the guide in any way. http://robhol.net/guide/basics The guide mentions the most important parts of scripting for MTA. Thanks to arc_ and 50p for proofreading and opinions. Edited March 31, 2010 by Guest Link to comment
DarkLink Posted August 8, 2009 Share Posted August 8, 2009 Thanks very much robhol ! Good info It will be easier for me now Thanks again for sharing this . Link to comment
Dark Dragon Posted August 8, 2009 Share Posted August 8, 2009 good job! i'll let you know if i find any maths errors... /me looks at NeonBlack Link to comment
x86 Posted August 8, 2009 Share Posted August 8, 2009 I've made a "little" guide that I think will prove helpful for a lot of people.http://robhol.net/guide/basics The guide mentions the most important parts of scripting for MTA. Thanks to arc_ and 50p for proofreading and opinions. Some links opens at the same tab/browser, add this argument in -> target="_blank" Link to comment
robhol Posted August 8, 2009 Author Share Posted August 8, 2009 I've made a "little" guide that I think will prove helpful for a lot of people.http://robhol.net/guide/basics The guide mentions the most important parts of scripting for MTA. Thanks to arc_ and 50p for proofreading and opinions. Some links opens at the same tab/browser, add this argument in -> target="_blank" That's actually done purposely - opening a link into a separate tab or window is something most browsers will let you do by clicking another button on your mouse, or holding down a key. This way people can open it wherever they want. Edit: I also updated the stylesheets a little. Link to comment
eAi Posted August 9, 2009 Share Posted August 9, 2009 Looks very good, a few points: Page 3 - For resources, I'd discuss how they run - how they're like programs that run independently and can communicate with events. - 'essentialle' should be 'essentially'. I'd argue it's not required too - map files are XML files. - I'd mention that using map files is more efficient (less data is sent to clients than with script functions). - I'd definitely highlight the importance of map files for use with the map editor, and allowing other resources (i.e. maps) to extend a resource without writing code. It's something a lot of people don't seem to get. Page 4: For server/client functions I'd also emphasise that it's best to write server-side code where possible - less risk of people hacking the code and easier to avoid getting out of sync. Page 6: You say coronas are technically markers - they're not really. MTA just munges checkpoints, markers and coronas into one system. In GTA they're three separate systems. Doesn't really matter though... Page 8: You somewhat gloss over the element tree, maybe this should be expanded in more depth with some pretty pictures and some examples of how an event (on say, a vehicle) would get triggered and which elements would see it. Event arguments - maybe make it clear that the arguments depends on the event type. Make it clear the names don't matter, just the order. Custom events should probably mention about using events as a way of making more specific events. A flag in CTF is the example I use on the wiki, where onMarkerHit becomes onFlagPickedUp if the marker was a flag marker, and the player was on the right team (etc). Page 11: Mention accounts and perhaps settings as a way of storing persistent data. Also mention that resources can save map files. I think it'd be useful for someone, whether part of this guide or not, not write a guide to how to create a new gamemode, properly handling map files etc (using getElementsByType etc), writing EDF and making it all work with the editor. Link to comment
robhol Posted August 9, 2009 Author Share Posted August 9, 2009 eAi, thanks for the input. I do wish, however, that you'd take it over PM instead of here. I updated chapters 3 and 4. I decided to ignore chapter 6 - from a scripter's point of view they are the same and work the same way. In chapter 8 I frankly don't see how it any of it makes a big difference nor is important enough to include, at least not in a basics guide. As for chapter 11, I've had enough bad experiences with account data that I wouldn't recommend it as a way of storing data. As far as settings go, I've never really used them. Link to comment
eAi Posted August 9, 2009 Share Posted August 9, 2009 Not sure why you'd rather I sent you that via PM, it not exactly secret information. I agree chapter 6 makes little difference either way, I was just saying that what you've said is wrong, even if it is unimportant and could be omitted entirely. I do think the element tree is important for people to understand, obviously it's your call! Maybe there could be an 'advanced' guide in the future covering things like the element tree, proper game mode creation etc... Definitely a good guide, I've added it to the main page of the wiki. Edit: Stickied. Link to comment
gordliamjack Posted August 18, 2009 Share Posted August 18, 2009 omg thank you i really needed it because i suck at scripting Link to comment
Kevin_Linden Posted September 7, 2009 Share Posted September 7, 2009 When i go to that site i get a pop up and it says the site has a virus. It also plays a alarm. Link to comment
norby89 Posted September 7, 2009 Share Posted September 7, 2009 When i go to that site i get a pop up and it says the site has a virus. It also plays a alarm. Warning: your site is infected with robhol! Link to comment
subenji99 Posted September 7, 2009 Share Posted September 7, 2009 I would second the idea of including a description of the element tree and how events work with it. A lot of novice scripters struggle with the concept. Link to comment
veliptor Posted October 14, 2009 Share Posted October 14, 2009 ummmmm..... i cant make a server it won't let me is says failed to start local server see console for details and it says on console couldent install mod Link to comment
Dominator[NL] Posted December 12, 2009 Share Posted December 12, 2009 Clear guide mate, its probably going to help me alot. Thanks! Link to comment
Gijs Posted January 21, 2010 Share Posted January 21, 2010 Thanks! this really helped me out Link to comment
Gijs Posted January 21, 2010 Share Posted January 21, 2010 Thanks! this really helped me out Link to comment
Comptons_Eazy_E Posted January 23, 2010 Share Posted January 23, 2010 This is a very helpful topic. Thanks. Link to comment
Comptons_Eazy_E Posted January 23, 2010 Share Posted January 23, 2010 This is a very helpful topic. Thanks. Link to comment
Dark Dragon Posted January 24, 2010 Share Posted January 24, 2010 i see robhol created lots of accounts here. Link to comment
Dark Dragon Posted January 24, 2010 Share Posted January 24, 2010 i see robhol created lots of accounts here. Link to comment
[MTA]revenngeR Posted January 30, 2010 Share Posted January 30, 2010 Could you make a guide about tables? Link to comment
robhol Posted January 30, 2010 Author Share Posted January 30, 2010 They are already mentioned - anything beyond what's mentioned currently is probably better covered in any general Lua tutorials. 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