Today I Am Gonna show you how to make CUSTOMIZED PEDS
Like Bodyguards and Enemies
So We Start Here
in public make a key event handler (just see it in other tuotrials)
so :D
ENEMY:
----------------------------------------------------------------------------------------
if (Keys.E == e.Key)
{
Model specificped = "m_m_busdriver"; //Declaring a specific ped
Ped p = World.CreatePed(specificped, Player.Character.Position.Around(3f)); // creating a ped
p.Task.FightAgainst(Player.Character); // making him enemy
Game.DisplayText("ENEMY CREATED");//displaying text
p.Weapons.Select(Weapon.Handgun_DesertEagle);//weapon selecting
p.Weapons.AnyHandgun.Ammo = 100;
p.BlockWeaponSwitching = true;
p.WantedByPolice = true;
p.WillUseCarsInCombat = true;
Player.Character.Weapons.Select(Weapon.Handgun_DesertEagle);
p.AlwaysDiesOnLowHealth = true;
p.CowerInsteadOfFleeing = true;
Blip bl = p.AttachBlip();//ataching a blip and etc.
bl.Color = BlipColor.Purple;
p.Health = 2000;
p.MaxHealth = 2000;
if (p.isDead)
{
bl.Delete();
}
}
----------------------------------------------------------------------------------------
Now Bodyguard
----------------------------------------------------------------------------------------
if (Keys.H == e.Key)
{
Ped Robin= World.CreatePed(Player.Character.Position.Around(3f));
Robin.ChangeRelationship(RelationshipGroup.Player, Relationship.Companion);
Game.DisplayText("Robin For Help");
Robin.BlockWeaponSwitching = true;
Robin.AlwaysDiesOnLowHealth = true;
Robin.Weapons.Select(Weapon.Melee_PoolCue);
Robin.CowerInsteadOfFleeing = true;
Robin.DuckWhenAimedAtByGroupMember = true;
Blip bl = Robin.AttachBlip();
bl.Color = BlipColor.LightRed;
if (Robin.isDead)
{
bl.Delete();
}
Robin.Health = 500;
}
----------------------------------------------------------------------------------------
EVERYTHING WAS SOMEWHAT SAME!
Thank You Until Next Time ;)
Like Bodyguards and Enemies
So We Start Here
in public make a key event handler (just see it in other tuotrials)
so :D
ENEMY:
----------------------------------------------------------------------------------------
if (Keys.E == e.Key)
{
Model specificped = "m_m_busdriver"; //Declaring a specific ped
Ped p = World.CreatePed(specificped, Player.Character.Position.Around(3f)); // creating a ped
p.Task.FightAgainst(Player.Character); // making him enemy
Game.DisplayText("ENEMY CREATED");//displaying text
p.Weapons.Select(Weapon.Handgun_DesertEagle);//weapon selecting
p.Weapons.AnyHandgun.Ammo = 100;
p.BlockWeaponSwitching = true;
p.WantedByPolice = true;
p.WillUseCarsInCombat = true;
Player.Character.Weapons.Select(Weapon.Handgun_DesertEagle);
p.AlwaysDiesOnLowHealth = true;
p.CowerInsteadOfFleeing = true;
Blip bl = p.AttachBlip();//ataching a blip and etc.
bl.Color = BlipColor.Purple;
p.Health = 2000;
p.MaxHealth = 2000;
if (p.isDead)
{
bl.Delete();
}
}
----------------------------------------------------------------------------------------
Now Bodyguard
----------------------------------------------------------------------------------------
if (Keys.H == e.Key)
{
Ped Robin= World.CreatePed(Player.Character.Position.Around(3f));
Robin.ChangeRelationship(RelationshipGroup.Player, Relationship.Companion);
Game.DisplayText("Robin For Help");
Robin.BlockWeaponSwitching = true;
Robin.AlwaysDiesOnLowHealth = true;
Robin.Weapons.Select(Weapon.Melee_PoolCue);
Robin.CowerInsteadOfFleeing = true;
Robin.DuckWhenAimedAtByGroupMember = true;
Blip bl = Robin.AttachBlip();
bl.Color = BlipColor.LightRed;
if (Robin.isDead)
{
bl.Delete();
}
Robin.Health = 500;
}
----------------------------------------------------------------------------------------
EVERYTHING WAS SOMEWHAT SAME!
Thank You Until Next Time ;)
No comments:
Post a Comment