public static void SaveGroup() { List <Ped> group = Game.Player.Character.CurrentPedGroup.ToList(false); if (group.Count > 0) { for (int i = 0; i < PlayerGroup.PlayerPedCollection.Count; i++) { PlayerGroup.PlayerPedCollection.RemoveAt(i); } foreach (Ped ped in group) { PlayerGroup.AddPedData(ped); } try { WriteToBinaryFile("./scripts/CWDM/SaveGame/Group.sav", PlayerGroup.PlayerPedCollection); UI.Notify("~p~Group ~w~saved!"); } catch (Exception x) { Debug.Log(x.ToString()); } } else { UI.Notify("You have no one in your group!"); } }