Quantcast

Jump to content

» «
Photo

[Q] Is there any way to disable wanted level system?

wanted level system disable
10 replies to this topic
123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#1

Posted 08 September 2013 - 09:21 AM

I usually use SNT to get "Never wanted" function. But I want to write a code that just disable the whole wanted level system, that means my pc don't need to check the wanted level and clear 'em every milliseconds.


julionib
  • julionib

    Coder

  • Feroci
  • Joined: 13 Sep 2012
  • Brazil

#2

Posted 09 September 2013 - 12:02 AM

i didnt tested this idea, but i guess that you can set max wanted level to 0 using:

 

SET_MAX_WANTED_LEVEL

http://www.gtamoddin...AX_WANTED_LEVEL


123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#3

Posted 09 September 2013 - 11:28 AM Edited by 123iamking, 09 September 2013 - 11:28 AM.

i didnt tested this idea, but i guess that you can set max wanted level to 0 using:

 

SET_MAX_WANTED_LEVEL

http://www.gtamoddin...AX_WANTED_LEVEL

after that native function didn't work, I decide to post this help topic. Is there any way to get that work? Thanks :)


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#4

Posted 12 September 2013 - 11:15 PM Edited by Skorpro, 12 September 2013 - 11:21 PM.

Hi, 

I have used this C++ code in my NoPolice (Mod Pack Vol.1) mod!

while(IsThreadAlive())
{
	ClearWantedLevel(GetPlayer());
	SetMaxWantedLevel(0);
	SetWantedMultiplier(0.0f);
	TerminateAllScriptsWithThisName("ambairpotarea");
	TerminateAllScriptsWithThisName("ambbridgepatrol");
	TerminateAllScriptsWithThisName("ambunarea");
	TerminateAllScriptsWithThisName("vigilante");
	ClearWantedLevel(GetPlayer());

	Wait(100);
}

Have fun :)

  • Deadly Target likes this

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#5

Posted 22 September 2013 - 03:15 AM Edited by 123iamking, 22 September 2013 - 03:16 AM.

Hi, 

I have used this C++ code in my NoPolice (Mod Pack Vol.1) mod!

while(IsThreadAlive())
{
	ClearWantedLevel(GetPlayer());
	SetMaxWantedLevel(0);
	SetWantedMultiplier(0.0f);
	TerminateAllScriptsWithThisName("ambairpotarea");
	TerminateAllScriptsWithThisName("ambbridgepatrol");
	TerminateAllScriptsWithThisName("ambunarea");
	TerminateAllScriptsWithThisName("vigilante");
	ClearWantedLevel(GetPlayer());

	Wait(100);
}

Have fun :)

 

 

10X for replying, but Is there anyway to return to normal after this code running, you know, "recover the scripts" after "TerminateAllScriptsWithThisName"


Skorpro
  • Skorpro

    GTAholic

  • Members
  • Joined: 19 Jul 2009
  • Germany

#6

Posted 23 September 2013 - 07:12 AM

Of course :lol:  Simply use this:

 

C++ Code

// Global
b8 bPol = 0, bRep = 0;


while(IsThreadAlive())
{
	// Wanted on/off! #########
	if (GetKeyState(80) < 0)	// key8 P
	{
		if (bPol == 0)
		{
			PrintStringWithLiteralStringNow("STRING", "NoPolice Mod ON!", 2000, 1);
			ClearWantedLevel(GetPlayer());
			SetMaxWantedLevel(0);
			SetWantedMultiplier(0.0f);
			bPol = 1;
			bRep = 1;
		}
		else if (bPol == 1)
		{
			PrintStringWithLiteralStringNow("STRING", "NoPolice Mod OFF!", 2000, 1);
			SetMaxWantedLevel(6);
			SetWantedMultiplier(1.5f);
			bPol = 0;
			bRep = 0;
		}
		Wait(200);	// Kurze Pause für Keys!
	}
	if (bRep == 1)
	{
		TerminateAllScriptsWithThisName("ambairpotarea");
		TerminateAllScriptsWithThisName("ambbridgepatrol");
		TerminateAllScriptsWithThisName("ambunarea");
		TerminateAllScriptsWithThisName("vigilante");
		ClearWantedLevel(GetPlayer());
	}
}

You can use one bool (b8) but I needed two of them for my mod... ;)


123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#7

Posted 25 July 2014 - 05:35 AM

I'm working on this, and I found out something:

GTA.Native.Function.Call("Set_Max_Wanted_Level",0); completely useless, no matter what  number I set, the max wanted level still is 6; Even when I put it in a tick! Is there anyone can find this work?

GTA.Native.Function.Call("TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME", "ambairpotarea"); We have to call this each time we come to the Airport; if we don't, next time the script "ambairpotarea" will live again. (same with other areas)

GTA.Native.Function.Call("SET_WANTED_MULTIPLIER", 0); It works, but sometime the wanted level's still risen and have to use ("CLEAR_WANTED_LEVEL", Player.Index); set WANTED_MULTIPLIER to 1 to recover the wanted system.

 

I know that there is a way to completely disable Wanted system just in ONE call - no need to use tick; like this save game: http://www.gtagarage...how.php?id=7201


Jitnaught
  • Jitnaught

    ✰✰✰✰✰✰

  • Members
  • Joined: 24 Aug 2013
  • United-States

#8

Posted 25 July 2014 - 01:14 PM

This is just a complete guess, but maybe try to terminate 'policetest'.

123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#9

Posted 26 July 2014 - 06:30 AM Edited by 123iamking, 26 July 2014 - 06:39 AM.

This is just a complete guess, but maybe try to terminate 'policetest'.

Nope, that's script has nothing to do with Wanted Level system, plus disable wanted level system have no thing to do with determinate scripts. Determinate scripts is just a temporary solution, because when the Wanted level is disable like in the Never Wanted save game (link in the previous post), those scripts can't raise stars any more.

 

About the 4 scripts Skorpro determinate: "ambairpotarea", "ambbridgepatrol", "ambunarea", "vigilante".

I think only 2 scripts need to determinate: ambairpotarea ==> trouble at Airport, ambunarea ==> trouble at unarea

the other 2 no need to determinate: ambbridgepatrol ==> pay money at the bridge patrol, vigilante ==> the cop mission that only Niko can do.


123iamking
  • 123iamking

    Who am I?

  • Members
  • Joined: 21 Jan 2011
  • None

#10

Posted 30 July 2014 - 04:52 AM Edited by 123iamking, 30 July 2014 - 04:57 AM.

Ok, now I know the way to disable wanted level system, still can't do it

wanted = !wanted;
if(wanted)
{
g_U10983 = 1; // this is in tbogt ,in GTA4 (Niko) is g_U9942;
SET_MAX_WANTED_LEVEL( 6 );
}
else
{
g_U10983 = 0;
SET_MAX_WANTED_LEVEL( 0 );
CLEAR_WANTED_LEVEL( PlayerIndex);
}

g_U10983 is a R*'s bool value; I gonna call that bool value is the WC (wanted control) value. The code SET_MAX_WANTED_LEVEL is only working when that WC value is set to false. The problem is that WC value only set to false when R* want to set never wanted level. I have tested this in the mission Caught With Your Pants Down (tbogt): when Luis shoot the Tank's cable bolt, I can totally set the MAX WANTED LEVEL; but of course R* will set WC value to 1 when Luis have done shooting 4 bolt.

So I know how the Never wanted save game 's created, the author of that save game detected the loop hole that R* forgot to set the WC value to true in a mission.

Is there anybody know how to access the WC value? Plz reply to this forum.

Thanks for reading.


byteMe420
  • byteMe420

    allah akbar!

  • BUSTED!
  • Joined: 02 Jul 2014
  • United-States

#11

Posted 30 July 2014 - 02:50 PM Edited by byteMe420, 30 July 2014 - 02:54 PM.

u should do what skorpo says and if scripts restart after u leave the area and come back then u cant do it in one call and need to use a loop or tick to terminate the script when appropriate.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users