Guest User

workingrecruit

a guest
Nov 23rd, 2017
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.38 KB | None | 0 0
  1. //////////////////// RECRUIT SQUADS
  2.  
  3.     void RecruitSquad1()
  4.     {
  5.         pedsGroup = World.GetNearbyPeds(player.Character, 5f);
  6.         Squad1Leader = pedsGroup[0];
  7.         Squad1Group = Function.Call<int>(Hash.CREATE_GROUP);
  8.  
  9.         Function.Call(GTA.Native.Hash.SET_GROUP_FORMATION, Squad1Group, 1);
  10.         Function.Call(GTA.Native.Hash.SET_GROUP_FORMATION_SPACING, Squad1Group, 1.0f, 1.0f, 1.0f);
  11.         if (Squad1Followplayer.Checked) { Squad1Followplayer.Checked = false; }
  12.         Squad1.Add(Squad1Leader);
  13.         Squad1GroupFix();
  14.  
  15.         foreach (Ped recruit in Squad1)
  16.         {
  17.             recruit.RelationshipGroup = Squad1RelationshipGroup;
  18.             Function.Call(Hash.SET_PED_SHOOT_RATE, recruit, 1000);
  19.             Function.Call(Hash.SET_PED_COMBAT_ABILITY, recruit, 100);
  20.            
  21.             if (recruit.CurrentBlip.Color != BlipColor.Blue)
  22.             {
  23.                 recruit.AddBlip();
  24.                 recruit.CurrentBlip.Color = BlipColor.Blue;
  25.                 recruit.CurrentBlip.Scale = 0.7f;
  26.                 SetBlipName(recruit.CurrentBlip, "Squad Member");
  27.                 PreparePed(recruit, MainWeaponSquad1, SecondaryWeaponSquad1);
  28.                 recruit.Task.ClearAll();
  29.                 recruit.Task.StandStill(-1);
  30.                 recruit.AlwaysKeepTask = true;
  31.                 recruit.IsPersistent = true;
  32.             }
  33.         }
  34.     }
Add Comment
Please, Sign In to add comment