gtasearcher Posted July 2, 2009 Share Posted July 2, 2009 Use the opcodes! Search for them in opcode search There's no class for killing yet. For driving, use Car.DriveTo($car, $x, $y, $z) Link to comment Share on other sites More sharing options...
hetment Posted July 3, 2009 Share Posted July 3, 2009 OK but dude he opcode search don't shows exactly what opcodes we want....... anyways 'I will also try to understand more about scm coding ... Its kinda hard Link to comment Share on other sites More sharing options...
PatrickW Posted July 3, 2009 Share Posted July 3, 2009 Please keep general opcode discussions in the "mission Coding Discussion forum", not in tutorial topics. Link to comment Share on other sites More sharing options...
Deji Posted July 24, 2009 Share Posted July 24, 2009 (edited) I'm "nitpicking" here... repeatwait 0 msif 00E1: player 0 pressed_key 15then 08DA: remove_panel $MENU03E6: remove text boxjump @ENDenduntil 00E1: player 0 pressed_key 16 Even though I barely know what that means (I find most of the high-level constructs hard to get my mind around), I assume it's basically this... :BLKMRKT_DEAL2wait 0if80E1: not player 0 pressed_key 15else_jump @BLKMRKT_REMOVEPANELSANDPRECHECKif80E1: not player 0 pressed_key 16else_jump @BLKMRKT_DEAL208D7: [email protected] = panel [email protected] active_rowjump @BLKMRKT_DEALDRUGS To save threads, complication and time... I like to use (and teach people to use) this instead: :BLKMRKT_DEAL2wait 0// If player pressed key (Enter)if80E1: not player 0 pressed_key 15// Then jump to the remove panel thread.else_jump @BLKMRKT_REMOVEPANELSANDPRECHECK// Store the row that is currently selected.08D8: [email protected] = panel [email protected] selected_row// If selected the first row.if8039: not [email protected] == 0// Jump to the deal drugs thread.else_jump @BLKMRKT_DEALDRUGS// If selected the second row.if8039: not [email protected] == 1// Jump to the deal weapons thread.else_jump @BLKMRKT_DEALWEAPONS// Loop.jump @BLKMRKT_DEAL2 (I even commented my code, just for you! ) The selected_row opcode only activates once a player selects a row. Thus saving the "if player pressed NUM0 or w/e you're control is" loop (teehee, I used the word "thus"!). This difference is slight, but it highlights the difference between the two opcodes. One of them can be used to test if a player has pressed the row... And one can be used to see if the player highlighted the row. This is incredibly useful to me during the Black Market mod (it was actually the cause of me discovering these differences... saved my life)... I created a table in which you could press the left and right keys while highlighting an option to change the values of that option. Which was a lifesaver! Before, I had to create double the amount of fxt entries and have the player press a row (which was then highlighted ~y~) before they could change the values. Anyway... The point is, there is a difference between the 2 opcodes that I think people are missing out on... Big time! And I want people to know it. Instead of ending up like me when I was wondering why my table wasn't working the way I wanted Note to all of you that you have just had your first exclusive preview of the Black Market mod... And to get you excited, everyone who happens to be reading this (only a few of you) I can say this to... IT'S GONNA BE f*ckING GREAT!! Edited July 24, 2009 by Deji Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 24, 2009 Share Posted July 24, 2009 Deji, you have to keep in mind that this is a tutorial for beginners. If there is a difference between two opcodes and can be used both, doesn't mean that I have to explain that. The method I'm using is a good method, I've used it for every menu I made so far, including all the DYOM menu's. I'm just saying how you CAN do it, of course it doesn't mean that it's the only way. If they are more advanced, they don't need my tutorial, and they can do it themselves. Then they can go and try things, without using the tutorial. Just like you did. I keep it simple, only the basics and only one way to do it (most of the time). Just to keep it clear, so nobody will get confused. It's difficult enough without explaining every single opcode that can be used for something. About your way of commenting it, I just don't think that will make it more organized. And about the repeat-wait-until, that is in my opinion the best way to make it, so that's what I explain it in the tutorial. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
Deji Posted July 24, 2009 Share Posted July 24, 2009 What's wrong with the comments? And the point was that this is more simple than the other method as you don't have to script more wait's... I'm not saying you have to go into detail about the differences... I just think it's more simple to have that in the code than having to write extra stuff. But I guess if you reckon the other way is easier, that's fine too I just think this has to be mentioned somewhere as it lead me to nearly cancel a few of my mods xO Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 24, 2009 Share Posted July 24, 2009 What's wrong with the comments? There is nothing wrong with it, I just don't think it is more organized. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
Deji Posted July 24, 2009 Share Posted July 24, 2009 What's wrong with the comments? There is nothing wrong with it, I just don't think it is more organized. Than what? I'd like to know how my comments could be improved. What's an example of a good comment? Something more like this? 0000: NOP// Really pointless opcode.0000: NOP// In fact, it doesn't exist.0000:NOP Link to comment Share on other sites More sharing options...
Dutchy3010 Posted July 24, 2009 Share Posted July 24, 2009 Oh, lol, didn't read your post well. I thought you said that you wanted me to make my tutorials with that comments instead of a text. Didn't think that you actually commented a code for me. Aaah well, let's go back ontopic, lol. DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
d0mm2k8 Posted July 24, 2009 Share Posted July 24, 2009 Totally awesome tutorial Helps loads Link to comment Share on other sites More sharing options...
Sniputer Posted July 26, 2009 Share Posted July 26, 2009 (edited) Good tutorial, took me 1 hour to read / learn "Actors". But Sanny hit me up with an error when I wanted to compile the stripped code with a spawned actor... EDIT: problem solved Edited July 26, 2009 by Sniputer Link to comment Share on other sites More sharing options...
d0mm2k8 Posted July 27, 2009 Share Posted July 27, 2009 (edited) Hey, I've been coding for quite a while (thanks to the Dummies tut) and I have a request for a tutorial You know when you have a special actor go on mission with you (like Sweet) they follow you and get in your car and have the ability to swim ect. I just wondered if you could make a tut on how to code that into a mission please I used the opcode search, searched this forum, googled it and I couldn't find anything EDIT: After messing around with random code, I found out how to do it Edited August 1, 2009 by d0mm2k8 Link to comment Share on other sites More sharing options...
hetment Posted August 4, 2009 Share Posted August 4, 2009 HElp guys please!! See in MPACK discussion i founded create folder..,. I can understand we can create and rename the scr.scm but th other text.gxt file! How we create it !? Please help .. Tell me where to get all file for MPACK Link to comment Share on other sites More sharing options...
violentAZoom Posted August 4, 2009 Share Posted August 4, 2009 First of all, you can copy the american.gxt to it, then remove all entries and add your own for your MPACK, the .scm is just by compiling a main.scm, create a text document, then when you save it, it it as .dat and you should be set. Link to comment Share on other sites More sharing options...
goodmakers Posted August 23, 2009 Share Posted August 23, 2009 You are the best for making this tuttorial great have some cookie Link to comment Share on other sites More sharing options...
12jango Posted August 26, 2009 Share Posted August 26, 2009 Hey, still confused with cutscenes: - Camera.setposition (X, Y, Z, float, float, float) I thought those floats are the rotation aren't they? If so, how to use them? - Camera.pointat (X, Y, Z, mode) I saw you use opcode to make a camera point, then there was a mode 2, what's it mean? And there are some modes other than mode 2? - If you don't mind, would you please explain once more about making a simple cutscene (without any spawning actors and anims)? Thank you! Link to comment Share on other sites More sharing options...
Skaf_ Posted September 24, 2009 Share Posted September 24, 2009 okay check this i'm hella nubbycake at scripting but i'm gettin the basics down. and i got a question, i read through almost the whole thing of Dutchy's coding for dummies. . Went to coding for pros and i noticed the tut script there had a cleo directive in it. and i'm not to good in modding, but does that mean once you would finish the work, you could put it the cleo folder and have it work in the game after starting a new game? and have that file to select like the mpack.dat does, but be able to save to??? or would you have to place all your files from the mpackx folder somewhere in the san andreas folder for it to work... could it work ?. . sorry if my question is newb status lol. oh quick question, can anyone tell me how the hell i can make a text box of players talking to players not just M_PASS crap. like in a cutscene or somethin have a dude pull up in a car, have my character walk over to him, and have a conversation lmao. does anyone know how i can do this? Link to comment Share on other sites More sharing options...
JohnPro Posted November 5, 2009 Share Posted November 5, 2009 Why hasn't anyone said thank you. THANK YOU for your mega long mega complex tut. Link to comment Share on other sites More sharing options...
MG 097 Posted November 5, 2009 Share Posted November 5, 2009 Thank you... Link to comment Share on other sites More sharing options...
ananthuma Posted March 26, 2010 Share Posted March 26, 2010 thanks a lot Link to comment Share on other sites More sharing options...
ananthuma Posted March 26, 2010 Share Posted March 26, 2010 the script is not working in my sa it says "unable to load" pls help me dutchy3010 Link to comment Share on other sites More sharing options...
Dutchy3010 Posted March 26, 2010 Share Posted March 26, 2010 I'm sorry, which script do you mean? DYOM - Create, play, share! Link to comment Share on other sites More sharing options...
gta_sa_player123 Posted May 27, 2010 Share Posted May 27, 2010 (edited) you can teleport using sanny builder's coords manager by changing the coords and pressing the set button Edited May 29, 2010 by gta_sa_player123 Link to comment Share on other sites More sharing options...
Dingleman Posted August 1, 2010 Share Posted August 1, 2010 Permit me to correct a mistake made by the GTAForums staff.. Awesome tutorial.. $COOKIE = [email protected] = 99999999 $COOKIE *= [email protected] $ Dutchy3010 += $COOKIE Man I'm sad... Link to comment Share on other sites More sharing options...
coin-god Posted August 1, 2010 Share Posted August 1, 2010 Man, your code is wrong! You have to load the cookie first. lol Link to comment Share on other sites More sharing options...
Dingleman Posted August 1, 2010 Share Posted August 1, 2010 haha.. smartass Link to comment Share on other sites More sharing options...
Ashwin.Star Posted January 21, 2011 Share Posted January 21, 2011 The tutorial that you have given is the best tutorial that i have seen ever thanks for that tutorial, but, it was for gta san andreas and i want to learn about gta vice city if the opcode of both game are same & work same then please convert your small basic mission script (of san andreas ) to gta vice city if opcode are different then, can you please make a new tutorial for gta vice city ""if you can't then pls reply me so i will not wait for it" "& if you can then pls tell me where i will find it" I AM AN INDIAN ,AND NOT SO GOOD IN ENGLISH IF FEEL ANYWARE THAT I AM ORDERING YOU TO MAKE THAT TUTORIAL PLEASE FORGIVE ME BECAUSE I AM JUST REQUESTING ONLY T # @ /\/ K & 4 R {- @ !) ! /\/ G Link to comment Share on other sites More sharing options...
coin-god Posted January 21, 2011 Share Posted January 21, 2011 Its the same for VC, just that VC ahs a few diferent opcodes. But the structure is the same. But if you dont know english, you wont learn coding. Link to comment Share on other sites More sharing options...
Ashwin.Star Posted January 22, 2011 Share Posted January 22, 2011 But if you dont know english, you wont learn coding. i know english but i'am not perfect in it. what about converting of small mission script ? Link to comment Share on other sites More sharing options...
kmlwin.1996 Posted January 23, 2011 Share Posted January 23, 2011 023C: load_special_actor 'CAT' as 1 // models 290-299 models 290-299 > What does it mean? It means you can load special actors to 9 actors. All peds can be loaded by loading ide files. Example model.load(#MALE01) But special actors like OGLOC, Ceaser , Truth etc... must load with this. 023C: load_special_actor 'OGLOC' as 1 // models 290-299 Special actor loading has limit. You can only load 9 actors. ============== [email protected] Link to comment Share on other sites More sharing options...
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