Jump to content

Let Cops attack "Ped"


ZeroFoxtrot

Recommended Posts

How do I let the police, noose any law enforcement agency attack "Ped"?

 

This is Ped

 

If exists(ped) AndAlso ped.isrequiredformission = False AndAlso Ped.RelationshipGroup = RelationshipGroup.Player = False AndAlso ped.isinvehicle = False AndAlso ped.pedtype = pedtype.civmale = True AndAlso ped.isalive = True AndAlso ped.RelationshipGroup = relationshipgroup.dealer = False AndAlso ped.RelationshipGroup = relationshipgroup.medic = False AndAlso ped.isonscreen = False AndAlso ped.RelationshipGroup = relationshipgroup.criminal = False Then

If Player.Character.Position.DistanceTo(Ped.Position) >= 10.0F Then

Ped.CancelAmbientSpeech()

ped.weapons.removeall()

ped.senserange = 4.0

Ped.WillUseCarsInCombat = False

Ped.AlwaysDiesOnLowHealth = True

Ped.WantedByPolice = True

'ped.SetPathfinding(True, True, True)

ped.enemy = True

'ped.Accuracy = 100

ped.maxhealth = 300

ped.Health = 300

Ped.Money = 0

ped.RelationshipGroup = relationshipgroup.dealer

'ped.ChangeRelationship(relationshipgroup.Civillian_male, relationship.hate)

ped.ChangeRelationship(relationshipgroup.fireman, relationship.hate)

ped.ChangeRelationship(relationshipgroup.medic, relationship.hate)

ped.ChangeRelationship(relationshipgroup.dealer, relationship.companion)

ped.ChangeRelationship(relationshipgroup.cop, relationship.hate)

ped.ChangeRelationship(relationshipgroup.criminal, relationship.companion)

'ped.ChangeRelationship(relationshipgroup.Civillian_Female, relationship.Hate)

ped.ChangeRelationship(relationshipgroup.player, relationship.companion)

Ped.Voice = "M_ZOMBIE"

ped.task.FightAgainstHatedTargets(30.0F)

ZombieBehaviour(ped)

ZombieBehaviour2(ped)

Moaningpeds(ped)

Link to comment
Share on other sites

The way i had to code the mod, the way i found to make it work, requires the zombies to 'like' you so they don't run away. That being said, I had to code specific bodyguards to attack said zombies. That is why outside trainers don't work. The games body guards attack 'enemies' or 'combatants'. So you'd have to code your bodyguards to

ped.ChangeRelationship(relationshipgroup.dealer, relationship.Hate)

to attack zombies. But since you opened it up and looked at the code, if you want just change the bodyguards to "M_Y_SWAT" and they will all spawn as NOOSE.

Link to comment
Share on other sites

Well I managed to get cops attacking zombies by setting them a wanted level but they don't appear to have any weapons so the cops attack them with their fists, lol. Any idea how to fix this?

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Looks like you guys are the ones i need to talk to about creating the factions for the mod im trying to make.

basically im trying to create a few ped groups for the snyndicate wars mod im building.

 

THE unguided:

A psychotic anarchist punk gang who will shoot @ police and randomly kill peds for fun alongside any other criminal acts i can make they commit. but will also shoot @ me and my 3 cyborg Agent bodyguards.

they will be on foot and use motorcycles and will be based on the lost & dammed & the angels of death biker gangs models i will mod.

 

Rival agents:

heavily armoured & very well equipped Cyborg agents from rival corporations that will shoot me on sight and can also be attacked by the unguided. they will be mostly on foot but can use any 4 wheel vehicle they wish.

 

Police:

not sure if I want the police to try to arrest and attack the unguided on sight or just act normal until fired upon, but i certainly want them to attack both the unguided and rival agents if they pose a threat to either themselves or the public. Or get caught firing upon me or johnny public first.

 

I admit ive been mostly doing player & ped models and got most up & running so coding is not my strong point but i do have some ped tools like NEEDLE.

 

any advice you can offer on how this should work would be much appreciated.

 

for the mod im going to use TBOGT as it has the best selection of weapons and vehicles to date. and its also what i have.

 

from the sound of it making a ped a dealer makes him hostile to me and police?

Edited by AlphaWolF_J
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.