Skip to content

Instantly share code, notes, and snippets.

@RiverGrande
Created March 23, 2019 23:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RiverGrande/6361b57bb5231762c75d127df5a4cb02 to your computer and use it in GitHub Desktop.
Save RiverGrande/6361b57bb5231762c75d127df5a4cb02 to your computer and use it in GitHub Desktop.
ArrestFunctions for LSPDFR 0.3.1 ? +
public static class ArrestFunctions
{
public List<Ped> GetPedBeingArrestedByPed(Ped Ped)
{
List<Ped> ArrestingPeds = new List<Ped>();
foreach(Ped ArrestPed in World.GetAllPeds())
{
if(Functions.IsPedGettingArrested(ArrestPed))
{
if (Functions.GetPedArrestingOfficer(ArrestPed) == Ped)
{
ArrestingPeds.Add(ArrestPed);
}
}
}
return ArrestingPeds;
}
public List<Ped> GetPedBeingArrestedByPlayer()
{
List<Ped> ArrestingPeds = new List<Ped>();
foreach (Ped ArrestPed in World.GetAllPeds())
{
if (Functions.IsPedGettingArrested(ArrestPed))
{
if (Functions.GetPedArrestingOfficer(ArrestPed) == Game.LocalPlayer.Character)
{
ArrestingPeds.Add(ArrestPed);
}
}
}
return ArrestingPeds;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment