#1 14-12-2013 05:15

Registered: 14-12-2013
Posts: 1

Remove pedestrians, cars and missions of san andreas

I'd like to remove all the pedestrians, cars (excepting parked cars) and missions. I've used the opcodes 01EB and 03DE:

01EB: set_traffic_density_multiplier_to 0.0
03DE: set_pedestrians_density_multiplier_to 0.0

however, I don't know why, there's still some pedestrians and cars, these opcodes only reduce the level of traffic and pedestrians, and it doesn't remove them (or at least it doesn't work for me).

I want a "cleaned" san andreas, with no pedestrians walking or driving, no missions, no traffic, nothing, I just need the map and parked cars to make my mod. I've also tried to use the opcode 0395:

0395: clear_area 1 at 246.6274 63.7407 1003.641 radius 999.9

but, the problem is that I need to remove all pedestrians and create my own pedestrians around the player, and they'll attack me because that's a part of the mod, so clearing the area will remove my pedestrians too, and worse, default pedestrians and cars will reappear (even if I clear the area many times, they appear again and again), but mine don't reappear. If I need to modify main.scm, or another file, tell me what I have to change.

so, in summary, I need to delete all pedestrians, cars, missions, etc, get a cleaned san andreas where I can let my imagination and my sanny builder fly away, create my own pedestrians that will attack me, and continue with my mod.

Here's a part of the mod:

thread 'ATTACK' 
wait 0 
else_jump @ATTACK_19 
  $ONMISSION == 0 
else_jump @ATTACK_19
01EB: set_traffic_density_multiplier_to 0.0
03DE: set_pedestrians_density_multiplier_to 0.0
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
08E5: get_actor_in_sphere 0@ 1@ 2@ radius 7.0 handle_as 3@
05E2: AS_actor 3@ kill_actor $PLAYER_ACTOR
wait 0
jf @ATTACK_21
jump @ATTACK_20

I've used also these opcodes:

022B: create_forbidden_for_peds_cube_cornerA -3000.0 -3000.0 -100.0 cornerB 3000.0 3000.0 100.0  
01E8: create_forbidden_for_cars_cube_cornerA -3000.0 -3000.0 -100.0 cornerB 3000.0 3000.0 100.0
0395: clear_area 1 at 0.0 0.0 0.0 radius 10000.0

that worked, but if I delete all the pedestrians and the cars, the opcodes related to pedestrians doesn't work, like:

02DD: 0@ = get_random_ped_in_zone 'JEF' with_pedtype_civilian 1 gang 0 criminal/prostitute 0
0A3E: unknown_get_actor_in_sphere 1@ 2@ 3@ radius 1.5 13.0 1.5 handle_as 0@
0376: 18@ = create_random_actor_at -1576.88 55.26 8.57

I read in a post that if there's no peds, those opcodes won't work (and that's hilarious because I hadn't read that post before start codding the mod, and when I read it, all the opcodes that I used was in the list of peds opcodes that doesn't work if there's no pedestrians around).

So I decided to modify the game by modifying the .dat files of peds. In the ped.dat file, I put that every group of peds hate "PLAYER1", or "PLAYER", I didn't remember the name of the ped type that correspond to the CJ or the main player, but I tried with "PLAYER1" and "PLAYER" and nothing, everyone was walking around normally. So, how can I control the behavior of peds by modifying .dat files?

I tested the mod with pedestrians, and it worked, some peds appeared and attacked me, but there was still normal pedestrians walking around, and that's not what I want.

ah, and I want to create random peds around me or by zones, not in especific coordinates


Board footer

Powered by FluxBB