Nov 8, 2009

How To Code In Gta: San Andreas - San Andreas Coding Tutorial

free web hosting
Open Discussion > MODERATED AREA > Tutorials

How To Code In Gta: San Andreas - San Andreas Coding Tutorial

-Sky-
Okay now I will teach you how to code main.scm - This is useful for making missions although we won't get into that today. Today we are just going to learn the basics...

The easiest thing to do is set spawn locations. These can be spawn locations of Cars, Weapons, Pickups and more...

As the easiest one is pickups, we will learn that first...


A pickup in San Andreas is an item that helps the player. So this can be health, armour or even adrenaline (Although as this was removed by Rockstar you can't spawn them. Yet...)

These are the tools you will need...

- A decent coordinate teller. I would suggest GTASA Control Center but you can use anything you want...

- Get A Good Mission Builder!!! You will need Barton Warterducks Mission Builder (Search for it in Google)


So now we have these tools and hopefully you know how to use your coordinates teller. Now we need to configure the Mission Builder to work properly...

After extracting the files for mission builder you will need to find a file called: SASCM.INI . When you do open it in a Notepad.

Now go down to the bottom and paste this...
CODE
0A4A=2,%1h% %2h%
0A4B=0,


Now you need to back up some GTA files... The files you will need to back up are...

main.scm
script.img
default.ide
peds.ide
vehicles.ide

Finally, copy main.scm and script.img to a new folder inside your mission builders installation folder. Lets call the new folder 'My Project 1'


Now we can start editing our script but first we need to decompile it...

Run SABuilder (The mission builder) and go to the corner of screen and click File > Open

Change the dropdown menu that says Text Document (*.txt) to All Files (*.*) then navigate to the folder you created ('My Project 1')

You will then see main.scm and script.img since you just copied them there...
Select main.scm and click ok

You then need to save the text file somewhere... Just click ok on the folder you copied the other files to..


Now the fiddly bit is over lets do some coding!


There are several boring things you need to know about a simple line of coding that I probably should teach you... So let's get to it...

Hold Ctrl + F on your keyboard to open the find window. Then type: BRIBE
Press enter and you should come to DEFINE OBJECT BRIBE but that isn't what we want. Search again to find the following line:

CODE
0213: $3345 = create_pickup #BRIBE type  15 at  2743.0  1316.0  8.0


Now to explain and change this code...

Copy the line and paste it onto a new line. Now we can edit this line...

CODE
0213:

This is an opcode. I think it describes what it does but im not too sure. I just know every item has a unique opcode...

CODE
$3345

This looks confusing but it is quite simple. It's just a name that Rockstar gave it. We can name it anything really as long as it still has $ in front of it and only contains letters and numbers. We shall name this MYBRIBE1

CODE
=create_pickup

This is just what the code does. It creates a pickup...

CODE
#BRIBE

This is what the object is... It's a Police Bribe...

CODE
type 15

This means that this is a Free object. if you change 15 to 1 then you will need to buy it...

CODE
at  2743.0  1316.0  8.0

X COORD | Y COORD | Z COORD
This is what you will have to change most... These are co-ordinates and these are the reason we needed a coordinate teller (GTASA Console)

So we need to get our co ordinates to choose where the pickup will be cause at the moment it is at the same place as the other one...

Run your game with your co ordinate teller running (GTASA Console) and find where you want to put a wanted star. Make it easy to remember as you are just testing. Let's say in the middle of Grove Street. Stand exactly where you want the Bribe to be...

Now alt+TAB or windows key out of San Andreas and go to your coordinate teller and click 'Read From GTASA' or 'Get Coordinates' or whatever it says... (To get them on GTASA console go to the Locations tab)

Now you'll need to copy and paste the answers...

So the original co ordinates were:

CODE
at  2743.0  1316.0  8.0

And this is what these co ordinates are...
CODE
at  X: 2743.0 Y: 1316.0  Z: 8.0


You will notice your coord teller also has these so paste each axis (XYZ) over the existing coordinates.

I usually delete all 0's at the very end of the coordinates besides from the last one as it saves space and isn't needed.

Now go to the very top of the code page to find a DEFINE MEMORY thing. There should be a number in the 4000's or something. You'll need to make this higher to compile your code...

Change it to about 50000 or over. Now compile by going to Run > Compile or hit F7.
It may go weird for a minute or so...
When it has finished go to where you copied you main.scm to and copy both the main.scm and script.img and paste it into you San Andreas\Data\Script directory and start a new game .

If this works you will be playing the game with no problems. Go to where you got the cootdinates from (Grove street if you did what I said...) and you will see your new pickup!

WELL DONE. You've made your first script!!!!

If the game crashes after a while of playing it you need to reduce the DEFINE MEMORY thing you changed. Make the number lower a bit or get more RAM and you should be sorted!

 

 

 


Comment/Reply (w/o sign-up)

Gravity17
What a coincidence hahaha I was looking for this a while back and couldn't find it. I always wanted to make missions in GTA: SA. Thanx for the tut and post a link when you made the mission maker tut.
This might be off topic but do you have by any chance SA MP? San Andreas Multiplayer?

Comment/Reply (w/o sign-up)

SKETchy
ok, when u said copy the bribe line and paste it into a new line... where do you want me to paste the new line?

Comment/Reply (w/o sign-up)

-Sky-
Which line are you using at the moment? I'm not sure. I didn't make this thread, a friend of mine made it using my Trappy account. wink.gif

Comment/Reply (w/o sign-up)

-Sky-
QUOTE (SKETchy @ Oct 5 2009, 09:39 PM) *
ok, when u said copy the bribe line and paste it into a new line... where do you want me to paste the new line?

Just post the line under the line you're copying from. That's where all spawning lines should be placed as it runs before anything else in the game.

Comment/Reply (w/o sign-up)



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Similar Topics

Keywords :

  1. Create Dynamic Html/php Pages Using Simple Vb.net Code
    Taking your application data, and creating a webpage for others to vie (1)
  2. Add Flashing Inbox To Invisionfree Forum
    Html code for invsiionfree!! (2)
    Do you find it annoying when you are on your invisionfree forum, and you get a new message, and it
    ends up taking you 5 minutes to notice? This code makes the inbox link flash bold red saying how
    many messages you have. In version 1 the word inbox stays the same, and doesnt change at all (for
    Example this is flashing: Inbox (2) In version 2 (the second code) the word inbox changes to
    messages (constantly, so that if you have none, it says messages (0) instead of inbox (0). It still
    flashes Red Put the following In the Header and Body Section (Admin Cp>>>Skinning ....
  3. [php] Clean Code Functions
    Clean up your html output from php scripts (5)
    There is another Topic about writing 'clean' HTML code posted elsewhere on the Forum.
    I'll edit this Topic and add the link so you can review it on your own, and there is no need for
    me to comment on it in this thread, but the purpose of this Topic is to introduce a pair of
    functions which can be used for making sure that the HTML output from my scripts is readable when a
    view-source is reviewed. Two handy functions are included here. They work together quite nicely,
    and I will start this Tutorial with a short summary of the reasons for their 'being....
  4. Nice Clean Php Layout Coding.
    Learn a nice neat way to code your layouts with php (7)
    There are basically two main ways to code your php. Method 1) Creating a php document with an html
    look. The you throw in include tags all over the place. Its unorganized, and you have lots of stray
    files hidden in folders and scattered in your base directory. Its difficult to organize, and you
    make mistakes easily. Example: This document would be called index.php Whatever
    Banner or something Some content here. Mostly along the lines of You might ask what
    the problem was? Well, those include tags tend to multiply, and so do all those unne....
  5. Do You Want To Use Php Code In Your Html Pages?
    Within two minutes you will! (9)
    Whilst searching around for help to setup cutenews blog I came across a way to use php in html pages
    - lo and behold it works! so I thought I'd share it with you all (Unfortunately I can't
    remember the site so I wrote this up a couple of minutes after I did it:) ). This method requires a
    web server with apache installed. So, luckily for us all this covers the whole of Trap17... even
    Qupis /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Just
    to make the point, this is in no way a difficult task and it doesn't require yo....
  6. Image Gallery Tutorial Using Hoverbox
    A php solution to coding the Hoverbox Image Gallery (15)
    As reported in another posting , there is an Image Gallery named Hoverbox from the Sonspring site
    which is a pretty cool display method using CSS to have Thumbnail pictures double their size by
    hovering over them. I liked the css included in the original Tutorial as found on the Sonspring
    site , but I knew there was more than one use for the Hoverbox and took it upon myself to explore
    the use of the Hoverbox on a site I webmaster. One thing that wasn't right was having to
    hardcode the image tags, so the first version I wrote used php to fill the Hoverbox by rea....
  7. Your First Autoit
    Learning To Code.. (7)
    Autoit is a simple, yet powerful programming language, it allowed the creation of the pangea
    desktops, and the Remote Pc Control with a cell.. You can learn it too. Here is the first of several
    lessons i will post inside of this topic. It is a 32 bit program, it doesnt work on windows 98, 95,
    and i dont think (THINK) Windows ME Step 1: Download and install the latest version of autoit from
    http://www.autoitscript.com i prefer that you use beta. Step 2: Right click somewhere on your
    desktop or my documents, and mouseover new and click Autoit V3 Script Step 3 (optiona....
  8. Php Spy Code
    Spy on your site! (21)
    Code Spy Code Description Anyone who comes to ur forum's IP Adress, Site they came From,
    Their Browser and the time they came will get saved in a place that only the admin knows the
    location of... V.2 More features coming up in V.2!!! POst suggestions/problems... Preview:-
    http://s15.invisionfree.com/Spy/index.php ? REFRESH THE PAGE, AND GO HERE:-
    http://h1.ripway.com/programming/spy%20code/spy.html ^^^^^^^That shows all the IP's, Browsers,
    Time, site and stuff....^^^^^^^^ Code First of all, you'll need to host the files.... I
    suggest you make....
  9. Css Based Photo Gallery Code
    Fluid design for layout (3)
    Fluid Design Photo Gallery There are quite a few Topics here on the Trap17 Forum about how to
    set-up and use Photo Galleries and about the link code for getting from a Thumbnail Image to a full
    size Image and all that stuff, so I would like to take this "Photo Gallery" concept one step further
    without covering what others have already supplied instruction for. Usually, when there is a
    solution posted here for the code on "how-to-do-this", there are tables involved and the Links are
    placed inside Table cells. Tables are not neccesarilly a bad thing, but they were n....
  10. Handy Javascript Code Snips
    Ready to Apply in your webpage (5)
    /tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> Some common things to
    implement in our webpage very frequently are as follows. How to implement all these I am going to
    tell you in this tutorial. Add To Favorite Set As Homepage Go To Top Of Page No Right Click
    Print Page Adding Current Date Adding Current Time Pop-Up Page Creation Closing Window
    Copyright Notice Updation 01. Add To Favorite Someone may be interested in the content of your
    page. Offer him/her to add the page in his/her favorite menu. To do this you have ....
  11. Transparent Scrollbars
    Coding Transparent Scrollbars (2)
    Why woud someone want a Transparent scrollbars you ask? Well fist of they do not cover too much of
    the image like the normal scrollbars. You can use transparent scrollbars for different kinds of web
    layouts such as popups, iframes, or scrolling div layers. For iframes, make sure you've inserted
    a background image for the table cell containing the iframe. You do not need to do that for
    scrolling div layers. Although, you cannot make the main scrollbar transparent unless you make it
    appear that way by selecting the same color for everything. After you code the scroll....
  12. Php Installed Modules Dynamic Reference Tool
    An effective tool for coding in PHP (4)
    PHP Installed Modules Dynamic Reference Tool A dynamic tool for referencing PHP modules and
    their associated routines, which are installed on your web-server. **Note: Uses only 2 functions
    built-in to PHPs core and should be easy to convert to a later version of PHP. This current version
    uses PHP4. Example: PHP Installed Modules Dynamic Reference Tool Abstract : As a PHP
    Developer, it is nice to know what functionality is available to you, and what you would have to
    implement yourself. Some of this functionality is provided for you by the PHP core,....
  13. 'make' A Virus To Test Your Norton Antivirus
    Not a harmful code (0)
    This code is to simply check if your Norton Antivirus is working probably. Not sure if it will work
    on other AVs. The following code is provided by EICAR. QUOTE
    X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!SH+H* Copy the content from the
    code into Notepad and save it as 'eicar.com' If your Norton AV is working probably a pop up
    of a Virus Alert should pop up and removed the virus immidiately. ....
  14. How To Put A Phpbb Login Box On Your Main Site.
    Code and .php included!!! (19)
    I have included my coded file with this... Ok here is the code. CODE // //Create login area,
    replace the phpBB2 in /phpBB2/login.php with your forum's //directory //   Prank Place
    Forum Index     Please enter your username and password to log in.        
                  Username:                   Password:      
                Log me on automatically each visit:                    
    I forgot my password         You can test this out on my....

    1. Looking for How, To, Code, In, Gta:, San, Andreas

Searching Video's for How, To, Code, In, Gta:, San, Andreas
See Also,
advertisement


How To Code In Gta: San Andreas - San Andreas Coding Tutorial

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com