From 5c23071c7e522bc6a442509f01fd4b6053d0277a Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 1 May 2019 18:23:43 +0200 Subject: [PATCH 1/2] Restart service when push (workaround for broken dev server) --- .gitlab-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 809f7f66..5d31896a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -19,4 +19,7 @@ build: - "dotnet build -c ServerBuild" - "cd ReallifeGamemode.Client/" - "npm install" - - "npm run build:server" \ No newline at end of file + - "npm run build:server" + - "cd ../" + - "./gm_copy_build_files.sh" + - "sudo /bin/systemctl restart ragempsrv" \ No newline at end of file From 26af842da6f48b68abb3d0611fb513e6dc8bbeeb Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 1 May 2019 18:23:58 +0200 Subject: [PATCH 2/2] add global data (is logged in) --- ReallifeGamemode.Client/Login/main.ts | 4 +++- ReallifeGamemode.Client/global.d.ts | 3 ++- ReallifeGamemode.Client/index.ts | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index d04654f7..4733fe7f 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -4,7 +4,7 @@ * @copyright (c) 2008 - 2018 Life of German */ -export default function(): void { +export default function(globalData: GlobalData): void { var loginBrowser: BrowserMp; var loginCam: CameraMp = mp.cameras.new('login', new mp.Vector3(-1883.736, -781.4911, 78.27616), new mp.Vector3(3.185999, 0, -79.59519), 40); @@ -52,6 +52,8 @@ export default function(): void { mp.game.ui.displayHud(true); mp.game.ui.displayRadar(true); + globalData.LoggedIn = true; + loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); }); diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index cd747289..359d27a7 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -2,7 +2,8 @@ InTuning: boolean, HideGui: boolean, Interaction: boolean, - InChat: boolean + InChat: boolean, + LoggedIn: boolean } declare interface FactionRanks { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 5224bf29..52447420 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -9,6 +9,7 @@ let globalData: GlobalData = { HideGui: false, Interaction: false, InChat: false, + LoggedIn = false }; import voice from './Voice/main'; @@ -66,7 +67,7 @@ import playerInteraction from './Interaction/playerinteraction'; playerInteraction(globalData); import Login from './Login/main'; -Login(); +Login(globalData); import dutyCloth from './Player/dutycloth'; dutyCloth();