Quantcast

Jump to content

» «
Photo

Disabling script from main.scm with cleo

Best Answer frankandbeans, 3 weeks ago

Have you tried looking at the IMPND_L thread. That's the sniffer script that's always running and is responsible for loading the impnd script when CJ is near. It's probably relaunching the impnd script every time you try to kill it because CJ is still near.

 

Are you planning to edit main.scm or do everything with cleo? Maybe there's a way to disable impnd_l while at the same time you end impnd. Or at least put it to sleep for a while.

 

 

Added: Try $1522 = 1. It looks like this flag is used to disable the impound script during Toreno's Last Flight. You might be able to borrow it for your mod. This flag is set to 1 at the beginning of the mission and 2 at the end of the mission, and then reset to 0 by the impnd_l thread,

 

More: Never mind, it looks like $1522 only works on the SF impound. Maybe just shut down impnd_l and relaunch it when done. 

I was trying to avoid editing the main.scm (at least without using sannybuilder for the main.scm (personal preference as I like manual hex edits)) but I ended up just editing it through sannybuilder. I did notice that the impnd_l script keeps checking to see if (impound) script was loaded, so that's why it didn't work for me.

 

My goal was to add checks to the impnd script to see if the player was wearing the cop outfit, but I wanted to reload the entire modified impnd script through cleo instead. Regardless I got the script to work, just without cleo.

Go to the full post


3 replies to this topic
frankandbeans
  • frankandbeans

    Crackhead

  • Members
  • Joined: 27 Jul 2015
  • United-States

#1

Posted 3 weeks ago Edited by frankandbeans, 3 weeks ago.

I'm trying to disable the external script 71 (impound), but it's not working. Here's the opcodes I used:

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 

:NONAME_2
wait 0 
0AAA: [email protected] = thread 'IMPND' pointer 
if 
   not [email protected] == 0 
jf @NONAME_153 // jump @NONAME_2
0ABA: end_custom_thread_named 'IMPND'

:CIMPND
thread 'CIMPND' 

I also tried

0459: end_thread_named 'IMPND'

but no bueno.

 

edit: What I meant to say was that I am trying to use my own custom thread after deactivating 'IMPND' but the game keeps loading 'IMPND'


frankandbeans
  • frankandbeans

    Crackhead

  • Members
  • Joined: 27 Jul 2015
  • United-States

#2

Posted 3 weeks ago

I realized that I probably need to put the script on a loop, but then how do I introduce my custom thread? I want my custom thread to activate whenever the game calls for the 'IMPND' script instead, and not all the time. The loop:

{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 

:NONAME_2
wait 0 
0AAA: [email protected] = thread 'IMPND' pointer 
if 
   not [email protected] == 0 
else_jump @NONAME_2 
end_thread_named 'IMPND' 
jump @NONAME_2 


OrionSR
  • OrionSR

    Chain Game Development Team

  • Feroci
  • Joined: 23 May 2007
  • None
  • Helpfulness Award [GTA & Modding]

#3

Posted 3 weeks ago Edited by OrionSR, 3 weeks ago.

Have you tried looking at the IMPND_L thread. That's the sniffer script that's always running and is responsible for loading the impnd script when CJ is near. It's probably relaunching the impnd script every time you try to kill it because CJ is still near.

 

Are you planning to edit main.scm or do everything with cleo? Maybe there's a way to disable impnd_l while at the same time you end impnd. Or at least put it to sleep for a while.

 

 

Added: Try $1522 = 1. It looks like this flag is used to disable the impound script during Toreno's Last Flight. You might be able to borrow it for your mod. This flag is set to 1 at the beginning of the mission and 2 at the end of the mission, and then reset to 0 by the impnd_l thread,

 

More: Never mind, it looks like $1522 only works on the SF impound. Maybe just shut down impnd_l and relaunch it when done. 


frankandbeans
  • frankandbeans

    Crackhead

  • Members
  • Joined: 27 Jul 2015
  • United-States

#4

Posted 3 weeks ago   Best Answer Edited by frankandbeans, 3 weeks ago.

Have you tried looking at the IMPND_L thread. That's the sniffer script that's always running and is responsible for loading the impnd script when CJ is near. It's probably relaunching the impnd script every time you try to kill it because CJ is still near.

 

Are you planning to edit main.scm or do everything with cleo? Maybe there's a way to disable impnd_l while at the same time you end impnd. Or at least put it to sleep for a while.

 

 

Added: Try $1522 = 1. It looks like this flag is used to disable the impound script during Toreno's Last Flight. You might be able to borrow it for your mod. This flag is set to 1 at the beginning of the mission and 2 at the end of the mission, and then reset to 0 by the impnd_l thread,

 

More: Never mind, it looks like $1522 only works on the SF impound. Maybe just shut down impnd_l and relaunch it when done. 

I was trying to avoid editing the main.scm (at least without using sannybuilder for the main.scm (personal preference as I like manual hex edits)) but I ended up just editing it through sannybuilder. I did notice that the impnd_l script keeps checking to see if (impound) script was loaded, so that's why it didn't work for me.

 

My goal was to add checks to the impnd script to see if the player was wearing the cop outfit, but I wanted to reload the entire modified impnd script through cleo instead. Regardless I got the script to work, just without cleo.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users