Jump to content
    1. Welcome to GTAForums!

    1. GTANet.com

    1. GTA Online

      1. Los Santos Drug Wars
      2. Updates
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Red Dead Online

      1. Blood Money
      2. Frontier Pursuits
      3. Find Lobbies & Outlaws
      4. Help & Support
    3. Crews

    1. Grand Theft Auto Series

      1. Bugs*
      2. St. Andrews Cathedral
    2. GTA VI

    3. GTA V

      1. Guides & Strategies
      2. Help & Support
    4. GTA IV

      1. The Lost and Damned
      2. The Ballad of Gay Tony
      3. Guides & Strategies
      4. Help & Support
    5. GTA San Andreas

      1. Classic GTA SA
      2. Guides & Strategies
      3. Help & Support
    6. GTA Vice City

      1. Classic GTA VC
      2. Guides & Strategies
      3. Help & Support
    7. GTA III

      1. Classic GTA III
      2. Guides & Strategies
      3. Help & Support
    8. Portable Games

      1. GTA Chinatown Wars
      2. GTA Vice City Stories
      3. GTA Liberty City Stories
    9. Top-Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    1. Red Dead Redemption 2

      1. PC
      2. Help & Support
    2. Red Dead Redemption

    1. GTA Mods

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Red Dead Mods

      1. Documentation
    3. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    4. Featured Mods

      1. Design Your Own Mission
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Rockstar Games

    2. Rockstar Collectors

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Movies & TV
      5. Music
      6. Sports
      7. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. Announcements

    2. Support

    3. Suggestions

Tutorial to show SA coding


Grantus
 Share

Recommended Posts

Can any one give me a tutorial on how to code the main.SCM in SA, like give different weapons to your gang members instead of the crappy pistols they have

 

I already know how to make spawn points for vehicles and weapons but i want to change gang members weapons.

 

if you know where a tutorial is please post the link aswell

 

Thanx happy.gif

Edited by Grantus
Link to comment
Share on other sites

I have looked but there is non that go through the process enough bored.gif

Edited by Grantus
Link to comment
Share on other sites

The process is: imitate existing code. How did you accomplish the things you say you've accomplished? You did it how they did it before you. Same thing.
Link to comment
Share on other sites

 

I have looked but there is non that go through the process enough  bored.gif

Specified tuts are not exist.

But there exist mountains of exemple scripts here in the mission coding forum

Didn´t you see the topic:"give n' take mod"? sneaky2.gif

Link to comment
Share on other sites

Intriguing ... I wonder what your "Grove Mod" does then, if you have to ask this type of question ...

 

 

Plaka thinks Demarest was probably correct ... In other Topic/Mod Showrooom
Link to comment
Share on other sites

How to make a mission for n00bs who expect you to explain it in a single post cos they can't be bothered to read the long tutorials and want it put simpler.

 

By Alex "Y_Less" Cole

 

Note the ammusing annecdotes at the bottom smile.gif.

 

Open Mission Builder and either decompile your main.scm or use a provided text mission file. Add a number of OpCodes in a certain order to achieve the desired ingame effect. The OpCodes are detailed in opcodes.txt or at vc-db.webtools4you.net, there is an SA version. Properties are defined at the top of the file and missions at the bottom. The code still running while you are not in a mission is called MAIN and uses ££ to define jump addresses over the MISSION segments £ (except when referencing labels in MAIN when they too use ££), labels are defined by a ':' prefix and are one word. Code run at the games start mostly comes before the first create_thread line. That line is used to create a looping thread at a given label, this is most likely where your code will go. All loops must have a wait command, wait 0 is valid. Models must be loaded before use. Savegames are not compatible except when using Darkpact (appending to MAIN and using mission code to run threads and rewite code). The mission structure is documented in the MB readme. To run a mission you will need a sniffer thread to trigger it. Naming threads is advisable.

 

Float structure:

 

[\d]+\.[\d]+

 

If structure:

 

if (#args-1)

arg 0

agr 1

...

jf £[£]?[\w]+

 

Annecdotes:

 

The create thread lines are null delimited and may thus have up to 16 parameters (engine limited).

 

You can create your own OpCodes by hooking the pointer for 0124 using "setplayerhandlingresponsiveness -5035& 8524424&&" (note the MB o.22 syntax) to set an address according to the formula "param1*114h+7DBCB0h+68h". Then just save some ASM into 32bit ints in MB (signed, little endian, 8?? on - you will need to comment out all the variables in VICESCM.INI) to run your OpCode then admire in-game.

 

Further reading:

 

Manipulating game memory for fun and profit revisited - contains links to the original topic by CyQ.

Link, link - applications of mem hacking.

Darkpact - SA version.

 

Sorry, those tutorials are long to make it simple. But as you wanted it in a post, here it is. I had to skimp a bit on some areas but you should get the idea.

Link to comment
Share on other sites

How to make a mission for n00bs who expect you to explain it in a single post cos they can't be bothered to read the long tutorials and want it put simpler.

 

By Alex "Y_Less" Cole

 

Note the ammusing annecdotes at the bottom smile.gif.

 

Open Mission Builder and either decompile your main.scm or use a provided text mission file. Add a number of OpCodes in a certain order to achieve the desired ingame effect. The OpCodes are detailed in opcodes.txt or at vc-db.webtools4you.net, there is an SA version. Properties are defined at the top of the file and missions at the bottom. The code still running while you are not in a mission is called MAIN and uses ££ to define jump addresses over the MISSION segments £ (except when referencing labels in MAIN when they too use ££), labels are defined by a ':' prefix and are one word. Code run at the games start mostly comes before the first create_thread line. That line is used to create a looping thread at a given label, this is most likely where your code will go. All loops must have a wait command, wait 0 is valid. Models must be loaded before use. Savegames are not compatible except when using Darkpact (appending to MAIN and using mission code to run threads and rewite code). The mission structure is documented in the MB readme. To run a mission you will need a sniffer thread to trigger it. Naming threads is advisable.

 

Float structure:

 

[\d]+\.[\d]+

 

If structure:

 

if (#args-1)

arg 0

agr 1

...

jf £[£]?[\w]+

 

Annecdotes:

 

The create thread lines are null delimited and may thus have up to 16 parameters (engine limited).

 

You can create your own OpCodes by hooking the pointer for 0124 using "setplayerhandlingresponsiveness -5035& 8524424&&" (note the MB o.22 syntax) to set an address according to the formula "param1*114h+7DBCB0h+68h". Then just save some ASM into 32bit ints in MB (signed, little endian, 8?? on - you will need to comment out all the variables in VICESCM.INI) to run your OpCode then admire in-game.

 

Further reading:

 

Manipulating game memory for fun and profit revisited - contains links to the original topic by CyQ.

Link, link - applications of mem hacking.

Darkpact - SA version.

 

Sorry, those tutorials are long to make it simple. But as you wanted it in a post, here it is. I had to skimp a bit on some areas but you should get the idea.

Thanx that has actually helped me tounge.gif

Link to comment
Share on other sites

Im assuming then you can already program in perl and understand the nice regex expressions used tounge.gif.

 

And glad to hear it.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.