IMG

 
IMG
IMG   IMG
  Welcome to GTAForums! Be sure to check out the Grand Theft Auto V Forum.

You are not registered! (If you are, click here to login) Registering is fast, free and easy and allows you to instantly reply to any topic on GTAForums.
Why wait? Click here to register your own unique username and become part of the ever-growing community!


( Log In | Register | Revalidate Validation E-mail )
Quick Log-In:
  IMG
       
>
Forum Rules Attention:

This is for the discussion and releasing of tutorials for modifying GTA. Anything that isn't a tutorial will be deleted without notification.

GTAGarage.com
free mod hosting from GTANet, simply login with your GTAForums account details

GTAModding.com
GTANet's modding wiki

GTA Modding Chatroom
provided by irc.gtanet.com (Don't have an IRC client? Click here)


Pages: (4) 1 [2] 3 4   ( Go to first unread post ) Reply to this topicStart new topicStart Poll

 Mission Coding for Dummies and Pro's!

 Reaction Thread
 
KornEL[HUN]  
Posted: Tuesday, Jun 23 2009, 17:02
Quote Post


a good txd editor
Group Icon
Group: Members
Joined: Jun 21, 2009

hg.gif

XXXXX



can u write me the correct code?

plz do it for me!
PM
  Top
 

 
jemahuk1  
Posted: Saturday, Jun 27 2009, 12:32
Quote Post


Player Hater
Group Icon
Group: Members
Joined: Jun 22, 2009

XXXXX



023C: load_special_actor 'CAT' as 1 // models 290-299

models 290-299 > What does it mean?
PM
  Top
 

 
Dutchy3010  
Posted: Saturday, Jun 27 2009, 13:32
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




Everything behind // is a comment, that means that it won't be read. It's just for the scripter.

Every ped has it's own "slot". Every slot has a number. The special actor slots are 290-299.

PS: please don't reply in the other topic.
Users WebsitePMMSNPlayStation Network
  Top
 

 
KornEL[HUN]  
Posted: Sunday, Jun 28 2009, 12:12
Quote Post


a good txd editor
Group Icon
Group: Members
Joined: Jun 21, 2009

hg.gif

XXXXX



dutchy can u make a save pickup at X 2335.42 Y -1141.08 Z 1053.75?

P.S. it needs to a mod plz help me and srry for my bad english=] turn.gif
PM
  Top
 

 
Dutchy3010  
Posted: Sunday, Jun 28 2009, 13:49
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




In what interior is it supposed to be?
Users WebsitePMMSNPlayStation Network
  Top
 

 
KornEL[HUN]  
Posted: Sunday, Jun 28 2009, 19:40
Quote Post


a good txd editor
Group Icon
Group: Members
Joined: Jun 21, 2009

hg.gif

XXXXX



i have completed it 5 minutes ago and i'll upload it now. thank you for the help and srry for my bad english=]

(and its the unused safehouse interior=D) tounge.gif
PM
  Top
 

 
KornEL[HUN]  
Posted: Sunday, Jun 28 2009, 19:46
Quote Post


a good txd editor
Group Icon
Group: Members
Joined: Jun 21, 2009

hg.gif

XXXXX



PM
  Top
 

 
hetment  
Posted: Thursday, Jul 2 2009, 16:04
Quote Post


GTA 4 and gta san andreas. the best gta games ever!
Group Icon
Group: Members
Joined: May 3, 2009

ia.gif

XXXXX



Hey dutchy nice tutorial can you give me codes to make actor drive cars or heli??? because i can't find in tut... Please give smile.gif
Users WebsitePMXbox Live
  Top
 

 
gtasearcher  
Posted: Thursday, Jul 2 2009, 16:48
Quote Post


No sh*t.
Group Icon
Group: Members
Joined: Aug 26, 2008

ro.gif

XXXXX



QUOTE (hetment @ Jul 2 2009, 19:04)
Hey dutchy nice tutorial can you give me codes to make actor drive cars or heli??? because i can't find in tut... Please give smile.gif

Use opcode search.

Get into Sanny Builder, and press CTRL+ALT+2.
Users WebsitePMMSNYahoo
  Top
 

 
hetment  
Posted: Thursday, Jul 2 2009, 17:15
Quote Post


GTA 4 and gta san andreas. the best gta games ever!
Group Icon
Group: Members
Joined: May 3, 2009

ia.gif

XXXXX



i mean like how to write it.... like kill_ actor....

I want how to type like this and get done
Users WebsitePMXbox Live
  Top
 

 
gtasearcher  
Posted: Thursday, Jul 2 2009, 17:20
Quote Post


No sh*t.
Group Icon
Group: Members
Joined: Aug 26, 2008

ro.gif

XXXXX



Use the opcodes! Search for them in opcode search mad.gif There's no class for killing yet. For driving, use
CODE
Car.DriveTo($car, $x, $y, $z)
Users WebsitePMMSNYahoo
  Top
 

 
hetment  
Posted: Friday, Jul 3 2009, 06:49
Quote Post


GTA 4 and gta san andreas. the best gta games ever!
Group Icon
Group: Members
Joined: May 3, 2009

ia.gif

XXXXX



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
Users WebsitePMXbox Live
  Top
 

 
PatrickW  
Posted: Friday, Jul 3 2009, 08:51
Quote Post


GTA Juggernaut
Group Icon
Group: Moderators
Joined: Jan 7, 2004

nl.gif

Member Award




Please keep general opcode discussions in the "mission Coding Discussion forum", not in tutorial topics.
Users WebsitePM
  Top
 

 
Deji  
Posted: Friday, Jul 24 2009, 01:13
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



I'm "nitpicking" here...

CODE
repeat
wait  0 ms
if 00E1:   player 0 pressed_key 15
then
              08DA: remove_panel $MENU
03E6: remove text box
jump @END
end
until 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...

CODE
:BLKMRKT_DEAL2
wait 0
if
80E1:   not player 0 pressed_key 15
else_jump @BLKMRKT_REMOVEPANELSANDPRECHECK
if
80E1:   not player 0 pressed_key 16
else_jump @BLKMRKT_DEAL2
08D7: 5@ = panel 0@ active_row
jump @BLKMRKT_DEALDRUGS


To save threads, complication and time... I like to use (and teach people to use) this instead:

CODE
:BLKMRKT_DEAL2
wait 0
// If player pressed key (Enter)
if
80E1:   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: 5@ = panel 0@ selected_row
// If selected the first row.
if
8039:   not  5@ == 0
// Jump to the deal drugs thread.
else_jump @BLKMRKT_DEALDRUGS
// If selected the second row.
if
8039:   not  5@ == 1
// Jump to the deal weapons thread.
else_jump @BLKMRKT_DEALWEAPONS
// Loop.
jump @BLKMRKT_DEAL2

(I even commented my code, just for you! tounge2.gif)

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 smile.gif


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!! tounge2.gif

This post has been edited by Deji on Friday, Jul 24 2009, 01:30
Users WebsitePM
  Top
 

 
Dutchy3010  
Posted: Friday, Jul 24 2009, 01:48
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




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. wink.gif 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.
Users WebsitePMMSNPlayStation Network
  Top
 

 
Deji  
Posted: Friday, Jul 24 2009, 01:56
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



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 smile.gif I just think this has to be mentioned somewhere as it lead me to nearly cancel a few of my mods xO
Users WebsitePM
  Top
 

 
Dutchy3010  
Posted: Friday, Jul 24 2009, 01:59
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




QUOTE (Deji @ Jul 24 2009, 03:56)
What's wrong with the comments?

There is nothing wrong with it, I just don't think it is more organized. tounge.gif
Users WebsitePMMSNPlayStation Network
  Top
 

 
Deji  
Posted: Friday, Jul 24 2009, 02:02
Quote Post


Coding like a Rockstar!
Group Icon
Group: Members
Joined: Dec 24, 2007

ja.gif

XXXXX



QUOTE (Dutchy3010 @ Jul 24 2009, 01:59)
QUOTE (Deji @ Jul 24 2009, 03:56)
What's wrong with the comments?

There is nothing wrong with it, I just don't think it is more organized. tounge.gif

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?

CODE
0000: NOP

// Really pointless opcode.

0000: NOP

// In fact, it doesn't exist.

0000:NOP
Users WebsitePM
  Top
 

 
Dutchy3010  
Posted: Friday, Jul 24 2009, 02:10
Quote Post


Female SCM coder!
Group Icon
Group: Moderators
Joined: Jul 30, 2006

nl.gif

Member Award




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. tounge.gif Didn't think that you actually commented a code for me. lol.gif Aaah well, let's go back ontopic, lol.
Users WebsitePMMSNPlayStation Network
  Top
 

 
d0mm2k8  
Posted: Friday, Jul 24 2009, 21:59
Quote Post


ad infinitum
Group Icon
Group: Leone Family Mafia
Joined: Jan 6, 2009

sd.gif

XXXXX



Totally awesome tutorial biggrin.gif Helps loads icon14.gif
PMMSNXbox LivePlayStation Network
  Top
 

 

0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)

0 Members:

Pages: (4) 1 [2] 3 4 

Topic Options Reply to this topicStart new topicStart Poll
Search topic for posted by (exact match)



 
IMG IMG