Post: [TUTORIAL] Start your own script from the main.sco Script[SINGLE PLAYER]
06-12-2012, 11:23 AM #1
slim355
You talkin to me?
(adsbygoogle = window.adsbygoogle || []).push({}); EDIT: I compiled my code, and realised there was no loop to keep the script alive. It was just ending almost instantly.

Anyway I found some great tutorials.

You must login or register to view this content.

You must login or register to view this content.
(adsbygoogle = window.adsbygoogle || []).push({});

The following 3 users say thank you to slim355 for this useful post:

DreamKidzVa, YooYoOoN, ZerOtObey+RM
06-12-2012, 01:15 PM #2
YooYoOoN
Do a barrel roll!
Originally posted by PR1VATEJ0KER View Post
For all the people eager to learn.

TOOLS
You must login or register to view this content. To access our update.img
You must login or register to view this content. To edit Uncompressed compile scripts
You must login or register to view this content. To properly compile C for Ps3
You must login or register to view this content. We will write our C files here
You must login or register to view this content.
SCRIPTS
You must login or register to view this content. This is the script we will try to run.

Get the main.sco
First, you must retrieve the script.img. Found here(on your PS3): hdd/game/BLXS#####/USRDIR
Use OpenIV to retrieve the main.sco

Create the HOOK
We need OpCode that will launch our script.

How to create this OpCode?
Launch Notepad++, lets write our hook in C

    #include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
#include "functions.c"

void main(void)
{
REQUEST_SCRIPT("1_vehiclespawner");
while (!HAS_SCRIPT_LOADED("1_vehiclespawner"))
{
WAIT(0);
}
START_NEW_SCRIPT("1_vehiclespawner", 1024);
MARK_SCRIPT_AS_NO_LONGER_NEEDED("1_vehiclespawner");
}


Save that file as "myhook.c"
Now Open command prompt, and compile it like this.

    C:\PathToFolder\scocl_old.exe 0x7DD1E61C "C:\PathToFolder\myhook.c" "C:\PathToFolder\myhookcompiled.sco"


Editing your Hook to work in main script OpCode

  • Open the myhookcompiled.sco in ScoToolBox, make sure to select OLD NATIVES and Basic Editor.
  • Everywhere you see the word Label## insert 9999 before the number.
  • So, Label24 becomes Label999924


Now, insert
    :Label999900

@ the very start of the file (replace the FNBEGIN)
Keep this code open


Inserting your hook into main script OpCode
Open the main.sco in another instance of ScoToolBox, make sure to select OLD NATIVES and Basic Editor.
Copy and paste the edited code from myhookcompiled.sco onto the end of the main.sco

Now, to call your hook, insert
    Call @Label999900

Where-ever you would like it to be called. (Try the second line, after the FNBEGIN)

Save your new main.sco
It will be saved in a decoded format, so make sure to re-open it with ScoToolBox and Process it again(which will encode it)

Almost Done

  1. Place your new edited encoded main.sco & your 1_vehiclespawner.sco into your update.img
  2. Place that in the relative folder on your ps3
  3. Boot up
  4. ?????
  5. Profit


Don't share out your edited patches, point them to a tutorial.
Its better to learn and understand than run around 1337 like a child of millionaires, oblivious to hard work


is this the same for multiplayer?
i cant find the gta.exe anywhere. can you link me.

EDIT: i found it. You must login or register to view this content.
06-12-2012, 01:19 PM #3
DreamKidzVa
OFWGKTADGAFLLBBLSBFBN
Originally posted by PR1VATEJ0KER View Post
For all the people eager to learn.

TOOLS
You must login or register to view this content. To access our update.img
You must login or register to view this content. To edit Uncompressed compile scripts
You must login or register to view this content. To properly compile C for Ps3
You must login or register to view this content. We will write our C files here
You must login or register to view this content.
SCRIPTS
You must login or register to view this content. This is the script we will try to run.

Get the main.sco
First, you must retrieve the script.img. Found here(on your PS3): hdd/game/BLXS#####/USRDIR
Use OpenIV to retrieve the main.sco

Create the HOOK
We need OpCode that will launch our script.

How to create this OpCode?
Launch Notepad++, lets write our hook in C

    #include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
#include "functions.c"

void main(void)
{
REQUEST_SCRIPT("1_vehiclespawner");
while (!HAS_SCRIPT_LOADED("1_vehiclespawner"))
{
WAIT(0);
}
START_NEW_SCRIPT("1_vehiclespawner", 1024);
MARK_SCRIPT_AS_NO_LONGER_NEEDED("1_vehiclespawner");
}


Save that file as "myhook.c"
Now Open command prompt, and compile it like this.

    C:\PathToFolder\scocl_old.exe 0x7DD1E61C "C:\PathToFolder\myhook.c" "C:\PathToFolder\myhookcompiled.sco"


Editing your Hook to work in main script OpCode

  • Open the myhookcompiled.sco in ScoToolBox, make sure to select OLD NATIVES and Basic Editor.
  • Everywhere you see the word Label## insert 9999 before the number.
  • So, Label24 becomes Label999924


Now, insert
    :Label999900

@ the very start of the file (replace the FNBEGIN)
Keep this code open


Inserting your hook into main script OpCode
Open the main.sco in another instance of ScoToolBox, make sure to select OLD NATIVES and Basic Editor.
Copy and paste the edited code from myhookcompiled.sco onto the end of the main.sco

Now, to call your hook, insert
    Call @Label999900

Where-ever you would like it to be called. (Try the second line, after the FNBEGIN)

Save your new main.sco
It will be saved in a decoded format, so make sure to re-open it with ScoToolBox and Process it again(which will encode it)

Almost Done

  1. Place your new edited encoded main.sco & your 1_vehiclespawner.sco into your update.img
  2. Place that in the relative folder on your ps3
  3. Boot up
  4. ?????
  5. Profit


Don't share out your edited patches, point them to a tutorial.
Its better to learn and understand than run around 1337 like a child of millionaires, oblivious to hard work



So this means I can edit car handling correct? I've always wanted to edit so I can drift smoother.
06-12-2012, 01:21 PM #4
can you tell me why i get this error when i try to install openiv missing d3dx9_33.dll
06-12-2012, 02:02 PM #5
maps4890
ア丂刀 ︻デ═一
Originally posted by DreamKidzVa View Post
So this means I can edit car handling correct? I've always wanted to edit so I can drift smoother.


you can but thats in the common.rpf, and as far as i know you can't edit it with out getting infinite loop. Although if this new method allows you to get past the loop it may be possible? Joker..? lol
06-12-2012, 03:54 PM #6
can someone add mods to this for online give people money hack
06-12-2012, 07:58 PM #7
Originally posted by DreamKidzVa View Post
So this means I can edit car handling correct? I've always wanted to edit so I can drift smoother.


Originally posted by maps4890 View Post
you can but thats in the common.rpf, and as far as i know you can't edit it with out getting infinite loop. Although if this new method allows you to get past the loop it may be possible? Joker..? lol



As for the Handling.dat within the common.rpf. Bypass for the Xbox is to keep the handling file the same exact size even after editing it with no exceptions. This is still working as I speak. Hopefully, will imply for PS3 format. Will test shortly...
06-13-2012, 03:16 PM #8
can someone help me get openiv to work says d3dx9_33.dll is missing
06-15-2012, 03:41 AM #9
Masta-blasta117
»»───Knee───►
i keep getting

varargs functions are not allowed => compiler: (llvm) unrecognized 'call' " %0 = call i32 (...)* @NETWORK_GET_GAME_MODE() nounwind, !dbg !37"

i dont know what im doing wrong? anyone got the same problem?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo