Quantcast

Jump to content

» «
Photo

[VC] Stop police from spawning. Possible?

9 replies to this topic
KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#1

Posted 26 April 2014 - 12:40 AM

Trying to make a zombie themedmod for my own use. One issue I have is cops still spawn.Is it possible to stop this? Also, anyway to prevent firetrucks/ambulances from spawning?

Jack...
  • Jack...

    Wanted Level modifications

  • Members
  • Joined: 06 Dec 2011
  • Serbia

#2

Posted 26 April 2014 - 06:56 PM

Opcodes you're going to need:

01F0: set_max_wanted_level_to 0                    // cops won't attack
01F7: set_player $PLAYER_CHAR ignored_by_cops_state_to 1    // cops ignoring the player
Use the next 3 for removing ambulance and firetruck:
05F0: 3@ = random_vehicle_near_point 0@ 1@ 2@ in_radius 10.0 find_next 0 pass_wrecked 1
0137:   car 3@ id == #AMBULANCE    // conditional check
00A6: destroy_car 3@
For cops patroling the street use the next 3:
05EF: 4@ = random_actor_near_point 0@ 1@ 2@ in_radius 10.0 find_next 0 pass_deads 1 //IF and SET
02F2:   actor 4@ model == #COP
009B: destroy_actor_instantly 4@

KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#3

Posted 27 April 2014 - 12:43 AM Edited by KJMarket, 27 April 2014 - 04:58 AM.

This is Vice City. 05EF and 05F0 don't exist for VC. There is 02DD: get_random_actor $6711 in_zone 'VICE_C' 1 1 1, but I haven't figured out a way of determining the zone you are in. Not sure about the ambulance/firetruck removal. There is 053E: $2471 = get_random_car_with_actors -1 in_area $2657 $2658 $445 $446, but I don't know if this is what I'd need. Haven't tried using it as of yet.

EDIT - Was looking at a post about getting nearest peds using memory addy's. It was in SA though.Any way to do that in VC?

Jack...
  • Jack...

    Wanted Level modifications

  • Members
  • Joined: 06 Dec 2011
  • Serbia

#4

Posted 27 April 2014 - 08:43 AM Edited by Jack..., 27 April 2014 - 08:46 AM.

05EF and 05F0 are CLEO3 opcodes. Do you have CLEO for VC installed? If yes you may also use this for a cop removal:

{$CLEO}
0000: 
 
REPEAT
    wait 250
UNTIL 0256:   player $PLAYER_CHAR defined    
 
WHILE TRUE 
    wait 0
    04C4: create_coordinate 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset -1500.0 -1500.2 0.0    // X1 Y1 Z1
    04C4: create_coordinate 4@ 5@ 6@ from_actor $PLAYER_ACTOR offset 1500.0 1500.2 100.0    // X2 Y2 Z2
    0469: get_random_cop 0@ in area 1@ 2@ 4@ 5@ unknown 1 0 0 0 0      // X1 Y1 X2 Y2 - rectangle area around the player
    IF
        8039:   not   0@ == -1 // is cop in a rectangle area?
    THEN
    009B: destroy_actor_instantly 0@    
    END
END
Similar scrypt can be made by 053E (slightly diferent).
Memory addresses are better way but I don't have them.

KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#5

Posted 28 April 2014 - 12:04 AM

I have the newest version of sanny builder, and the version of Cleo it comes with. And again sanny says one of those opcodes isn't right.
0469: create_actor $4118 in_area -919.5 -329.8 -901.5 -351.45 unknown 0 1 0 0 0. Thats what sanny gives for that opcode so Im confused. I'm not a total newbie, and can grasp a lot of this code, it's just my sanny doesn't agree with me on opcodes. Any suggestions?

Jack...
  • Jack...

    Wanted Level modifications

  • Members
  • Joined: 06 Dec 2011
  • Serbia

#6

Posted 28 April 2014 - 11:13 AM

The words inside the opcode doesn't acually do anything. They're just explaining what the opcode is doing.
Update your VICESCM.ini file because you're missing some opcodes. 
Here's your code:
{$CLEO}
0000: HANDLE 
 
REPEAT
    wait 250
UNTIL 0256:   player $PLAYER_CHAR defined   
01F0: set_max_wanted_level_to 0 
 
WHILE TRUE 
WHILE TRUE 
    wait 0
    0469: get_random_cop 0@ in area -1755.3246 -1757.3043 877.5198 1172.8341 COP 1 SWAT 0 FBI 0 ARMY 0 VICE 0  // the whole city rectangle 
    IF
        8039:   not   0@ == -1 // is cop in a city?
    THEN
    009B: destroy_actor_instantly 0@ 
BREAK
    ELSE
BREAK   
    END
END
 
WHILE TRUE 
    wait 0 
    0054: store_player $PLAYER_CHAR position_to 1@ 2@ 3@
    IF
        05F0: 4@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 700.0 find_next 0 pass_wrecked 1 //IF and SET
    THEN
        REPEAT
            IF OR 
                0137:   car 4@ id == #AMBULAN 
                0137:   car 4@ id == #FIRETRUK                
            THEN
            00A6: destroy_car 4@ 
        BREAK
            ELSE
        BREAK        
            END
        UNTIL 85F0:   not   4@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 700.0 find_next 1 pass_wrecked 1 //IF and SET 
BREAK
    END
END  
END

KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#7

Posted 28 April 2014 - 06:05 PM

Do you meanVCSCM.ini in the sannybuilder 3 data/vcfolder?

Jack...
  • Jack...

    Wanted Level modifications

  • Members
  • Joined: 06 Dec 2011
  • Serbia

#8

Posted 28 April 2014 - 06:15 PM

Yes. But if you downloaded and installed CLEO setup for VC then I don't no why those CLEO 3 opcodes aren't working.

Are they visible in Sanny Builder-tools-IDE tools-opcode search?


KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#9

Posted 28 April 2014 - 06:19 PM

Nope. Hmm

KJMarket
  • KJMarket

    Player Hater

  • Members
  • Joined: 29 Jul 2008
  • None

#10

Posted 28 April 2014 - 08:00 PM

Seems re-installing Cleo for vice for the umpteenth time made it work. Weird.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users