Quantcast

Jump to content

» «
Photo

How to use Aru's C++ ScriptHook SDK

47 replies to this topic
ClareXoBearrx3R9
  • ClareXoBearrx3R9

    'su' isn't the f*cking same as 'sudo'.

  • Members
  • Joined: 13 Aug 2010
  • United-States

#31

Posted 28 February 2015 - 11:19 PM

How to play MP3 with C++ ScriptHook:   (referring to: "(C++) Playing External Sound")

#include <windows.h>
#include <MMSystem.h>
#pragma comment(lib, "winmm.lib")


. . . .


mciSendString(TEXT("open Test.mp3"),NULL,0,0);
mciSendString(TEXT("play Test.mp3 repeat"),NULL,0,0);
mciSendString(TEXT("setaudio Test.mp3 output volume to 500"),NULL,0,0);  // Volume = 500 (0 - 1000)

Have fun :D

 

Beautiful! Gonna try this as soon as I get home from work, thanks! :D


MrManiac
  • MrManiac

    Player Hater

  • Members
  • Joined: 29 Mar 2015
  • Abkhazia

#32

Posted 06 April 2015 - 05:24 AM

It's a little late but can someond help me with a script? Please!

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#33

Posted 07 April 2015 - 07:10 AM

 

Hey Skorp, quickie question, what was the difference between using CustomThread and CustomFiberThread again? Is it the hash conversion? I have some ideas for rebuilding my studios code, but want to test on IV first.
 
Nice work here!

FiberThread allows one to use an equivalent of the native scripting 'WAIT' command to suspend the 'script', whereas the regular thread only exposes a tick method.

 

Perfect answer. (as always ;) )


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#34

Posted 07 April 2015 - 07:19 AM

It's a little late but can someond help me with a script? Please!

Is it a request for help? Please open your own topic.

Otherwise post your mod request here.

Thanx!

 


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#35

Posted 07 April 2015 - 07:34 AM

Hi guys!

 

I was very busy... but I will try to release some stuff before GTA V is coming out...

 

Let me start with an update: I've made 200 new native edits for Aru's C++ SDK.


MrManiac
  • MrManiac

    Player Hater

  • Members
  • Joined: 29 Mar 2015
  • Abkhazia

#36

Posted 07 April 2015 - 08:08 AM

Hey skorpo :)

I am using ultimate camera control made script by gtamchaos based on thaCURSEDpie's code but it works in no clip mode. How to enable clip capture? Give me some tips.

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#37

Posted 07 April 2015 - 08:48 AM

I am using ultimate camera control made script by gtamchaos based on thaCURSEDpie's code but it works in no clip mode. How to enable clip capture? Give me some tips.

In fact I have no idea... It should be easier to ask gtamchaos or theCURSEDpie, right?!? ;)

 


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#38

Posted 07 April 2015 - 09:37 AM

Hi modders!

 

Here is an example how to create a blackout mod:

1. Download my LightObjectsRipper (@dropbox) and copy it into the "..\pc\data\maps" folder.

2. Start it. You get a file ("Skorpro LightsOff.h") with model hashes like this:

u32 manhat01[75] = {
	118043259, 3846107904, 208427962, 3403174588, 3442363840, 802360536, 2145801883, 311283720, 1765930712, 1915943397, 416441796, 2330291615, 2239315353, 
	3098618012, 1223463740, 1966317700, 3203253706, 2846021056, 2720979820, 2801981330, 69035851, 3395703434, 64989989, 1771325051, 3980567316, 3949011196, 
	3841292893, 367416071, 894406185, 2102340283, 1004689663, 3013297291, 3472029240, 467523628, 1517869482, 1007161165, 1165075633, 2281939959, 43118342, 
	2455657977, 4117118018, 3806095030, 108783426, 3367105210, 1681678104, 89865360, 3123884707, 2861488397, 3276271673, 3832968688, 1070895991, 602043706, 
	2835124611, 4187783634, 2166455024, 1408307281, 2592181017, 702908480, 2579738794, 3265283707, 1515717206, 1031930, 431756631, 2859348338, 1363260770, 
	1690493788, 3937770424, 180505526, 3361458106, 1724543148, 2823091035, 2564111265, 831393744, 3070311405, 781565323
};

3. Add the header file to your C++ project and use this function:

#define ArraySize(arrayname) (sizeof arrayname/sizeof *arrayname)

// ...

void SKP::SkorproSetObjectVisibility(b8 bOffOn, u32 u32ModelHashes[], int iModelAmount, f32 fRadius, int iWaitInLoop, int iWaitAfterLoop, b8 bNoLongerNeeded)
{
	if (fRadius <= 0.0f) fRadius = 2500.0f; // Should reach ALL objects!

	for (int iMA = 0; iMA < iModelAmount; iMA++)
	{
		SetVisibilityOfClosestObjectOfType(0.0f, 0.0f, 0.0f, fRadius, (eModel) u32ModelHashes[iMA], bOffOn);
		if (iWaitInLoop >= 0) Wait(iWaitInLoop);
		if (bNoLongerNeeded == 1) MarkModelAsNoLongerNeeded((eModel) u32ModelHashes[iMA]);
	}
	if (iWaitAfterLoop >= 0) Wait(iWaitAfterLoop);
}

// ...

// RunScript() ...
SkorproSetObjectVisibility(0, manhat01, ArraySize(manhat01), -1.0f, -1, 1000, 1); // 'switch off' all models

4. Adapt this code to your own & have fun :)

 

 

NOTE: The problem is I have no idea how to disable the traffic lights, streetlights and the animated objects... maybe some of this natives are useful:

b8 PlayObjectAnim(Object obj, const ch *animName, const ch *animSet, f32 unknown0, b8 flag0, b8 flag1)
void SetObjectAnimCurrentTime(Object obj, char *animName, char *animSet, f32 time)
void SetObjectAnimPlayingFlag(Object obj, char *animName, char *animSet, b8 flag)
void SetObjectAnimSpeed(Object obj, char *animName, char *animSet, f32 speed)
void GetObjectAnimCurrentTime(Object obj, char *animName, char *animSet, f32 *time)
void GetObjectAnimTotalTime(Object obj, char *animName, char *animSet, f32 *time)

Anyway, here is a preview:

 

 

As always: You can use this code in your own mod but please make a small credit like "Thanx to Skorpro"! Thanx :)

 

Skorpro

  • AgentWD40 and LtFlash like this

MrManiac
  • MrManiac

    Player Hater

  • Members
  • Joined: 29 Mar 2015
  • Abkhazia

#39

Posted 07 April 2015 - 11:04 AM

Skorpro I tried contacting them but they both are inactive long time :(

can you tell me code how to make your own camera?

Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#40

Posted 09 April 2015 - 02:48 PM Edited by Skorpro, 09 April 2015 - 02:51 PM.

can you tell me code how to make your own camera?

Sorry dude, but this TUT is for people with knowledge in C/C++! To give you unfinished codes could be a little bit senseless for you because you should be able to adapt this to your own code...

Btw. I don't have the time to make scripts for someone!

But I can show you a little example here (Top-Down-View mod). This C-like (SCO) code was used in some XBOX trainers...

 

If you want to learn how to make own mods a easy way is this TUT by a great coder called JulioNIB :)

 

Good luck


yoloman
  • yoloman

    Crackhead

  • Members
  • Joined: 21 Jul 2014
  • None

#41

Posted 13 September 2015 - 02:59 PM

Another example: SCO Loader!

 

Add this to "Scripting.h" or download my files (first post):

static u32 StartNewScript(const ch *scriptName, u32 stacksize) { return NativeInvoke::Invoke<NATIVE_START_NEW_SCRIPT, u32>(scriptName, stacksize); }

C++ SCO Loader:

void SKP::skpp(const char *printText, u32 printTime, b8 printWait)
{
	PrintStringWithLiteralStringNow("STRING", printText, printTime, 1);
	if (printWait == 1) { Wait(printTime); }
}


bool SKP::SCO_Loader(int sco_num1toX, const ch *sco_name, u32 sco_stacksize_0, b8 sco_info, u32 sco_wait)
{
	// Copy your own SCO scripts into "script.img"
	// -------------------------------------------
	// GTA IV	:	C:\Program Files (x86)\Rockstar Games\Grand Theft Auto IV\common\data\cdimages\script.img
	// TBOGT	:	C:\Program Files (x86)\Rockstar Games\EFLC\TBoGT\common\data\cdimages\script.img
	// TLAD		:	C:\Program Files (x86)\Rockstar Games\EFLC\TLAD\common\data\cdimages\script.img
	
	b8 sco_ok = 0;

	if ( (DoesScriptExist(sco_name)) && (sco_num1toX > 0) )
	{
		if (GetNumberOfInstancesOfStreamedScript(sco_name) == 0)
		{
			RequestScript(sco_name);
			while (!HasScriptLoaded(sco_name)) Wait(0);
			if (sco_num1toX == 1) { if (sco_stacksize_0 == 0) sco_stacksize_0 = 8192; }	// sco_stacksize_0 = 0 -> 8192 (first script)
			else if (sco_num1toX > 1) { if (sco_stacksize_0 == 0) sco_stacksize_0 = 1024; }	// sco_stacksize_0 = 0 -> 1024 (other scripts)
			u32 sco_scriptnum;
			sco_scriptnum = StartNewScript(sco_name, sco_stacksize_0);
			MarkScriptAsNoLongerNeeded(sco_name);
			if (sco_info == 1) 
			{
				char infotext[64];
				strncpy_s(infotext, "~COL_NET_3~'~COL_NET_4~ ", 26);
				strncat_s(infotext, sco_name, strlen(sco_name));
				strncat_s(infotext, " ~COL_NET_3~' loaded!", 22);
				skpp(infotext, 2000, 0);
			}
			sco_ok = 1;
		}
		else skpp("SCO Script already loaded!", 3000, 0);
	}
	else skpp("Unknown SCO Script or Number!", 3000, 0);

	if (sco_wait > 0) Wait(sco_wait);

	return sco_ok;
}

Hint: Never simply copy & paste! You must adapt this code to your own.

 

 

Usage:

SCO_Loader(1, "z_heliblock", 0, 1, 1000);
SCO_Loader(2, "z_traffic", 0, 1, 1000);
SCO_Loader(3, "z_worldprops", 0, 1, 1000);
SCO_Loader(4, "z_zombgen", 0, 1, 1000);

Note: All my scripts are for free use! Be fair: Please make a small credit like "Thanx to Skorpro" if you want to use them! Thanx :)

 

I have a few questions:

 

1.What to do with this code? Should I do it like in the first post with Visual C++ etc.?

 

2. What to edit in this code (Never simply copy and paste)? Should I edit *scriptName or something like that?

 

3.What to do with this:

 

Usage:

SCO_Loader(1, "z_heliblock", 0, 1, 1000);
SCO_Loader(2, "z_traffic", 0, 1, 1000);
SCO_Loader(3, "z_worldprops", 0, 1, 1000);
SCO_Loader(4, "z_zombgen", 0, 1, 1000);


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#42

Posted 25 September 2015 - 02:58 AM Edited by Skorpro, 25 September 2015 - 03:08 AM.

I have a few questions:

 

1.What to do with this code? Should I do it like in the first post with Visual C++ etc.?

 

2. What to edit in this code (Never simply copy and paste)? Should I edit *scriptName or something like that?

 

3.What to do with this:

 

Usage:

SCO_Loader(1, "z_heliblock", 0, 1, 1000);
SCO_Loader(2, "z_traffic", 0, 1, 1000);
SCO_Loader(3, "z_worldprops", 0, 1, 1000);
SCO_Loader(4, "z_zombgen", 0, 1, 1000);

1. Yes

2. & 3. Edit the CustomFiberThread.h (as an example!):

#pragma once

#include "../ScriptHook/ScriptThread.h"
#include "../ScriptHook/ScriptingEnums.h"
#include "../ScriptHook/ScriptingTypes.h"

#include <windows.h>
#include <string>
#include <iostream>
#include <cstdio>



class CustomFiberThread : 
	public ScriptThread
{
private:
	Scripting::Player GetPlayer();
	Scripting::Ped GetPlayerPed();

// SKORPRO FUNCTIONS
	void skpp(const char *printText, u32 printTime, b8 printWait);
	bool SCO_Loader(int sco_num1toX, const ch *sco_name, u32 sco_stacksize_0, b8 sco_info, u32 sco_wait);

protected:
    // We don't want a Tick based script, so we override RunScript.
	void RunScript();

public:
	CustomFiberThread();
};

...and the CustomFiberThread.cpp (as an example!):

#include "CustomFiberThread.h"
#include "Scripting.h"
#include "../ScriptHook/Log.h"

using namespace Scripting;
using namespace std;


CustomFiberThread::CustomFiberThread()
{
    // Give your own name here!
	SetName("SCOLoader");
}


// Some helper functions

Player CustomFiberThread::GetPlayer()
{
	Player playerIndex = ConvertIntToPlayerIndex(GetPlayerId());
	return playerIndex;
}


Scripting::Ped CustomFiberThread::GetPlayerPed()
{
	Ped ped;
	GetPlayerChar(GetPlayer(), &ped);
	return ped;
}


// --------------------------- !!!! GET KEYS FROM INI ! !!!! -------------------------------
int startKey = GetPrivateProfileIntA("Settings", "SCOLoaderKey", 123, "SCOLoader.ini"); // Key = F12
// --------------------------- !!!! GET KEYS FROM INI ! !!!! -------------------------------



//
// SKORPRO FUNCTIONS
//
void CustomFiberThread::skpp(const char *printText, u32 printTime, b8 printWait)
{
	PrintStringWithLiteralStringNow("STRING", printText, printTime, 1);
	if (printWait == 1) { Wait(printTime); }
}

bool CustomFiberThread::SCO_Loader(int sco_num1toX, const ch *sco_name, u32 sco_stacksize_0, b8 sco_info, u32 sco_wait)
{
	// Copy your own SCO scripts into "script.img"
	// -------------------------------------------
	// GTA IV	:	C:\Program Files (x86)\Rockstar Games\Grand Theft Auto IV\common\data\cdimages\script.img
	// TBOGT	:	C:\Program Files (x86)\Rockstar Games\EFLC\TBoGT\common\data\cdimages\script.img
	// TLAD		:	C:\Program Files (x86)\Rockstar Games\EFLC\TLAD\common\data\cdimages\script.img
	
	b8 sco_ok = 0;

	if ( (DoesScriptExist(sco_name)) && (sco_num1toX > 0) )
	{
		if (GetNumberOfInstancesOfStreamedScript(sco_name) == 0)
		{
			RequestScript(sco_name);
			while (!HasScriptLoaded(sco_name)) Wait(0);
			if (sco_num1toX == 1) { if (sco_stacksize_0 == 0) sco_stacksize_0 = 8192; }	// sco_stacksize_0 = 0 -> 8192 (first script)
			else if (sco_num1toX > 1) { if (sco_stacksize_0 == 0) sco_stacksize_0 = 1024; }	// sco_stacksize_0 = 0 -> 1024 (other scripts)
			u32 sco_scriptnum;
			sco_scriptnum = StartNewScript(sco_name, sco_stacksize_0);
			MarkScriptAsNoLongerNeeded(sco_name);
			if (sco_info == 1) 
			{
				char infotext[64];
				strncpy_s(infotext, "~COL_NET_3~'~COL_NET_4~ ", 26);
				strncat_s(infotext, sco_name, strlen(sco_name));
				strncat_s(infotext, " ~COL_NET_3~' loaded!", 22);
				skpp(infotext, 2000, 0);
			}
			sco_ok = 1;
		}
		else skpp("SCO Script already loaded!", 3000, 0);
	}
	else skpp("Unknown SCO Script or Number!", 3000, 0);

	if (sco_wait > 0) Wait(sco_wait);

	return sco_ok;
}


// MAIN FUNCTION
void CustomFiberThread::RunScript()
{
	// This is a fiber thread, so we use an loop to run the contents of this script.
	// The thread will terminate when we return from this function.

	while(IsThreadAlive())
	{
		// skpk is my "key" function... use your own one!
		if (skpk(startKey, 0, 0, 0)) // <F12>
		{
			SCO_Loader(1, SkorproReadString("Settings", "SCOScript", "Your_SCO_Script"), iStack, (b8)iInfo, 1000);
	
			Wait(200);
		}
		else if (skpk(startKey, 1, 0, 0)) // <Shift> + <F12>
		{
			TerminateAllScriptsWithThisName(SkorproReadString("Settings", "SCOScript", "Your_SCO_Script"));
			skpp("SCO Script '~g~", SkorproReadString("Settings", "SCOScript", "Your_SCO_Script"), "~w~' disabled!", "", 2500, 0);

			Wait(200);
		}

		Wait(0);
	}
}

Your_SCO_Script is the SCO script you want to load -> SCO script name without ".sco"!

 

C ya :)

 

 

EDIT: Or download this ASI example (don't forget to edit the INI here "SCOScript=scriptmgr").


yoloman
  • yoloman

    Crackhead

  • Members
  • Joined: 21 Jul 2014
  • None

#43

Posted 05 November 2015 - 06:00 PM

Does this Sco Loader support Scripts which shold be saved? Cuz I've an Sco script which should save the progress in it and it's not working fully. When I disable it and enable it again with your Sco loader then I see the that it saved the changes. But when I save whole game after the script was saved and load the script again the stats are again from beginning...So I don't know if the problem is on the script itself or the Sco loader...(if you want I can post the code in here) 


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#44

Posted 14 November 2015 - 05:07 AM

Does this Sco Loader support Scripts which shold be saved? Cuz I've an Sco script which should save the progress in it and it's not working fully. When I disable it and enable it again with your Sco loader then I see the that it saved the changes. But when I save whole game after the script was saved and load the script again the stats are again from beginning...So I don't know if the problem is on the script itself or the Sco loader...(if you want I can post the code in here) 

Hi,

as you see I'm rarely here... Anyway! You can post your script here, maybe someone has an idea... IMO the SCO Loader is ok, coz it loads simply a script without any preferences...


yoloman
  • yoloman

    Crackhead

  • Members
  • Joined: 21 Jul 2014
  • None

#45

Posted 29 December 2015 - 09:12 PM

For some reason i can't post the whole script without getting an runtime error on this site (maybe script is too long) but I post the important part which should be for saving the script:

 

 

// saved progress with unused stats
void SavedProgress(void)
{
float Sa, Sb, Sc, Sd;
float Se, Sf, Sg, Sh;
float Si, Sj, Sk, Sl;
Sa = GET_FLOAT_STAT(121);
Sb = GET_FLOAT_STAT(122);
Sc = GET_FLOAT_STAT(123);
Sd = GET_FLOAT_STAT(124);
Se = GET_FLOAT_STAT(125);
Sf = GET_FLOAT_STAT(126);
Sg = GET_FLOAT_STAT(127);
Sh = GET_FLOAT_STAT(128);
Si = GET_FLOAT_STAT(129);
Sj = GET_FLOAT_STAT(130);
Sk = GET_FLOAT_STAT(131);
Sl = GET_FLOAT_STAT(132);
if(Sa == 100.0)
{
FLASH_BLIP(bbase[0], FALSE);
CHANGE_BLIP_COLOUR(bbase[0], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[0], "territory occupied");
baseaInt = 3;
}
if(Sb == 100.0)
{
FLASH_BLIP(bbase[1], FALSE);
CHANGE_BLIP_COLOUR(bbase[1], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[1], "territory occupied");
basebInt = 3;
}
if(Sc == 100.0)
{
FLASH_BLIP(bbase[2], FALSE);
CHANGE_BLIP_COLOUR(bbase[2], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[2], "territory occupied");
basecInt = 3;
}
if(Sd == 100.0)
{
FLASH_BLIP(bbase[3], FALSE);
CHANGE_BLIP_COLOUR(bbase[3], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[3], "territory occupied");
basedInt = 3;
}
if(Se == 100.0)
{
FLASH_BLIP(bbase[4], FALSE);
CHANGE_BLIP_COLOUR(bbase[4], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[4], "territory occupied");
baseeInt = 3;
}
if(Sf == 100.0)
{
FLASH_BLIP(bbase[5], FALSE);
CHANGE_BLIP_COLOUR(bbase[5], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[5], "territory occupied");
basefInt = 3;
}
if(Sg == 100.0)
{
FLASH_BLIP(bbase[6], FALSE);
CHANGE_BLIP_COLOUR(bbase[6], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[6], "territory occupied");
basegInt = 3;
}
if(Sh == 100.0)
{
FLASH_BLIP(bbase[7], FALSE);
CHANGE_BLIP_COLOUR(bbase[7], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[7], "territory occupied");
basehInt = 3;
}
if(Si == 100.0)
{
FLASH_BLIP(bbase[8], FALSE);
CHANGE_BLIP_COLOUR(bbase[8], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[8], "territory occupied");
baseiInt = 3;
}
if(Sj == 100.0)
{
FLASH_BLIP(bbase[9], FALSE);
CHANGE_BLIP_COLOUR(bbase[9], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[9], "territory occupied");
basejInt = 3;
}
if(Sk == 100.0)
{
FLASH_BLIP(bbase[10], FALSE);
CHANGE_BLIP_COLOUR(bbase[10], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[10], "territory occupied");
basekInt = 3;
}
if(Sl == 100.0)
{
FLASH_BLIP(bbase[11], FALSE);
CHANGE_BLIP_COLOUR(bbase[11], 4);
CHANGE_BLIP_NAME_FROM_ASCII(bbase[11], "territory occupied");
baselInt = 3;
}
}
 
void main(void)
{
        THIS_SCRIPT_SHOULD_BE_SAVED();
MapSettings();
SavedProgress();
while (TRUE)
{
WAIT(0);
GetTime();
ManageBoss();
ManageBossB();
ManageGang();
ManageCar();
ManageDriver();
ManageDB();
CancelRestart();
DeathReset();
CopAway();
BaseLogic();
BaseA();
BaseB();
BaseC();
BaseD();
BaseE();
BaseF();
BaseG();
BaseH();
BaseI();
BaseJ();
BaseK();
BaseL();
WarWaves();
HitmanD();
                DisableGWm();
}
}

Zolika1351
  • Zolika1351

    Ladies, hide your titties!

  • Members
  • Joined: 16 Jun 2014
  • Hungary

#46

Posted 28 August 2017 - 02:02 PM

 

-snip-

-snip-

 

EDIT: Or download this ASI example (don't forget to edit the INI here "SCOScript=scriptmgr").

 

Sorry for the 2 year bump, but could you make that example support multiple SCOs at once? I want to load a protection sco, but also I want to load an sco which requests some models that I need. (RequestModel broken on 1.0.8.0). Please I really need this.


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#47

Posted 29 August 2017 - 12:26 AM

 

 

-snip-

-snip-

 

EDIT: Or download this ASI example (don't forget to edit the INI here "SCOScript=scriptmgr").

 

Sorry for the 2 year bump, but could you make that example support multiple SCOs at once? I want to load a protection sco, but also I want to load an sco which requests some models that I need. (RequestModel broken on 1.0.8.0). Please I really need this.

 

You lucky guy... this is my first visit since months here!

 

Ok, I'm not active anymore, GTA IV was deleted in 2015 and I have no experience with the 1.0.8.0 update!

Anyway, I will try to help you.

 

Try this code:

// MAIN FUNCTION
void CustomFiberThread::RunScript()
{
	// This is a fiber thread, so we use an loop to run the contents of this script.
	// The thread will terminate when we return from this function.

	while(IsThreadAlive())
	{
		// skpk is my "key" function... use your own one!
		if (skpk(startKey, 0, 0, 0)) // <F12>
		{
			SCO_Loader(1, "Your_SCO_Script_1", 0, 0, 1000);
			SCO_Loader(2, "Your_SCO_Script_2", 0, 0, 1000);
			SCO_Loader(3, "Your_SCO_Script_3", 0, 0, 1000);
			SCO_Loader(4, "Your_SCO_Script_4", 0, 1, 1000);
	
			Wait(200);
		}
		else if (skpk(startKey, 1, 0, 0)) // <Shift> + <F12>
		{
			TerminateAllScriptsWithThisName("Your_SCO_Script_1");
			TerminateAllScriptsWithThisName("Your_SCO_Script_2");
			TerminateAllScriptsWithThisName("Your_SCO_Script_3");
			TerminateAllScriptsWithThisName("Your_SCO_Script_4");
			skpp("All Custom SCO Script ~r~removed!", 2500, 0);

			Wait(200);
		}

		Wait(0);
	}
}

Maybe this is interesting for you:

Ultimate ASI Loader v4.17 by ThirteenAG

XLivelessAddon by ThirteenAG

 

or read s.t. about Scocl:

Scocl by Alexander Blade

How to use source codes (Scocl) by me (Skorpro)

...and this part

 

Sorry my friend, but this is the only help you can get from me :(

Good luck!

 

Skorpro


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#48

Posted 29 August 2017 - 12:33 AM Edited by Skorpro, 29 August 2017 - 12:38 AM.

-dump-





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users