/// <summary> /// Adds a specified vehicle to the recent actions screen. /// </summary> /// <param name="veh">The vehicle</param> internal static void AddVehicleToRecents(Vehicle veh) { MakeSpaceForNewRecent(); string lp = veh.LicensePlate; EntryPoint.AddRecentText(String.Format("Looked up vehicle: {0} ({1})", lp, GetVehicleDisplayName(veh))); if (veh != null && !veh.IsPersistent) { veh.IsPersistent = true; Globals.persistedRageEntities.Add(veh); } }
/// <summary> /// Adds a specific ped to the recent actions screen. /// </summary> /// <param name="ped">The ped</param> internal static void AddPedToRecents(Ped ped) { MakeSpaceForNewRecent(); string name = Functions.GetPersonaForPed(ped).FullName; EntryPoint.AddRecentText(String.Format("Looked up person: {0}", name)); if (ped != null && ped.IsValid() && !ped.IsPersistent && !ped.IsInAnyVehicle(false)) { ped.IsPersistent = true; Globals.persistedRageEntities.Add(ped); } }
/// <summary> /// Adds a specified backup request to the recent actions screen. /// </summary> /// <param name="response">The response type</param> /// <param name="unit">The unit type</param> internal static void AddBackupRequestToRecents(string response, string unit) { MakeSpaceForNewRecent(); EntryPoint.AddRecentText(String.Format("Requested backup: {0} ({1})", unit, response)); }