add global data (is logged in)

This commit is contained in:
hydrant
2019-05-01 18:23:58 +02:00
parent 5c23071c7e
commit 26af842da6
3 changed files with 7 additions and 3 deletions

View File

@@ -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);
});

View File

@@ -2,7 +2,8 @@
InTuning: boolean,
HideGui: boolean,
Interaction: boolean,
InChat: boolean
InChat: boolean,
LoggedIn: boolean
}
declare interface FactionRanks {

View File

@@ -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();