Hey guys new here, i have attempted to make a .sco script for my ps3 version of GTA IV (original), i have followed the tutorial as best as i can (i can't quite grasp some parts of what you say),
i can use OpenIV to modify .img archives,
i can compile with scocl,
i can use scotoolbox to convert from 1.0.7.0 to 1.0.4.0 then change the hex pointers to word pointers,
i can sort of understand c,
the code i have wrote is as follows (i dunno if its any good and its just a test so i can get started when it eventually works out for me)
Code:
#include <natives.h>
#include <common.h>
#include <strings.h>
#include <types.h>
#include <consts.h>
//############### Define Ps3 GamePad ################################//
#define BUTTON_SELECT 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_L1 0x4
#define BUTTON_L2 0x5
#define BUTTON_R1 0x6
#define BUTTON_R2 0x7
#define BUTTON_STICK_LEFT 0x12
#define BUTTON_STICK_RIGHT 0x13
//####################################################################//
void god(void) {
if (IS_BUTTON_PRESSED(0, BUTTON_STICK_RIGHT)) {
Player pid = GetPlayerIndex();
float x, y, z;
GET_CHAR_COORDINATES(GetPlayerPed(), &x, &y, &z);
Vehicle ban, pol;
CREATE_CAR(MODEL_BANSHEE, x, y+0.5, z, &ban, 1);
CREATE_CAR(MODEL_POLICE, x, y+1.5, z, &pol, 1);
CHANGE_CAR_COLOUR(ban, 59, 133);
CHANGE_CAR_COLOUR(pol, 89, 99);
}
}
void main(void) {
while (TRUE) {
WAIT(0);
god();
}
}
any help will be greatly appreciated and if/when i make something awesome with scripts then i'll be sure to share it with the community here
Btw i noticed this in the controller button definitions it declares buttons Y, A and B yet these buttons don't exist on the ps3 controller. Will these button definitions work despite being mislabeled if so what do they correspond to e.g is Y Triangle, or is A Square ??
Code:
#define BUTTON_X 0xE
#define BUTTON_Y 0xF
#define BUTTON_A 0x10
#define BUTTON_B 0x11