Quantcast

Jump to content

» «
Photo

Vice city Guards cleo script problem

Best Answer Atreedee, A week ago

Finally fixed it! The problem was that I thought the ordering of gangs in code started from 0 so I thought the vercettis are gang6. Just found out they're gang7. Thank you, Sanmodder, for trying to help! Go to the full post


6 replies to this topic
Atreedee
  • Atreedee

    Player Hater

  • Members
  • Joined: 20 Nov 2016
  • Egypt

#1

Posted A week ago Edited by Atreedee, A week ago.

Hi everyone,
So I downloaded this mod that spawns bodyguards at the mansion. I thought that I could make use of it so the guards help me in missions such as Keep Your Friends Close, so I changed their type from Civmale to Gang6 and removed the ability to tie them to the player. The thing worked and they help me kill other gang members in missions but the problem is they also kill Vercetti gang members and they shoot me if I sell ice creams near them. How can I change them so they won't kill my gang members or shoot me while selling ice creams?
This is the code after I edited it.

Also, what does  "0319: set_actor [email protected] running 1" do?

{$CLEO .cs}

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

:NONAME_2
wait 250 
if and
   Player.Defined($PLAYER_CHAR)
00F5:   player $PLAYER_CHAR 0 -388.1082 -583.2788 26.15488 radius 20.0 20.0 4.0 
else_jump @NONAME_2 
jump @NONAME_67 

:NONAME_67
wait 0 
Model.Load(#PGB)
Model.Load(356)
jump @NONAME_87 

:NONAME_87
if and
   Model.Available(#PGB)
   Model.Available(356)
else_jump @NONAME_67 
jump @NONAME_114 

:NONAME_114
[email protected] = Actor.Create(Gang6, #PGB, -375.0723, -582.5458, 25.3204)
Actor.Angle([email protected]) = 2.9452
01B2: give_actor [email protected] weapon 26 ammo 9999 // Load the weapon model before using this 
0319: set_actor [email protected] running 1 
Actor.Health([email protected]) = 100
02E2: set_actor [email protected] weapon_accuracy_to 100 
01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 0 
03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 0 
Model.Destroy(#PGB)
Model.Destroy(356)
jump @NONAME_216 

:NONAME_216
wait 50 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @NONAME_2 
if 
00F5:   player $PLAYER_CHAR 0 -388.1082 -583.2788 26.15488 radius 1.0 1.0 2.0 
else_jump @NONAME_216 
jump @NONAME_291 

:NONAME_291
wait 0 
if 
   Actor.Dead([email protected])
else_jump @NONAME_318 
jump @NONAME_2 

:NONAME_318
wait 0 
else_jump @NONAME_291 
jump @NONAME_336 

:NONAME_336
wait 0 
Actor.RemoveReferences([email protected])
jump @NONAME_2 


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#2

Posted A week ago

 

Hi everyone,
So I downloaded this mod that spawns bodyguards at the mansion. I thought that I could make use of it so the guards help me in missions such as Keep Your Friends Close, so I changed their type from Civmale to Gang6 and removed the ability to tie them to the player. The thing worked and they help me kill other gang members in missions but the problem is they also kill Vercetti gang members and they shoot me if I sell ice creams near them. How can I change them so they won't kill my gang members or shoot me while selling ice creams?
This is the code after I edited it.

Also, what does  "0319: set_actor [email protected] running 1" do?

{$CLEO .cs}

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

:NONAME_2
wait 250 
if and
   Player.Defined($PLAYER_CHAR)
00F5:   player $PLAYER_CHAR 0 -388.1082 -583.2788 26.15488 radius 20.0 20.0 4.0 
else_jump @NONAME_2 
jump @NONAME_67 

:NONAME_67
wait 0 
Model.Load(#PGB)
Model.Load(356)
jump @NONAME_87 

:NONAME_87
if and
   Model.Available(#PGB)
   Model.Available(356)
else_jump @NONAME_67 
jump @NONAME_114 

:NONAME_114
[email protected] = Actor.Create(Gang6, #PGB, -375.0723, -582.5458, 25.3204)
Actor.Angle([email protected]) = 2.9452
01B2: give_actor [email protected] weapon 26 ammo 9999 // Load the weapon model before using this 
0319: set_actor [email protected] running 1 
Actor.Health([email protected]) = 100
02E2: set_actor [email protected] weapon_accuracy_to 100 
01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 0 
03BF: set_player $PLAYER_CHAR ignored_by_everyone_to 0 
Model.Destroy(#PGB)
Model.Destroy(356)
jump @NONAME_216 

:NONAME_216
wait 50 
if 
   Player.Defined($PLAYER_CHAR)
else_jump @NONAME_2 
if 
00F5:   player $PLAYER_CHAR 0 -388.1082 -583.2788 26.15488 radius 1.0 1.0 2.0 
else_jump @NONAME_216 
jump @NONAME_291 

:NONAME_291
wait 0 
if 
   Actor.Dead([email protected])
else_jump @NONAME_318 
jump @NONAME_2 

:NONAME_318
wait 0 
else_jump @NONAME_291 
jump @NONAME_336 

:NONAME_336
wait 0 
Actor.RemoveReferences([email protected])
jump @NONAME_2 

you must erase acquaintance with them
exactly this hate player, combine something from this

0243: set_actor 15 @ ped_stats_to 16
011A: set_actor 15 @ search_threat 65536
011A: set_actor 15 @ search_threat 64
011A: set_actor 15 @ search_threat 1048576
0291: set_actor 15 @ attack_when_provoked 1
01ED: clear_actor 15 @ threat_search
011A: set_actor 15 @ search_threat 64


Atreedee
  • Atreedee

    Player Hater

  • Members
  • Joined: 20 Nov 2016
  • Egypt

#3

Posted A week ago Edited by Atreedee, A week ago.

I added 

0243: set_actor [email protected] ped_stats_to 16
01ED: clear_actor [email protected] threat_search
011A: set_actor [email protected] search_threat 1048576
011A: set_actor [email protected] search_threat 64
011A: set_actor [email protected] search_threat 65536
0291: set_actor [email protected] attack_when_provoked 1

Now they just stand there doing absolutely nothing.

I also tried adding

011A: set_actor [email protected] search_threat 128
011A: set_actor [email protected] search_threat 256
011A: set_actor [email protected] search_threat 512
011A: set_actor [email protected] search_threat 1024
011A: set_actor [email protected] search_threat 2048
011A: set_actor [email protected] search_threat 4096

The guards kill other gang members but also try to kill themselves. Vercetti gang members try to kill them too when they see them shooting.

 

I tried removing 

0291: set_actor [email protected] attack_when_provoked 1

It ended up with the same result.

 

Then I tried removing 

011A: set_actor [email protected] search_threat 1048576
011A: set_actor [email protected] search_threat 65536

to end up with the same result.

 

Then I tried removing 

0243: set_actor [email protected] ped_stats_to 16

Still same result.

 

I tried adding 

0243: set_actor [email protected] ped_stats_to 12

and it's still the same result.

I am really confused.


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#4

Posted A week ago

I added 

0243: set_actor [email protected] ped_stats_to 16
01ED: clear_actor [email protected] threat_search
011A: set_actor [email protected] search_threat 1048576
011A: set_actor [email protected] search_threat 64
011A: set_actor [email protected] search_threat 65536
0291: set_actor [email protected] attack_when_provoked 1

They don't shoot me while selling ice cream anymore, but they still kill Vercetti gang members.

 

see in main scm
or check in ped.dat

and you have to change what I gave you
hate or like you know
me gta vice city does not work I do not have how to check :)


Atreedee
  • Atreedee

    Player Hater

  • Members
  • Joined: 20 Nov 2016
  • Egypt

#5

Posted A week ago

Sorry, I had made mistakes in my post and I've edited it.


Sanmodder
  • Sanmodder

    Fan script

  • Members
  • Joined: 11 Sep 2017
  • Poland

#6

Posted A week ago

Sorry, I had made mistakes in my post and I've edited it.

you have sanny builder path Sanny Builder 3 \ data \ vc \ opcodes.txt
see all opcode :)


Atreedee
  • Atreedee

    Player Hater

  • Members
  • Joined: 20 Nov 2016
  • Egypt

#7

Posted A week ago   Best Answer Edited by Atreedee, A week ago.

Finally fixed it! The problem was that I thought the ordering of gangs in code started from 0 so I thought the vercettis are gang6. Just found out they're gang7. Thank you, Sanmodder, for trying to help!
  • Sanmodder likes this




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users