Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!   (85,920 visits to this link)

    2. News

    1. GTA Online

      1. Find Lobbies & Players
      2. Guides & Strategies
      3. Vehicles
      4. Content Creator
      5. Help & Support
    2. Crews

      1. Events
      2. Recruitment
    1. Grand Theft Auto Series

    2. GTA Next

    3. GTA V

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

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA Mods
    5. GTA Chinatown Wars

    6. GTA Vice City Stories

    7. GTA Liberty City Stories

    8. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    9. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    10. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA Mods
    11. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    12. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

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

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption 2

    2. Red Dead Redemption

    3. Rockstar Games

    1. Off-Topic

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

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

    2. Site Suggestions

Skorpro

Miscellaneous SCO Scripts

Recommended Posts

Skorpro

REQUEST_COLLISION_AT_POSN

LOAD_ALL_OBJECTS_NOW

LOAD_SCENE

POPULATE_NOW

 

But no dice :/

 

I've tried many natives & methods (originally I wanted to integrate them into my New Safehouses Mod) but to no effect! Cutscene rooms are w/o any collision... :(

 

Nice that you could use somewhat :)

Share this post


Link to post
Share on other sites
Skorpro

Hi modders, it's been a looong time...

 

My ParkedCars 2.0 mod is almost finished but now I've got the f*ckin' taxi bug. So I decided to create a new "Traffic Loader" - I know IKT made one but his mod is unstable and crashes the game after ~30 min. Here is a first try in SCO (more stable than ScriptHook ;))...

 

TrafficLoader.h

/***********************************************************************	SCO Traffic Loader © Skorpro	This mod based on the idea (NOT source!) by IKT!	Scripted with SCOCL by Alexander Blade!	Special thanx to IKT, Alexander Blade, ARU and OpenIV Team!		NOTE:	If you want to use/change this script always mention			Skorpro (me) and IKT in your readme/presentation! Thanx ***********************************************************************/#pragma once#include "natives.h"#include "consts.h"#include "strings.h"#include "types.h"#include "consts.h"// FUNCTIONS	###########################Player GetPlayerIndex(void){	return GET_PLAYER_ID();}Ped GetPlayerPed(void){	Ped playerped = INVALID_HANDLE;	if ( PLAYER_HAS_CHAR(GetPlayerIndex()) )		GET_PLAYER_CHAR(GetPlayerIndex(), &playerped);	return playerped;}void LoadModel(uint lModel){	REQUEST_MODEL(lModel);	while(!HAS_MODEL_LOADED(lModel)) { WAIT(100); }}void SkorproPrint(void *printText, uint printTime, bool printWait){	PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", printText, printTime, 1);	if (printWait == 1) { WAIT(printTime); }}void SkorproNumText(int num, float ntx, float nty){	SET_TEXT_BACKGROUND(0);	SET_TEXT_SCALE(0.27, 0.27);	SET_TEXT_JUSTIFY(1);	SET_TEXT_EDGE(1, 0, 0, 0, 255);	SET_TEXT_FONT(1); // LED	SET_TEXT_COLOUR(255, 255, 255, 255);	DISPLAY_TEXT_WITH_NUMBER(ntx, nty, "NUMBER", num);}// DEFINITIONS	############################define ply GetPlayerIndex()#define ich GetPlayerPed()#define skpp SkorproPrint#define key IS_GAME_KEYBOARD_KEY_PRESSED#define skpn SkorproNumText

TrafficLoader.c

/***********************************************************************	SCO Traffic Loader © Skorpro	This mod based on the idea (NOT source!) by IKT!	Scripted with SCOCL by Alexander Blade!	Special thanx to IKT, Alexander Blade, ARU and OpenIV Team!		NOTE:	If you want to use/change this script always mention			Skorpro (me) and IKT in your readme/presentation! Thanx ***********************************************************************/#include <TrafficLoader.h>// VARSint waiting = 15000;		// cycle interval (in ms)int amount = 10;			// load cars per cycleint taxiUNLOAD = 1;			// 0=off // 1=Unload // 2=Unload & Suppress T // 3==Unload & Suppress T&Pboolean supOwnCar = 1;		// 0=off // 1=suppress OWN carboolean mission = 1;		// 0=off // 1=is a mission active disable random carsboolean speedChk = 1;		// 0=off // 1=Speed Checkint stopTime = 10000;		// random waiting during dead or in mission (in ms)boolean drunkCam = 1;		// 0=off // 1=onboolean busOnce = 1;		// 0=off // 1=on (1=Load the BUS as first Model!)boolean traffic = 0;		// 0=off // 1=Traffic Adjustmentboolean stop = 0;uint rndListModel = 0;int allcars = 0;uint random = 0;Vehicle currCar;uint currModel;boolean rc[150] = { 0 };	// Random Check (für max 150 mögliche Models -> siehe "SkorproCarList")int rcount = 0;				// Zählt alle "gezogenen"int rndTemp[50] = { 0 };	// Speichert die aktuell Gezogenen! Nötig für's Löschen!boolean bLog = 1;			// Log, dass Random für 10 Sekunden gestoppt wirduint eRoomKey;				// Checkt, ob Player in irgendeinem Raum (...dann nicht RANDOM)boolean bMission = 0;		// Var für MissionCheckboolean bCarSlow = 0;		// Var für Car-Slow-Checkfloat speed = 0.0f;			// Var für Car Speedboolean areaChk = 1;		// Var für Area-Checkuint mapArea, tmpArea;		// Var für Areafloat ax, ay, az;			// Var für Player Area Coords// FUNCTIONSvoid SkorproRandomCars(uint rndLoadModel, boolean delete0_create1){	if (delete0_create1 == 1) LoadModel(rndLoadModel);	// Request Model	else if (delete0_create1 == 0)	{		if (rndLoadModel != MODEL_BUS) 		{			MARK_MODEL_AS_NO_LONGER_NEEDED(rndLoadModel);		}	}}void SkorproKillModels(boolean own_taxi){	if ( (supOwnCar > 0) && (own_taxi == 0) && (IS_CHAR_IN_ANY_CAR(ich)) )	{  		GET_CAR_CHAR_IS_USING(ich, &currCar);		GET_CAR_MODEL(currCar, &currModel);		SUPPRESS_CAR_MODEL(currModel);		MARK_MODEL_AS_NO_LONGER_NEEDED(currModel);	}	if ( (taxiUNLOAD > 0)  && (own_taxi == 1) )	{		MARK_MODEL_AS_NO_LONGER_NEEDED(MODEL_TAXI);		MARK_MODEL_AS_NO_LONGER_NEEDED(MODEL_TAXI2);		MARK_MODEL_AS_NO_LONGER_NEEDED(MODEL_CABBY);		if (taxiUNLOAD > 1)		{			SUPPRESS_CAR_MODEL(MODEL_TAXI);			SUPPRESS_CAR_MODEL(MODEL_TAXI2);			SUPPRESS_CAR_MODEL(MODEL_CABBY);			if (taxiUNLOAD > 2)			{				SUPPRESS_CAR_MODEL(MODEL_POLICE);				SUPPRESS_CAR_MODEL(MODEL_POLICE2);			}		}	}}boolean SkorproRandomStop(int iALLCARS){	GET_KEY_FOR_CHAR_IN_ROOM(ich, &eRoomKey);	if (speedChk == 1)	{		Vehicle slowCar;		if (IS_CHAR_IN_ANY_CAR(ich))		{			GET_CAR_CHAR_IS_USING(ich, &slowCar);			GET_CAR_SPEED(slowCar, &speed);			if (speed < 10.0) bCarSlow = 1;			else bCarSlow = 0;		}	}	if (mission == 1)	{		if ((GET_MISSION_FLAG()) == 1) bMission = 1;		else bMission = 0;	}	// If WANTED(>3), DEAD, NOT EXIST, IN MISSION or IN A BUILDING then STOP RANDOM!	if ( (IS_WANTED_LEVEL_GREATER(ply, 3) == 1) || (IS_PLAYER_DEAD(ply) == 1) || (DOES_CHAR_EXIST(ich) == 0) || (bMission != 0) || (bCarSlow != 0) || (eRoomKey != 0) ) 	{		stop = true;	}	else stop = false;	if (areaChk == 1)	{		GET_CHAR_COORDINATES(ich, &ax, &ay, &az);		mapArea = GET_MAP_AREA_FROM_COORDS(ax, ay, az);		if (mapArea != tmpArea)		{			//SkorproPrint("Area Break!", 3000, 0); // Nur zum testen 			tmpArea = mapArea;			stop = true;		}	}	return stop;}uint SkorproCarList(int carNum){	// GTA IV CARS	if (carNum == 1) rndListModel = MODEL_ADMIRAL;	if (carNum == 2) rndListModel = MODEL_BANSHEE;	if (carNum == 3) rndListModel = MODEL_BENSON;	if (carNum == 4) rndListModel = MODEL_BIFF;	if (carNum == 5) rndListModel = MODEL_BLISTA;	if (carNum == 6) rndListModel = MODEL_BOBCAT;	if (carNum == 7) rndListModel = MODEL_BOXVILLE;	if (carNum == 8) rndListModel = MODEL_BUCCANEER;	if (carNum == 9) rndListModel = MODEL_BURRITO;	if (carNum == 10) rndListModel = MODEL_AMBULANCE;				// MODEL_BUS soll nur EINMALIG geladen werden	if (carNum == 11) rndListModel = MODEL_CAVALCADE;	if (carNum == 12) rndListModel = MODEL_CHAVOS;	if (carNum == 13) rndListModel = MODEL_COGNOSCENTI;	if (carNum == 14) rndListModel = MODEL_COMET;	if (carNum == 15) rndListModel = MODEL_COQUETTE;	if (carNum == 16) rndListModel = MODEL_DF8;	if (carNum == 17) rndListModel = MODEL_DILETTANTE;	if (carNum == 18) rndListModel = MODEL_DUKES;	if (carNum == 19) rndListModel = MODEL_E109;	if (carNum == 20) rndListModel = MODEL_EMPEROR;	if (carNum == 21) rndListModel = MODEL_EMPEROR2;	if (carNum == 22) rndListModel = MODEL_ESPERANTO;	if (carNum == 23) rndListModel = MODEL_FACTION;	if (carNum == 24) rndListModel = MODEL_FELTZER;	if (carNum == 25) rndListModel = MODEL_FEROCI;	if (carNum == 26) rndListModel = MODEL_FLATBED;	if (carNum == 27) rndListModel = MODEL_FORTUNE;	if (carNum == 28) rndListModel = MODEL_FUTO;	if (carNum == 29) rndListModel = MODEL_FXT;	if (carNum == 30) rndListModel = MODEL_HABANERO;	if (carNum == 31) rndListModel = MODEL_HAKUMAI;	if (carNum == 32) rndListModel = MODEL_HUNTLEY;	if (carNum == 33) rndListModel = MODEL_INFERNUS;	if (carNum == 34) rndListModel = MODEL_INGOT;	if (carNum == 35) rndListModel = MODEL_INTRUDER;	if (carNum == 36) rndListModel = MODEL_LANDSTALKER;	if (carNum == 37) rndListModel = MODEL_LOKUS;	if (carNum == 38) rndListModel = MODEL_MANANA;	if (carNum == 39) rndListModel = MODEL_MARBELLA;	if (carNum == 40) rndListModel = MODEL_MERIT;	if (carNum == 41) rndListModel = MODEL_MINIVAN;	if (carNum == 42) rndListModel = MODEL_MOONBEAM;	if (carNum == 43) rndListModel = MODEL_MRTASTY;	if (carNum == 44) rndListModel = MODEL_MULE;	if (carNum == 45) rndListModel = MODEL_ORACLE;	if (carNum == 46) rndListModel = MODEL_PACKER;	if (carNum == 47) rndListModel = MODEL_PATRIOT;	if (carNum == 48) rndListModel = MODEL_PERENNIAL;	if (carNum == 49) rndListModel = MODEL_PEYOTE;	if (carNum == 50) rndListModel = MODEL_PHANTOM;	if (carNum == 51) rndListModel = MODEL_PINNACLE;	if (carNum == 52) rndListModel = MODEL_PMP600;	if (carNum == 53) rndListModel = MODEL_PONY;	if (carNum == 54) rndListModel = MODEL_PREMIER;	if (carNum == 55) rndListModel = MODEL_PRES;	if (carNum == 56) rndListModel = MODEL_PRIMO;	if (carNum == 57) rndListModel = MODEL_RANCHER;	if (carNum == 58) rndListModel = MODEL_REBLA;	if (carNum == 59) rndListModel = MODEL_PSTOCKADE;			// BUS war hier DOPPELT!	if (carNum == 60) rndListModel = MODEL_ROMERO;	if (carNum == 61) rndListModel = MODEL_ROM;	if (carNum == 62) rndListModel = MODEL_RUINER;	if (carNum == 63) rndListModel = MODEL_SABRE;	if (carNum == 64) rndListModel = MODEL_SABRE2;	if (carNum == 65) rndListModel = MODEL_SABREGT;	if (carNum == 66) rndListModel = MODEL_SCHAFTER;	if (carNum == 67) rndListModel = MODEL_SENTINEL;	if (carNum == 68) rndListModel = MODEL_SOLAIR;	if (carNum == 69) rndListModel = MODEL_SPEEDO;	if (carNum == 70) rndListModel = MODEL_STALION;	if (carNum == 71) rndListModel = MODEL_STEED;	if (carNum == 72) rndListModel = MODEL_STOCKADE;	if (carNum == 73) rndListModel = MODEL_STRATUM;	if (carNum == 74) rndListModel = MODEL_STRETCH;	if (carNum == 75) rndListModel = MODEL_SULTAN;	if (carNum == 76) rndListModel = MODEL_SULTANRS;	if (carNum == 77) rndListModel = MODEL_SUPERGT;	if (carNum == 78) rndListModel = MODEL_TRASH;	if (carNum == 79) rndListModel = MODEL_TURISMO;	if (carNum == 80) rndListModel = MODEL_URANUS;	if (carNum == 81) rndListModel = MODEL_VIGERO;	if (carNum == 82) rndListModel = MODEL_VIGERO2;	if (carNum == 83) rndListModel = MODEL_VINCENT;	if (carNum == 84) rndListModel = MODEL_VIRGO;	if (carNum == 85) rndListModel = MODEL_VOODOO;	if (carNum == 86) rndListModel = MODEL_WASHINGTON;	if (carNum == 87) rndListModel = MODEL_WILLARD;	if (carNum == 88) rndListModel = MODEL_YANKEE;	// GTA IV BIKES	if (carNum == 89) rndListModel = MODEL_BOBBER;	if (carNum == 90) rndListModel = MODEL_FAGGIO;	if (carNum == 91) rndListModel = MODEL_HELLFURY;	if (carNum == 92) rndListModel = MODEL_NRG900;	if (carNum == 93) rndListModel = MODEL_PCJ;	if (carNum == 94) rndListModel = MODEL_SANCHEZ;	if (carNum == 95) rndListModel = MODEL_ZOMBIEB;	// GTA TLAD	if (GET_CURRENT_EPISODE() == 1)	{		if (carNum == 96) rndListModel = MODEL_BATI;		if (carNum == 97) rndListModel = MODEL_DAEMON;		if (carNum == 98) rndListModel = MODEL_DOUBLE2;		if (carNum == 99) rndListModel = MODEL_GBURRITO;		if (carNum == 100) rndListModel = MODEL_HAKUCHOU2;		if (carNum == 101) rndListModel = MODEL_INNOVATION;		if (carNum == 102) rndListModel = MODEL_PACKER2;		if (carNum == 103) rndListModel = MODEL_REGINA;		if (carNum == 104) rndListModel = MODEL_RHAPSODY;		if (carNum == 105) rndListModel = MODEL_TOWTRUCK;		if (carNum == 106) rndListModel = MODEL_WAYFARER;		if (carNum == 107) rndListModel = MODEL_YANKEE2;		if (carNum == 108) rndListModel = MODEL_WOLFSBANE;		if (carNum == 109) rndListModel = MODEL_HEXER;		if (carNum == 110) rndListModel = MODEL_LYCAN;		if (carNum == 111) rndListModel = MODEL_NIGHTBLADE;		if (carNum == 112) rndListModel = MODEL_REVENANT;		if (carNum == 113) rndListModel = MODEL_DIABOLUS;		if (carNum == 114) rndListModel = MODEL_ANGEL;	}	// GTA TBOGT	if (GET_CURRENT_EPISODE() == 2)	{		if (carNum == 96) rndListModel = MODEL_AKUMA;		if (carNum == 97) rndListModel = MODEL_BATI2;		if (carNum == 98) rndListModel = MODEL_BUFFALO;		if (carNum == 99) rndListModel = MODEL_BULLET;		if (carNum == 100) rndListModel = MODEL_DOUBLE;		if (carNum == 101) rndListModel = MODEL_F620;		if (carNum == 102) rndListModel = MODEL_SCHAFTER2;		if (carNum == 103) rndListModel = MODEL_SCHAFTER3;		if (carNum == 104) rndListModel = MODEL_SERRANO2;		if (carNum == 105) rndListModel = MODEL_SLAMVAN;		if (carNum == 106) rndListModel = MODEL_LIMO2;		if (carNum == 107) rndListModel = MODEL_SUPERD;		if (carNum == 108) rndListModel = MODEL_TAMPA;	}	return rndListModel;}// ################################## MAIN ##################################void main(void){	WAIT(5000);	// Kill drunken Cam	if (drunkCam > 0)	{		Camera cam;		GET_ROOT_CAM(&cam);		SET_DRUNK_CAM(cam, 0.0, 0);	}	// Episode and max RND!	if (GET_CURRENT_EPISODE() == 0) allcars = 95;	// GTA IV	if (GET_CURRENT_EPISODE() == 1) allcars = 114;	// TLAD	if (GET_CURRENT_EPISODE() == 2) allcars = 108;	// TBOGT	// Traffic Adjustment	if (traffic == 1)	{		SET_CAR_DENSITY_MULTIPLIER(1.20);		SET_PED_DENSITY_MULTIPLIER(1.11);		SET_RANDOM_CAR_DENSITY_MULTIPLIER(1.25);		SET_PARKED_CAR_DENSITY_MULTIPLIER(1.0);	}	// Einmaliger Bus-Load	if (busOnce == 1) LoadModel(MODEL_BUS);	// Request Model	// Area Check	if (areaChk == 1)	{		GET_CHAR_COORDINATES(ich, &ax, &ay, &az);		tmpArea = GET_MAP_AREA_FROM_COORDS(ax, ay, az);	}	// Nur zum testen 	//SkorproPrint("Random Cars START!", 3000, 0); 	while (true)	{		// If WANTED(>3), DEAD, NOT EXIST, IN MISSION or IN A BUILDING then STOP RANDOM!		if (SkorproRandomStop(allcars) == false)		{			// Create Random Cars			int iRnd;			for (iRnd = 1; iRnd < amount+1; iRnd++)			{				// rc wird genullt, wenn rcount (zählt alle "gezogenen") >= max Anzahle an Models (=allcars) -> also alle durch sind 				if (rcount >= allcars)				{					int i;					for (i = 1; i < allcars+1; i++)					{						rc[i] = 0;					}					rcount = 0;				}				while (true)				{					// Random 1 bis allcars					GENERATE_RANDOM_INT_IN_RANGE(1, allcars, &random);					// rc prüfen, ob FREI, dann auf 1 setzen, damit nicht wieder gezogen!					if (rc[random] == 0) 					{						rc[random] = 1;						rcount++;						break;		// Wenn Platz frei war, dann raus aus while-Schleife!					}				}				// Create RANDOM car				rndTemp[iRnd] = random;				SkorproRandomCars(SkorproCarList(random), 1);			}			WAIT(waiting);				// Interval per cycle!			SkorproKillModels(1);		// Kill Taxi			SkorproKillModels(0);		// Kill own Car			// Delete Random Cars			int iDel;			for (iDel = 1; iDel < amount+1; iDel++)			{				SkorproRandomCars(SkorproCarList(rndTemp[iDel]), 0);				//rndTemp[iDel] = 0;				WAIT(0);			}			bLog = 1;		}		else		{			if (bLog == 1) 			{				//SkorproPrint("Random stopped!", 3000, 0);	// Nur zum testen 				bLog = 0;			}			WAIT(stopTime);		}		WAIT(10);	}}

As distinct from IKT's mod I added a 'area', 'car speed', 'building' and 'on foot' check (all this prevent a game crash). The 'random' and 'vehicle loading' segments were changed too!

 

Note: Some comments are in German, so use google for translation ;)

 

If anyone has improvement suggestions - please give it to me! Thanx :D

Share this post


Link to post
Share on other sites
Skorpro

Hi folks & stef538 (referring to: "SCO Saving Game and Keeping Track")

 

This is an example how to save the game and load missions at start! Do not simply copy and paste it! You must adapt this code to your own.

/*	SAVE SCRIPT & MISSION LOAD EXAMPLE by Skorpro	Thanx to Alexander Blade (SCOCL)*/#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>// Vars#define F1 59#define PP GetPlayerPed()// New Funcsvoid skpp(char *printText, uint printTime, bool printWait){	PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", printText, printTime, 1);	if (printWait == 1) { WAIT(printTime); }}void LoadScript(char *cName){	if (GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT(cName) == 0)	{		uint uScript;		if (DOES_SCRIPT_EXIST(cName))		{			REQUEST_SCRIPT(cName);			while (!HAS_SCRIPT_LOADED(cName)) WAIT(0);			uScript = START_NEW_SCRIPT(cName, 1024);			MARK_SCRIPT_AS_NO_LONGER_NEEDED(cName);		}		else		{			skpp("~r~! ERROR !", 2000, 1);			skpp(cName, 2000, 1);			skpp("~r~Script NOT found!", 4000, 0);		}	}	else skpp("~r~Script is already running!", 2500, 0);}// Mainvoid main(void){	// BEGIN: main.sco part	THIS_SCRIPT_SHOULD_BE_SAVED();	SET_THIS_SCRIPT_CAN_REMOVE_BLIPS_CREATED_BY_ANY_SCRIPT(TRUE);	SET_CHAR_COORDINATES(PP, 2360.88, 389.94, 6.09); // Airport Coords	SET_CHAR_HEADING(PP, 90.0);	LOAD_SCENE(2360.88, 389.94, 6.09);	SET_CAM_BEHIND_PED(PP);	SET_PLAYER_CONTROL(GetPlayerIndex(), TRUE);	RELEASE_WEATHER();	RELEASE_TIME_OF_DAY();	SPECIFY_SCRIPT_POPULATION_ZONE_NUM_PEDS(100); 	SPECIFY_SCRIPT_POPULATION_ZONE_NUM_SCENARIO_PEDS(100);	ACTIVATE_SCRIPT_POPULATION_ZONE();	WAIT(2000);	FORCE_LOADING_SCREEN(FALSE);	DO_SCREEN_FADE_IN_UNHACKED(4000);	WAIT(4500);	// END: main.sco part			// Check Mission Status	uint uStat; // Check your script(s) maybe it's better to set this variable GLOBAL!	uStat = GET_INT_STAT(253); // C++ -->> STAT_MISSIONS_PASSED = 253 (eIntStatistic) -->> Missions passed		if (uStat == 0)	{		skpp("New Game", 3000, 1);		LoadScript("Mission1"); // Start Mission1.sco	}	else if (uStat == 1)	{		skpp("Mission 1 passed!", 3000, 1);		LoadScript("Mission2"); // Start Mission2.sco	}	else if (uStat == 2)	{		skpp("Mission 2 passed!", 3000, 1);		LoadScript("Mission3"); // Start Mission3.sco	}	//	// . . . .	//	else if (uStat > 2) skpp("Mission NOT found!", 3000, 0);		while (TRUE)	{		// Activate Save Menu		if (IS_GAME_KEYBOARD_KEY_PRESSED(F1)) // Key <F1>		{			if (GET_MISSION_FLAG() == 0)			{				ACTIVATE_SAVE_MENU();				WAIT(0);				if (IS_PLAYER_PLAYING(GetPlayerIndex())) SET_USE_LEG_IK(GetPlayerIndex(), FALSE);							if (DID_SAVE_COMPLETE_SUCCESSFULLY())				{					#ifdef DEBUG					skpp("Game saved!", 3000, 0);					#endif				}				else 				{					#ifdef DEBUG					skpp("Game NOT saved!", 3000, 0);					#endif					SET_CAM_BEHIND_PED(PP);				}			}			else skpp("You can't save during a mission!", 2000, 0);		}				WAIT(100);	}}

I prefer to use this script as main.sco but you decide...

 

Have fun :)

Share this post


Link to post
Share on other sites
Skorpro

Oops! I've forgotten s.t.:

 

After successful mission increase the '253' Stat (+1):

INCREMENT_INT_STAT(253, 1);

Important note: Always make a backup of your savegames! Playing around with ingame statistics (STAT natives) and save them may damage your savegames!

Share this post


Link to post
Share on other sites
yoloman

 

-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-How to use source codes-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-

 

 

1. Create in drive "C:\" two folders called "Input" and "Output".

2. Copy the included 5 source files (main.c, ...) into "C:\Input".

3. Copy the included compile.bat to "...\Scocl\bin" (e.g. "C:\Scocl\bin") and start it!

4. Now you will find 5 SCO files in your Output folder.

5. Download and install OpenIV and start it.

6. Open the File menu and choose Create... (or press CTRL+N) then IMG archive, type "script.img" as name and save it. Next press "Yes".

7. Now you get a clean window. Press the green "+" button and choose the 5 compiled SCO files (C:\Output).

8. Open the File menu and choose Rebuild (or press Shift+CTRL+R) and press "Rebuild" then "OK" and "Yes".

9. Close OpenIV.

10. Make a BACKUP of your savegames folder (C:\Users\USERNAME\Documents\Rockstar Games\GTA IV\) then delete all "SGTA... files" (NOT "ControlMap.dat")!

11. Make a BACKUP of the original script.img (eg. in C:\Program Files\Rockstar Games\EFLC\TLAD\common\data\cdimages)!

12. Copy YOUR self-made script.img into the game folder (eg. in C:\Program Files\Rockstar Games\EFLC\TLAD\common\data\cdimages).

13. Start the game -> a new game will starts...

 

It's a little bit tricky... but if you follow my instruction step by step you will get it rightwink.gif

 

 

Ehm...I don't know why but there is nothing in the Output folder when I run the compile.bat (and yes, I have sources in the Input folder, and yes, there are both in C:\ located)... What did I wrong?

 

Never mind. I solved it

Edited by yoloman

Share this post


Link to post
Share on other sites
iiCriminnaaL 49

Does anybody know how to modify TLaD's script so the clubhouse will keep open even after Get Lost? With full services and radar blips, like saving, arm wrestling, etc.

Share this post


Link to post
Share on other sites
Skorpro

Does anybody know how to modify TLaD's script so the clubhouse will keep open even after Get Lost? With full services and radar blips, like saving, arm wrestling, etc.

Sry, I can't find my 'New Safehouses Mod' FULL source code... and the game was uninstalled years ago...

but I find this part (to open the clubhouse doors):

SetStateOfClosestDoorOfType(0xea209f76, -1739.42f, 328.74f, 26.75f, 0, 0.0f);  // Lost clubhouse garageSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1715.15f, 354.19f, 26.16f, 0, 0.0f);  // Lost clubhouse frontdoorSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1726.77f, 341.83f, 26.36f, 0, 0.0f);  // Lost clubhouse sidedoorSetStateOfClosestDoorOfType(0x301f2ce5, -1730.1910f, 325.5165f, 42.4112f, 0, 0.0f);  // Lost clubhouse top door

AFAIK the club activities are disabled. GOOD LUCK :)

Share this post


Link to post
Share on other sites
iiCriminnaaL 49

 

Does anybody know how to modify TLaD's script so the clubhouse will keep open even after Get Lost? With full services and radar blips, like saving, arm wrestling, etc.

Sry, I can't find my 'New Safehouses Mod' FULL source code... and the game was uninstalled years ago...

but I find this part (to open the clubhouse doors):

SetStateOfClosestDoorOfType(0xea209f76, -1739.42f, 328.74f, 26.75f, 0, 0.0f);  // Lost clubhouse garageSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1715.15f, 354.19f, 26.16f, 0, 0.0f);  // Lost clubhouse frontdoorSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1726.77f, 341.83f, 26.36f, 0, 0.0f);  // Lost clubhouse sidedoorSetStateOfClosestDoorOfType(0x301f2ce5, -1730.1910f, 325.5165f, 42.4112f, 0, 0.0f);  // Lost clubhouse top door

AFAIK the club activities are disabled. GOOD LUCK :)

 

Although I hardly wanted the clubhouse's activities too, opened doors alone is still great. :)

 

I have a few questions: in which file should I add them? Also, which scripting program are you using? I used SCO ToolBox, but I don't seem to find similar lines in any file of the script.img.

Share this post


Link to post
Share on other sites
floof

Although I hardly wanted the clubhouse's activities too, opened doors alone is still great. :)

 

I have a few questions: in which file should I add them? Also, which scripting program are you using? I used SCO ToolBox, but I don't seem to find similar lines in any file of the script.img.

 

If you have a way to load an SCO ingame (a hook) you can use this SCO I compiled: https://ufile.io/ey6qi

I'm guessing you want to add this to the actual rocksar SCO though, right?

Share this post


Link to post
Share on other sites
Skorpro

 

 

Does anybody know how to modify TLaD's script so the clubhouse will keep open even after Get Lost? With full services and radar blips, like saving, arm wrestling, etc.

Sry, I can't find my 'New Safehouses Mod' FULL source code... and the game was uninstalled years ago...

but I find this part (to open the clubhouse doors):

SetStateOfClosestDoorOfType(0xea209f76, -1739.42f, 328.74f, 26.75f, 0, 0.0f);  // Lost clubhouse garageSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1715.15f, 354.19f, 26.16f, 0, 0.0f);  // Lost clubhouse frontdoorSetStateOfClosestDoorOfType(GetHashKey("CJ_Lost_Door"), -1726.77f, 341.83f, 26.36f, 0, 0.0f);  // Lost clubhouse sidedoorSetStateOfClosestDoorOfType(0x301f2ce5, -1730.1910f, 325.5165f, 42.4112f, 0, 0.0f);  // Lost clubhouse top door

AFAIK the club activities are disabled. GOOD LUCK :)

 

Although I hardly wanted the clubhouse's activities too, opened doors alone is still great. :)

 

I have a few questions: in which file should I add them? Also, which scripting program are you using? I used SCO ToolBox, but I don't seem to find similar lines in any file of the script.img.

 

 

I've used SCOCL (by Alexander Blade)!

 

This piece of code is C++ but you can use it in SCO too...

 

The natives are:

void SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(uint model, float x, float y, float z, int state, float);uint GET_HASH_KEY(char *value);

The SCO code should look like this:

#include <natives.h>#include <common.h>#include <strings.h>#include <types.h>#include <consts.h>void skpPrint(void *printText, uint printTime, bool printWait){	PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING", printText, printTime, 1);	if (printWait == 1) WAIT(printTime);}void main(void){	WAIT(2000);	skpPrint("The clubhouse doors are open!", 3000, 0);		SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(0xea209f76, -1739.42, 328.74, 26.75, 0, 0.0);  // Lost clubhouse garage	SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(GET_HASH_KEY("CJ_Lost_Door"), -1715.15, 354.19, 26.16, 0, 0.0);  // Lost clubhouse frontdoor	SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(GET_HASH_KEY("CJ_Lost_Door"), -1726.77, 341.83, 26.36, 0, 0.0);  // Lost clubhouse sidedoor	SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(0x301f2ce5, -1730.1910, 325.5165, 42.4112, 0, 0.0);  // Lost clubhouse top door	// LOOP	while (TRUE)	{		// Your code!				WAIT(10);	}}

Read my HowTo here!!!

Share this post


Link to post
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

×

Important Information

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