Konnza
Mk5 VXR
What tools you will need:
- Scocl from:GTAForums.com -> [GTA IV|EFLC|REL] Scocl
- SCOToolbox from: GTAForums.com -> [IV/EFLC|REL] SCO ToolBox
- openiv from:OpenIV – RAGE Research project
or just:
- Files pack.rar from:download
- Offline Trainer Source Code Pack: Get it now!
CREDITS FOR FILES PACK: cathering , PUN1SHM3NT , alexander blade , open iv team , sco toolbox flitskikker and the guy who developed rar program I used..
- Latest trainer Src code: credits EvilB for helping and above ^ and Skorpro for gta2 overhead cam Download
(does not contain GTAIV.EXE therefore you will need to find it somewhere ie: your game directory and place it in Scotoolbox folder / openiv folder)
- A Code Editor: DevC++ / Text editor or something that can edit text for programming
What are they:
- Scocl Is a source code compiler for GTA IV/ EFLC that compiles C++ code into sco format similar to R*'s
- SCOToolbox is designed for decoding, encoding and low level editing of SCO files.
- Openiv A tool for opening R* compressed img / rpf's to allow editing (kinda like zip files)
- File pack: A pack of files collected that will help you on your journey (more info below)
- Code editor: A tool to edit C++ code
What I am trying to do:
I hope to teach all that are interested in developing there own script mods so they can share with the community. I will go threw the entire process from start to end and hopefully it will help you to do the same or better.
Questions:
Here I will add questions and the answers to them as I receive them because im sure there will be some..
Process In Steps:
Step 1: Installing files and setup basically Files pack.rar has all you need in it so use a Rar extraction pogrom like winrar. Once files are extracted you should have folders like: (without it looking like a mac)
Start by installing GTAIVModdingTools\setup.msi
Install ScoCompiler (SCOCL) by Placing it in C:\ eg: C:\ScoCompiler\ScoCompiler\ once finished
install SCOToolBox by placing it on desktop or anywhere
and google DevC++ and download and install it or use Notepad
For this tutorial I will declare Myscript.c as your script..
Step2: Go to C:\ScoCompiler\ScoCompiler\ open up C:\ScoCompiler\ScoCompiler\files.txt and put in the location of your script..
eg C:\ScoCompiler\ScoCompiler\Sources\Myscript.c ..
what this does it tells "compile.bat" where to locate your script to compile.. it will compile and place the name you set in files.txt in C:\ScoCompiler\ScoCompiler\Output\ folder in "SCO" file format
Step3: Use your script editor and open C:\ScoCompiler\ScoCompiler\Sources\Stripped\main.c
this is the "superman" script (from Scocl) witch gives you god mode etc..( I use this for my "base" in all testing )
Make any changes that you want and then save your script in C:\ScoCompiler\ScoCompiler\Sources\ as what ever name you set in "files.txt" eg: Myscript.c
and now select "compile.bat" it will open a Command window and run the compiler as long as your script name matches the one in "Files.txt"
If all goes will it will say finished and you can simply close this window.
If all goes wrong it will tell you the reason the compiler couldn't work and usually a line in your script where its at fault..
So once your all done with this you should see your "sco" file in C:\ScoCompiler\ScoCompiler\Output\ "Myscript.c"
Step4: Now that you have a compiled Myscript.sco from Myscript.c there is a bit more to be done.. Since AlexanderBlade the Author for Scocl wrote his program to compile .sco with New natives ver 1.7.0 only and our game consoles with Gtaiv only function with scripts with natives from 1.4.0 we need to convert our sco to an older format because if we don't our new script wont work…
In order to convert we need to use SCOToolBox.exe so locate your scotoolbox folder and select SCOtoolbox.exe and open it.
Select "open" (step1)
ENSURE natives mode is set to "NEW" (step2)
Select "open code editor" (step3)
Now you have this window:
as you can see the steps I will make it more clear:
S1: you MUST convert new natives to old
S2: Save your sco to eg: Sixaxistutorial.sco or loadthis.sco make sure its saved Encoded
S3: Double check for any natives that were not changed.. select magnifying glass and search for "callnatve 0x
S4: If found …like in the example you have "CallNative 0x234de45ff" you need to do now is google that hash value and find what it is in WORDS what exactly that native is eg 0x234de45ff = SOME_COOL_FUNCTION
copy the word and replace the hex value with it. then save file as encoded and repeat till all is replaced.
Step5: Grab a fresh "script.img" from your backup gtaiv game and place it somewhere you can get to eg desktop now open OpenIV by going to START>ALL PROGRAMS>GTA IV MODING TOOLS> OpenIV and select it…
then go to file>open select script.img and then select open
It will then ask you "open an archive in the editing mode?" select yes
Find sixaxistutorial.sco and delete it from your original script.img
take your sixaxistutorial.sco and drag and drop it in the window and check to see if it is there. once finished select File>rebuild and completely rebuild the script.img
once done that place in USBHDD/GAMES/BLUSXXXX/PS3_GAME/USRDIR/common/data/
NOW TEST!… thats it some work some don't but if it wont work its usually your C script
Note: if your on PC/XBOX360 the examples in the files pack.... eg "modscript.c"will work online Not sure if they go in Network_script.img im sure someone will figure it out.
By: Alex of PSX-Scene
NEW: Here is one of my latest scripts ready to go , Try it yourself.. I challenge anyone to try to compile it / change it / adjust it / make it better
- Scocl from:GTAForums.com -> [GTA IV|EFLC|REL] Scocl
- SCOToolbox from: GTAForums.com -> [IV/EFLC|REL] SCO ToolBox
- openiv from:OpenIV – RAGE Research project
or just:
- Files pack.rar from:download
- Offline Trainer Source Code Pack: Get it now!
CREDITS FOR FILES PACK: cathering , PUN1SHM3NT , alexander blade , open iv team , sco toolbox flitskikker and the guy who developed rar program I used..
- Latest trainer Src code: credits EvilB for helping and above ^ and Skorpro for gta2 overhead cam Download
(does not contain GTAIV.EXE therefore you will need to find it somewhere ie: your game directory and place it in Scotoolbox folder / openiv folder)
- A Code Editor: DevC++ / Text editor or something that can edit text for programming
What are they:
- Scocl Is a source code compiler for GTA IV/ EFLC that compiles C++ code into sco format similar to R*'s
- SCOToolbox is designed for decoding, encoding and low level editing of SCO files.
- Openiv A tool for opening R* compressed img / rpf's to allow editing (kinda like zip files)
- File pack: A pack of files collected that will help you on your journey (more info below)
- Code editor: A tool to edit C++ code
What I am trying to do:
I hope to teach all that are interested in developing there own script mods so they can share with the community. I will go threw the entire process from start to end and hopefully it will help you to do the same or better.
Questions:
Here I will add questions and the answers to them as I receive them because im sure there will be some..
Process In Steps:
Step 1: Installing files and setup basically Files pack.rar has all you need in it so use a Rar extraction pogrom like winrar. Once files are extracted you should have folders like: (without it looking like a mac)
Start by installing GTAIVModdingTools\setup.msi
Install ScoCompiler (SCOCL) by Placing it in C:\ eg: C:\ScoCompiler\ScoCompiler\ once finished
install SCOToolBox by placing it on desktop or anywhere
and google DevC++ and download and install it or use Notepad
For this tutorial I will declare Myscript.c as your script..
Step2: Go to C:\ScoCompiler\ScoCompiler\ open up C:\ScoCompiler\ScoCompiler\files.txt and put in the location of your script..
eg C:\ScoCompiler\ScoCompiler\Sources\Myscript.c ..
what this does it tells "compile.bat" where to locate your script to compile.. it will compile and place the name you set in files.txt in C:\ScoCompiler\ScoCompiler\Output\ folder in "SCO" file format
Step3: Use your script editor and open C:\ScoCompiler\ScoCompiler\Sources\Stripped\main.c
this is the "superman" script (from Scocl) witch gives you god mode etc..( I use this for my "base" in all testing )
Make any changes that you want and then save your script in C:\ScoCompiler\ScoCompiler\Sources\ as what ever name you set in "files.txt" eg: Myscript.c
and now select "compile.bat" it will open a Command window and run the compiler as long as your script name matches the one in "Files.txt"
If all goes will it will say finished and you can simply close this window.
If all goes wrong it will tell you the reason the compiler couldn't work and usually a line in your script where its at fault..
So once your all done with this you should see your "sco" file in C:\ScoCompiler\ScoCompiler\Output\ "Myscript.c"
Step4: Now that you have a compiled Myscript.sco from Myscript.c there is a bit more to be done.. Since AlexanderBlade the Author for Scocl wrote his program to compile .sco with New natives ver 1.7.0 only and our game consoles with Gtaiv only function with scripts with natives from 1.4.0 we need to convert our sco to an older format because if we don't our new script wont work…
In order to convert we need to use SCOToolBox.exe so locate your scotoolbox folder and select SCOtoolbox.exe and open it.
Select "open" (step1)
ENSURE natives mode is set to "NEW" (step2)
Select "open code editor" (step3)
Now you have this window:
as you can see the steps I will make it more clear:
S1: you MUST convert new natives to old
S2: Save your sco to eg: Sixaxistutorial.sco or loadthis.sco make sure its saved Encoded
S3: Double check for any natives that were not changed.. select magnifying glass and search for "callnatve 0x
S4: If found …like in the example you have "CallNative 0x234de45ff" you need to do now is google that hash value and find what it is in WORDS what exactly that native is eg 0x234de45ff = SOME_COOL_FUNCTION
copy the word and replace the hex value with it. then save file as encoded and repeat till all is replaced.
Step5: Grab a fresh "script.img" from your backup gtaiv game and place it somewhere you can get to eg desktop now open OpenIV by going to START>ALL PROGRAMS>GTA IV MODING TOOLS> OpenIV and select it…
then go to file>open select script.img and then select open
It will then ask you "open an archive in the editing mode?" select yes
Find sixaxistutorial.sco and delete it from your original script.img
take your sixaxistutorial.sco and drag and drop it in the window and check to see if it is there. once finished select File>rebuild and completely rebuild the script.img
once done that place in USBHDD/GAMES/BLUSXXXX/PS3_GAME/USRDIR/common/data/
NOW TEST!… thats it some work some don't but if it wont work its usually your C script
Note: if your on PC/XBOX360 the examples in the files pack.... eg "modscript.c"will work online Not sure if they go in Network_script.img im sure someone will figure it out.
By: Alex of PSX-Scene
NEW: Here is one of my latest scripts ready to go , Try it yourself.. I challenge anyone to try to compile it / change it / adjust it / make it better
Code:
Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
//############### Define Xbox Controller ################################//
#define BUTTON_BACK 0xD
#define BUTTON_START 0xC
#define BUTTON_X 0xE
#define BUTTON_Y 0xF
#define BUTTON_A 0x10
#define BUTTON_B 0x11
#define BUTTON_DPAD_UP 0x8
#define BUTTON_DPAD_DOWN 0x9
#define BUTTON_DPAD_LEFT 0xA
#define BUTTON_DPAD_RIGHT 0xB
#define BUTTON_LB 0x5
#define BUTTON_RB 0x7
#define BUTTON_LT 0x4
#define BUTTON_RT 0x6
#define BUTTON_STICK_LEFT 0x12
#define BUTTON_STICK_RIGHT 0x13
//####################################################################//
void Superman(void)
{
uint pid = GET_PLAYER_ID();
if (pid >= 0)
if (IS_PLAYER_PLAYING(pid))
if (PLAYER_HAS_CHAR(pid))
{
Ped ped;
GET_PLAYER_CHAR(pid, &ped);
if (ped > 0)
{
SET_PLAYER_INVINCIBLE(pid, TRUE);
SET_PLAYER_NEVER_GETS_TIRED(pid, TRUE);
SET_PLAYER_FAST_RELOAD(pid, TRUE);
ENABLE_MAX_AMMO_CAP(FALSE);
UpdateWeaponOfPed(ped, WEAPON_KNIFE);
UpdateWeaponOfPed(ped, WEAPON_MOLOTOV);
UpdateWeaponOfPed(ped, WEAPON_DEAGLE);
UpdateWeaponOfPed(ped, WEAPON_SHOTGUN);
UpdateWeaponOfPed(ped, WEAPON_MP5);
UpdateWeaponOfPed(ped, WEAPON_AK47);
}
}
}
//###################################################################################//
//#############################BUTTON FUNCTIONS START################################//
//###################################################################################//
void SetGodMode(void)
{
if ((IS_BUTTON_PRESSED(0, BUTTON_STICK_LEFT)) && (IS_BUTTON_PRESSED(0, BUTTON_STICK_RIGHT)) ) //Button Combo
{
Superman();
PRINT_STRING_WITH_LITERAL_STRING_NOW("string", "GodMode Enabled", 1000, 1);
}
}
//###################################################################################//
//#############################BUTTON FUNCTIONS END##################################//
//###################################################################################//
void SpawnVehicle(uint hash)
{
REQUEST_MODEL(hash);
while (!HAS_MODEL_LOADED(hash)) WAIT(100);
float x, y, z;
GET_OFFSET_FROM_CHAR_IN_WORLD_COORDS(GetPlayerPed(), 0, 5.5, 0, &x, &y, &z);
Car c;
CREATE_CAR(hash, x, y, z, &c, TRUE);
SET_CAR_CAN_BE_DAMAGED(hash, FALSE);
SET_CAR_CAN_BE_VISIBLY_DAMAGED(hash, FALSE);
SET_CAN_BURST_CAR_TYRES(hash, FALSE);
MARK_MODEL_AS_NO_LONGER_NEEDED(hash);
}
void InitThisScript(void)
{
int randint;
GENERATE_RANDOM_INT(&randint);
SET_RANDOM_SEED(randint);
THIS_SCRIPT_SHOULD_BE_SAVED();
SET_THIS_SCRIPT_CAN_REMOVE_BLIPS_CREATED_BY_ANY_SCRIPT(TRUE);
}
void InitPlayer(void)
{
SET_PLAYER_CONTROL(GetPlayerIndex(), TRUE);
SET_CHAR_COORDINATES(GetPlayerPed(), 2242.19, 727.24, 5.91); //airport
SET_POLICE_IGNORE_PLAYER(GetPlayerIndex(), FALSE);
SET_CHAR_RELATIONSHIP_GROUP(GetPlayerPed(), 0);
}
void HideLoadingScreen(int time)
{
FORCE_LOADING_SCREEN(FALSE);
DO_SCREEN_FADE_IN_UNHACKED(time);
}
void InitVisual(void)
{
RELEASE_WEATHER();
RELEASE_TIME_OF_DAY();
}
void main(void)
{
InitThisScript();
InitPlayer();
InitVisual();
Superman();
WAIT(2000);
HideLoadingScreen(4000);
while (TRUE)
{
WAIT(0);
SetGodMode();
}
}