Skip to content

Commit

Permalink
let players download samp manually if they want
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyrAhmady committed Jan 28, 2024
1 parent 8b0075d commit 85e26c1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/locales/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ export default {
change_version: "Change Version",
offline: "Offline",
from_gtasa_folder: "From GTASA Folder",
gta_path_modal_cant_find_samp_description_2:
"Please choose another version or download and install SA-MP manually.",
};
17 changes: 13 additions & 4 deletions src/utils/game.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { fs, invoke, path, process } from "@tauri-apps/api";
import { fs, invoke, path, process, shell } from "@tauri-apps/api";
import { exists } from "@tauri-apps/api/fs";
import { t } from "i18next";
import { invoke_rpc } from "../api/rpc";
Expand Down Expand Up @@ -185,9 +185,12 @@ export const startGame = async (
if (sampVersion === "custom" && !foundSampInGtaFolder) {
showMessageBox({
title: t("gta_path_modal_cant_find_samp_title"),
description: t("gta_path_modal_cant_find_samp_description", {
path: gtasaPath,
}),
description:
t("gta_path_modal_cant_find_samp_description", {
path: gtasaPath,
}) +
`\n` +
t("gta_path_modal_cant_find_samp_description_2"),
boxWidth: 360,
buttonWidth: 150,
buttons: [
Expand All @@ -199,6 +202,12 @@ export const startGame = async (
showPrompt(true);
},
},
{
title: t("download"),
onPress: () => {
shell.open("https://uifserver.net/download/sa-mp-0.3.7-R5-1-MP-install.exe")
},
},
],
});
return;
Expand Down

0 comments on commit 85e26c1

Please sign in to comment.