Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop
This commit is contained in:
@@ -54,7 +54,7 @@ export default function business(globalData: IGlobalData) {
|
|||||||
function keyPressHandler() {
|
function keyPressHandler() {
|
||||||
mp.events.call('SERVER:Business_RemoveHelp', false);
|
mp.events.call('SERVER:Business_RemoveHelp', false);
|
||||||
|
|
||||||
if (globalData.InChat || globalData.InInput || globalData.InMenu) return;
|
if (globalData.InChat || globalData.InMenu || globalData.InMenu) return;
|
||||||
|
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ export default function business(globalData: IGlobalData) {
|
|||||||
|
|
||||||
bankMenu.ItemSelect.on((item, index) => {
|
bankMenu.ItemSelect.on((item, index) => {
|
||||||
if (item === depositItem) {
|
if (item === depositItem) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var depositInput = new InputHelper("Wie viel Geld möchtest du auf deine Businesskasse einzahlen?", globalData);
|
var depositInput = new InputHelper("Wie viel Geld möchtest du auf deine Businesskasse einzahlen?", globalData);
|
||||||
depositInput.show();
|
depositInput.show();
|
||||||
depositInput.getValue((data) => {
|
depositInput.getValue((data) => {
|
||||||
@@ -103,13 +103,13 @@ export default function business(globalData: IGlobalData) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.events.callRemote('Business_DepositMoney', amount);
|
mp.events.callRemote('Business_DepositMoney', amount);
|
||||||
|
|
||||||
mainMenu.Close();
|
mainMenu.Close();
|
||||||
});
|
});
|
||||||
} else if (item === withdrawItem) {
|
} else if (item === withdrawItem) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var withdrawInput = new InputHelper("Wie viel Geld möchtest du von deiner Businesskasse abheben?", globalData);
|
var withdrawInput = new InputHelper("Wie viel Geld möchtest du von deiner Businesskasse abheben?", globalData);
|
||||||
withdrawInput.show();
|
withdrawInput.show();
|
||||||
withdrawInput.getValue((data) => {
|
withdrawInput.getValue((data) => {
|
||||||
@@ -118,7 +118,7 @@ export default function business(globalData: IGlobalData) {
|
|||||||
mp.game.graphics.notify('~r~Du musst eine Nummer eingeben!');
|
mp.game.graphics.notify('~r~Du musst eine Nummer eingeben!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.events.callRemote('Business_WithdrawMoney', amount);
|
mp.events.callRemote('Business_WithdrawMoney', amount);
|
||||||
|
|
||||||
mainMenu.Close();
|
mainMenu.Close();
|
||||||
|
|||||||
@@ -317,13 +317,13 @@ export default function charCreator(globalData: IGlobalData) {
|
|||||||
mp.game.cam.renderScriptCams(false, false, 0, true, false);
|
mp.game.cam.renderScriptCams(false, false, 0, true, false);
|
||||||
mp.events.callRemote("creatorSave", currentGender, JSON.stringify(parentData), JSON.stringify(featureData), JSON.stringify(appearanceData), JSON.stringify(hairAndColors));
|
mp.events.callRemote("creatorSave", currentGender, JSON.stringify(parentData), JSON.stringify(featureData), JSON.stringify(appearanceData), JSON.stringify(hairAndColors));
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 7:
|
case 7:
|
||||||
mp.events.callRemote("creator_Leave");
|
mp.events.callRemote("creator_Leave");
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -331,7 +331,7 @@ export default function charCreator(globalData: IGlobalData) {
|
|||||||
creatorMainMenu.MenuClose.on(() => {
|
creatorMainMenu.MenuClose.on(() => {
|
||||||
mp.events.callRemote("creator_Leave");
|
mp.events.callRemote("creator_Leave");
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
creatorMainMenu.Visible = false;
|
creatorMainMenu.Visible = false;
|
||||||
@@ -560,7 +560,7 @@ export default function charCreator(globalData: IGlobalData) {
|
|||||||
creatorCamera.setActive(true);
|
creatorCamera.setActive(true);
|
||||||
|
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
|
|
||||||
creatorMainMenu.Visible = true;
|
creatorMainMenu.Visible = true;
|
||||||
mp.gui.chat.show(false);
|
mp.gui.chat.show(false);
|
||||||
|
|||||||
@@ -852,7 +852,7 @@ export default function inventory(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//Wenn Maus über Dollar Zeichen
|
//Wenn Maus über Dollar Zeichen
|
||||||
if (isTrading && isMouseOverTradeDollar(x, y)) {
|
if (isTrading && isMouseOverTradeDollar(x, y)) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var tradeMoney = new InputHelper("Wie viel $ möchtest du für deine Items haben?", globalData);
|
var tradeMoney = new InputHelper("Wie viel $ möchtest du für deine Items haben?", globalData);
|
||||||
tradeMoney.show();
|
tradeMoney.show();
|
||||||
tradeMoney.getValue((data) => {
|
tradeMoney.getValue((data) => {
|
||||||
@@ -861,7 +861,7 @@ export default function inventory(globalData: IGlobalData) {
|
|||||||
mp.game.graphics.notify('~r~Du musst eine Zahl größer als 0 eingeben!');
|
mp.game.graphics.notify('~r~Du musst eine Zahl größer als 0 eingeben!');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
tradePrize = amount;
|
tradePrize = amount;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -878,7 +878,7 @@ export default function inventory(globalData: IGlobalData) {
|
|||||||
switch (radialSelect) {
|
switch (radialSelect) {
|
||||||
case "up":
|
case "up":
|
||||||
var dropInput = new InputHelper("Wie viel Items möchtest du wegwerfen?", globalData);
|
var dropInput = new InputHelper("Wie viel Items möchtest du wegwerfen?", globalData);
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
dropInput.show();
|
dropInput.show();
|
||||||
dropInput.getValue((data) => {
|
dropInput.getValue((data) => {
|
||||||
var amount = parseInt(data);
|
var amount = parseInt(data);
|
||||||
@@ -891,7 +891,7 @@ export default function inventory(globalData: IGlobalData) {
|
|||||||
}
|
}
|
||||||
mp.events.callRemote('itemInteract', "drop", items[clickedItem][5], amount);
|
mp.events.callRemote('itemInteract', "drop", items[clickedItem][5], amount);
|
||||||
});
|
});
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
itemRadial = false;
|
itemRadial = false;
|
||||||
break;
|
break;
|
||||||
case "down":
|
case "down":
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ export default function ahelp(globalData: IGlobalData): void {
|
|||||||
if (ahelpBrowser !== null) {
|
if (ahelpBrowser !== null) {
|
||||||
ahelpBrowser.destroy();
|
ahelpBrowser.destroy();
|
||||||
ahelpBrowser = null;
|
ahelpBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/ahelp.html');
|
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/ahelp.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -30,10 +30,10 @@ export default function ahelp(globalData: IGlobalData): void {
|
|||||||
if (ahelpBrowser == null) {
|
if (ahelpBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (globalData.InInput) {
|
else if (globalData.InMenu) {
|
||||||
ahelpBrowser.destroy();
|
ahelpBrowser.destroy();
|
||||||
ahelpBrowser = null;
|
ahelpBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
@@ -44,12 +44,12 @@ export default function ahelp(globalData: IGlobalData): void {
|
|||||||
if (ahelpBrowser !== null) {
|
if (ahelpBrowser !== null) {
|
||||||
ahelpBrowser.destroy();
|
ahelpBrowser.destroy();
|
||||||
ahelpBrowser = null;
|
ahelpBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/shelp.html');
|
ahelpBrowser = mp.browsers.new('package://assets/html/helpcommand/shelp.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
|
|||||||
@@ -89,13 +89,13 @@ export default function (globalData: IGlobalData) {
|
|||||||
|
|
||||||
menu.ItemSelect.on((item: NativeUI.UIMenuItem, index) => {
|
menu.ItemSelect.on((item: NativeUI.UIMenuItem, index) => {
|
||||||
if (item === groupCreateItem) { // Gruppe
|
if (item === groupCreateItem) { // Gruppe
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie soll die Gruppe heißen?", globalData);
|
var input = new InputHelper("Wie soll die Gruppe heißen?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue((name: string) => {
|
input.getValue((name: string) => {
|
||||||
mp.events.callRemote("CLIENT:CityHall_CreateGroup", name);
|
mp.events.callRemote("CLIENT:CityHall_CreateGroup", name);
|
||||||
menu.Close(true);
|
menu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
} else if (item === cancelItem) {
|
} else if (item === cancelItem) {
|
||||||
menu.Close();
|
menu.Close();
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ export default function Introduction(globalData: IGlobalData): void {
|
|||||||
if (DrivingSchoolBrowser !== null) {
|
if (DrivingSchoolBrowser !== null) {
|
||||||
DrivingSchoolBrowser.destroy();
|
DrivingSchoolBrowser.destroy();
|
||||||
DrivingSchoolBrowser = null;
|
DrivingSchoolBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
DrivingSchoolBrowser = mp.browsers.new('package://assets/html/School/DrivingSchool.html');
|
DrivingSchoolBrowser = mp.browsers.new('package://assets/html/School/DrivingSchool.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -28,10 +28,10 @@ export default function Introduction(globalData: IGlobalData): void {
|
|||||||
if (DrivingSchoolBrowser == null) {
|
if (DrivingSchoolBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (globalData.InInput) {
|
else if (globalData.InMenu) {
|
||||||
DrivingSchoolBrowser.destroy();
|
DrivingSchoolBrowser.destroy();
|
||||||
DrivingSchoolBrowser = null;
|
DrivingSchoolBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ export default function Introduction(globalData: IGlobalData): void {
|
|||||||
if (IntroductionBrowser !== null) {
|
if (IntroductionBrowser !== null) {
|
||||||
IntroductionBrowser.destroy();
|
IntroductionBrowser.destroy();
|
||||||
IntroductionBrowser = null;
|
IntroductionBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
IntroductionBrowser = mp.browsers.new('package://assets/html/Introduction/Introduction.html');
|
IntroductionBrowser = mp.browsers.new('package://assets/html/Introduction/Introduction.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -31,10 +31,10 @@ export default function Introduction(globalData: IGlobalData): void {
|
|||||||
if (IntroductionBrowser == null) {
|
if (IntroductionBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (globalData.InInput) {
|
else if (globalData.InMenu) {
|
||||||
IntroductionBrowser.destroy();
|
IntroductionBrowser.destroy();
|
||||||
IntroductionBrowser = null;
|
IntroductionBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
|
|
||||||
|
|||||||
@@ -14,13 +14,11 @@ export default function playerList(globalData: IGlobalData): void {
|
|||||||
if (playerlistBrowser !== null) {
|
if (playerlistBrowser !== null) {
|
||||||
playerlistBrowser.destroy();
|
playerlistBrowser.destroy();
|
||||||
playerlistBrowser = null;
|
playerlistBrowser = null;
|
||||||
globalData.InInput = false;
|
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InMenu) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html');
|
playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ export default function taximeterInput(globalData: IGlobalData) {
|
|||||||
browser.destroy();
|
browser.destroy();
|
||||||
browser = null;
|
browser = null;
|
||||||
}
|
}
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
function myTimer() {
|
function myTimer() {
|
||||||
|
|||||||
@@ -13,12 +13,12 @@ export default function userhelp(globalData: IGlobalData): void {
|
|||||||
if (userhelpBrowser !== null) {
|
if (userhelpBrowser !== null) {
|
||||||
userhelpBrowser.destroy();
|
userhelpBrowser.destroy();
|
||||||
userhelpBrowser = null;
|
userhelpBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
userhelpBrowser = mp.browsers.new('package://assets/html/helpcommand/userhelp.html');
|
userhelpBrowser = mp.browsers.new('package://assets/html/helpcommand/userhelp.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -31,10 +31,10 @@ export default function userhelp(globalData: IGlobalData): void {
|
|||||||
if (userhelpBrowser == null) {
|
if (userhelpBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (globalData.InInput) {
|
else if (globalData.InMenu) {
|
||||||
userhelpBrowser.destroy();
|
userhelpBrowser.destroy();
|
||||||
userhelpBrowser = null;
|
userhelpBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export default function vehicleMenu(globalData: IGlobalData) {
|
|||||||
if (menuBrowser !== null) {
|
if (menuBrowser !== null) {
|
||||||
menuBrowser.destroy();
|
menuBrowser.destroy();
|
||||||
menuBrowser = null;
|
menuBrowser = null;
|
||||||
|
globalData.InMenu = false;
|
||||||
mp.gui.chat.show(true);
|
mp.gui.chat.show(true);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.game.graphics.stopScreenEffect("FocusIn");
|
mp.game.graphics.stopScreenEffect("FocusIn");
|
||||||
@@ -25,6 +26,7 @@ export default function vehicleMenu(globalData: IGlobalData) {
|
|||||||
mp.game.graphics.startScreenEffect("FocusIn", 0, false);
|
mp.game.graphics.startScreenEffect("FocusIn", 0, false);
|
||||||
menuBrowser = mp.browsers.new("package://assets/html/vehiclemenu/index.html");
|
menuBrowser = mp.browsers.new("package://assets/html/vehiclemenu/index.html");
|
||||||
mp.gui.chat.show(false);
|
mp.gui.chat.show(false);
|
||||||
|
globalData.InMenu = true;
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -67,46 +67,46 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:payIn", amount);
|
mp.events.callRemote("CLIENT:payIn", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
bankmenu.Close(true);
|
bankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}else if (item.Text === "Auszahlen") {
|
}else if (item.Text === "Auszahlen") {
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du Auszahlen?", globalData);
|
var input = new InputHelper("Wie viel möchtest du Auszahlen?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:payOut", amount);
|
mp.events.callRemote("CLIENT:payOut", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
bankmenu.Close(true);
|
bankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
} else if (item.Text === "Überweisen" ) {
|
} else if (item.Text === "Überweisen" ) {
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wem möchtest du Geld überweisen? (Name/ID)", globalData);
|
var input = new InputHelper("Wem möchtest du Geld überweisen? (Name/ID)", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.call("CLIENT:bank_name", name);
|
mp.events.call("CLIENT:bank_name", name);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
bankmenu.Close(true);
|
bankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
} else if (item.Text === "Schließen") {
|
} else if (item.Text === "Schließen") {
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
bankmenu.Close(true);
|
bankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -119,19 +119,19 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
mp.events.add('removeBankmenu', () => {
|
mp.events.add('removeBankmenu', () => {
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
bankmenu.Close(true);
|
bankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add("CLIENT:bank_name", (name) => {
|
mp.events.add("CLIENT:bank_name", (name) => {
|
||||||
paymentname = name;
|
paymentname = name;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du Überweisen??", globalData);
|
var input = new InputHelper("Wie viel möchtest du Überweisen??", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:payment", JSON.stringify(paymentname), amount);
|
mp.events.callRemote("CLIENT:payment", JSON.stringify(paymentname), amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
mp.events.add('removeFactionBankmenu', () => {
|
mp.events.add('removeFactionBankmenu', () => {
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -161,19 +161,19 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:factionPayIn", amount);
|
mp.events.callRemote("CLIENT:factionPayIn", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}else if (item.Text === "Schließen") {
|
}else if (item.Text === "Schließen") {
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -201,32 +201,32 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
var input = new InputHelper("Wie viel möchtest du einzahlen?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:factionPayIn", amount);
|
mp.events.callRemote("CLIENT:factionPayIn", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}else if (item.Text === "Überweisen") {
|
}else if (item.Text === "Überweisen") {
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wem möchtest du Geld überweisen? (Name/ID)", globalData);
|
var input = new InputHelper("Wem möchtest du Geld überweisen? (Name/ID)", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.call("CLIENT:bank_factionname", name);
|
mp.events.call("CLIENT:bank_factionname", name);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}else if (item.Text === "Schließen") {
|
}else if (item.Text === "Schließen") {
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
factionBankmenu.Close(true);
|
factionBankmenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -238,14 +238,14 @@ export default function bankMenuHandle(globalData: IGlobalData) {
|
|||||||
|
|
||||||
mp.events.add("CLIENT:bank_factionname", (name) => {
|
mp.events.add("CLIENT:bank_factionname", (name) => {
|
||||||
paymentname = name;
|
paymentname = name;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel möchtest du Überweisen?", globalData);
|
var input = new InputHelper("Wie viel möchtest du Überweisen?", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:factionPayment", JSON.stringify(paymentname), amount);
|
mp.events.callRemote("CLIENT:factionPayment", JSON.stringify(paymentname), amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default function drivingSchoolList(globalData: IGlobalData) {
|
|||||||
var drivingMenu: NativeUI.Menu;
|
var drivingMenu: NativeUI.Menu;
|
||||||
|
|
||||||
|
|
||||||
var stage = "";
|
var stage = "Auto";
|
||||||
|
|
||||||
|
|
||||||
//Weapon Menu
|
//Weapon Menu
|
||||||
|
|||||||
@@ -87,27 +87,23 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
factionInteractionMenu.Visible = false;
|
factionInteractionMenu.Visible = false;
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
|
||||||
globalData.InInput = true;
|
|
||||||
var input = new InputHelper("Welchem Spieler möchtest du ein Ticket geben (Name / ID)?", globalData);
|
var input = new InputHelper("Welchem Spieler möchtest du ein Ticket geben (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.call("CLIENT:InteractionMenu_LSPD_Ticket", name);
|
mp.events.call("CLIENT:InteractionMenu_LSPD_Ticket", name);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case pointsTaskMenuLSPD:
|
case pointsTaskMenuLSPD:
|
||||||
factionInteractionMenu.Visible = false;
|
factionInteractionMenu.Visible = false;
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
|
||||||
globalData.InInput = true;
|
|
||||||
var input = new InputHelper("Welchem Spieler möchtest du Strafpunkte geben (Name / ID)?", globalData);
|
var input = new InputHelper("Welchem Spieler möchtest du Strafpunkte geben (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.call("CLIENT:InteractionMenu_LSPD_Points", name);
|
mp.events.call("CLIENT:InteractionMenu_LSPD_Points", name);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
break
|
break
|
||||||
case wantedsMenuLSPD:
|
case wantedsMenuLSPD:
|
||||||
@@ -128,24 +124,24 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket", (name) => {
|
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket", (name) => {
|
||||||
ticketName = name;
|
ticketName = name;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie hoch soll der Ticketbetrag sein ?", globalData);
|
var input = new InputHelper("Wie hoch soll der Ticketbetrag sein ?", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.events.call("CLIENT:InteractionMenu_LSPD_Ticket2", amount);
|
mp.events.call("CLIENT:InteractionMenu_LSPD_Ticket2", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket2", (ticketPrice) => {
|
mp.events.add("CLIENT:InteractionMenu_LSPD_Ticket2", (ticketPrice) => {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Um welches Vergehen handelt es sich ?", globalData);
|
var input = new InputHelper("Um welches Vergehen handelt es sich ?", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(ticketReason => {
|
input.getValue(ticketReason => {
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_LSPD_Ticket3", JSON.stringify(ticketName), ticketPrice, JSON.stringify(ticketReason));
|
mp.events.callRemote("CLIENT:InteractionMenu_LSPD_Ticket3", JSON.stringify(ticketName), ticketPrice, JSON.stringify(ticketReason));
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
});
|
});
|
||||||
@@ -153,12 +149,12 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
|
|
||||||
mp.events.add("CLIENT:InteractionMenu_LSPD_Points", (name) => {
|
mp.events.add("CLIENT:InteractionMenu_LSPD_Points", (name) => {
|
||||||
pointsName = name;
|
pointsName = name;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wieviele Punkte werden vergeben ?", globalData);
|
var input = new InputHelper("Wieviele Punkte werden vergeben ?", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.events.call("CLIENT:InteractionMenu_LSPD_Points2", amount);
|
mp.events.call("CLIENT:InteractionMenu_LSPD_Points2", amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
});
|
});
|
||||||
@@ -182,12 +178,12 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
if (wantedlistBrowser !== null) {
|
if (wantedlistBrowser !== null) {
|
||||||
wantedlistBrowser.destroy();
|
wantedlistBrowser.destroy();
|
||||||
wantedlistBrowser = null;
|
wantedlistBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
else if (!globalData.InInput) {
|
else if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
wantedlistBrowser = mp.browsers.new('package://assets/html/Wantedlist/wanteds.html');
|
wantedlistBrowser = mp.browsers.new('package://assets/html/Wantedlist/wanteds.html');
|
||||||
mp.gui.chat.activate(false);
|
mp.gui.chat.activate(false);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -203,10 +199,10 @@ export default function factionInteraction(globalData: IGlobalData) {
|
|||||||
if (wantedlistBrowser == null) {
|
if (wantedlistBrowser == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (globalData.InInput) {
|
else if (globalData.InMenu) {
|
||||||
wantedlistBrowser.destroy();
|
wantedlistBrowser.destroy();
|
||||||
wantedlistBrowser = null;
|
wantedlistBrowser = null;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -169,21 +169,20 @@ export default function (globalData: IGlobalData) {
|
|||||||
} else if (item === payItem) {
|
} else if (item === payItem) {
|
||||||
mp.gui.chat.activate(true);
|
mp.gui.chat.activate(true);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = true;
|
||||||
globalData.InInput = true;
|
|
||||||
var input = new InputHelper("Welchem Spieler möchtest du Geld geben (Name / ID)?", globalData);
|
var input = new InputHelper("Welchem Spieler möchtest du Geld geben (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.call("CLIENT:InteractionMenu_Pay_Name", name);
|
mp.events.call("CLIENT:InteractionMenu_Pay_Name", name);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
menu.Close(true);
|
menu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
} else if (item == HouseItem) {
|
} else if (item == HouseItem) {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_FindHouse");
|
mp.events.callRemote("CLIENT:InteractionMenu_FindHouse");
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
menu.Close(true);
|
menu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -289,13 +288,13 @@ export default function (globalData: IGlobalData) {
|
|||||||
|
|
||||||
licenseMenu.ItemSelect.on((item, index) => {
|
licenseMenu.ItemSelect.on((item, index) => {
|
||||||
if (item === showItem) {
|
if (item === showItem) {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du deine Lizenzen zeigen (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du deine Lizenzen zeigen (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Show", "License", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_Show", "License", name);
|
||||||
parentMenu.Close(true);
|
parentMenu.Close(true);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -336,22 +335,22 @@ export default function (globalData: IGlobalData) {
|
|||||||
|
|
||||||
factionMenu.ItemSelect.on((item, index) => {
|
factionMenu.ItemSelect.on((item, index) => {
|
||||||
if (index === 0) { // Inviten
|
if (index === 0) { // Inviten
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du inviten (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du inviten (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Invite", "Fraktion", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_Invite", "Fraktion", name);
|
||||||
factionMenu.Close();
|
factionMenu.Close();
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
} else if (index === 1) { // Uninviten
|
} else if (index === 1) { // Uninviten
|
||||||
globalData.InInput == true;
|
globalData.InMenu == true;
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du uninviten (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du uninviten (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Uninvite", "Fraktion", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_Uninvite", "Fraktion", name);
|
||||||
factionMenu.Close();
|
factionMenu.Close();
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -372,24 +371,24 @@ export default function (globalData: IGlobalData) {
|
|||||||
groupMenu.ItemSelect.on((item, index) => {
|
groupMenu.ItemSelect.on((item, index) => {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
case 0: //Spieler inviten
|
case 0: //Spieler inviten
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du inviten (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du inviten (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Invite", "Gruppe", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_Invite", "Gruppe", name);
|
||||||
parentMenu.Close();
|
parentMenu.Close();
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1: //Spieler uninviten
|
case 1: //Spieler uninviten
|
||||||
globalData.InInput == true;
|
globalData.InMenu == true;
|
||||||
var input = new InputHelper("Welchen Spieler möchtest du uninviten (Name / ID)?", globalData);
|
var input = new InputHelper("Welchen Spieler möchtest du uninviten (Name / ID)?", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Uninvite", "Gruppe", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_Uninvite", "Gruppe", name);
|
||||||
parentMenu.Close();
|
parentMenu.Close();
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -398,13 +397,13 @@ export default function (globalData: IGlobalData) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 3: //Neuen (zusätzlichen) Gruppenleiter bestimmen
|
case 3: //Neuen (zusätzlichen) Gruppenleiter bestimmen
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Welchen Spieler soll Manager werden (Name)? ", globalData);
|
var input = new InputHelper("Welchen Spieler soll Manager werden (Name)? ", globalData);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(name => {
|
input.getValue(name => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_MakeLeader", "Gruppe", name);
|
mp.events.callRemote("CLIENT:InteractionMenu_MakeLeader", "Gruppe", name);
|
||||||
parentMenu.Close();
|
parentMenu.Close();
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -534,14 +533,14 @@ export default function (globalData: IGlobalData) {
|
|||||||
|
|
||||||
mp.events.add("CLIENT:InteractionMenu_Pay_Name", (name) => {
|
mp.events.add("CLIENT:InteractionMenu_Pay_Name", (name) => {
|
||||||
payName = name;
|
payName = name;
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var input = new InputHelper("Wie viel?", globalData);
|
var input = new InputHelper("Wie viel?", globalData);
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
input.show();
|
input.show();
|
||||||
input.getValue(amount => {
|
input.getValue(amount => {
|
||||||
mp.events.callRemote("CLIENT:InteractionMenu_Pay", JSON.stringify(payName), amount);
|
mp.events.callRemote("CLIENT:InteractionMenu_Pay", JSON.stringify(payName), amount);
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default function worldInteraction() {
|
|||||||
mp.gui.chat.show(false);
|
mp.gui.chat.show(false);
|
||||||
mp.game.ui.displayHud(false);
|
mp.game.ui.displayHud(false);
|
||||||
mp.game.ui.displayRadar(false);
|
mp.game.ui.displayRadar(false);
|
||||||
GlobalData.InInput = true;
|
GlobalData.InMenu = true;
|
||||||
atmBrowser = mp.browsers.new("package://assets/html/atm/index.html");
|
atmBrowser = mp.browsers.new("package://assets/html/atm/index.html");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -23,7 +23,7 @@ export default function worldInteraction() {
|
|||||||
mp.game.ui.displayHud(true);
|
mp.game.ui.displayHud(true);
|
||||||
mp.game.ui.displayRadar(true);
|
mp.game.ui.displayRadar(true);
|
||||||
inAtm = false;
|
inAtm = false;
|
||||||
GlobalData.InInput = false;
|
GlobalData.InMenu = false;
|
||||||
|
|
||||||
atmBrowser.destroy();
|
atmBrowser.destroy();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export default function (globalData: IGlobalData): void {
|
|||||||
mp.game.ui.displayHud(false);
|
mp.game.ui.displayHud(false);
|
||||||
mp.game.ui.displayRadar(false);
|
mp.game.ui.displayRadar(false);
|
||||||
|
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
|
|
||||||
disableLightMode = disableLight;
|
disableLightMode = disableLight;
|
||||||
@@ -65,7 +65,7 @@ export default function (globalData: IGlobalData): void {
|
|||||||
mp.game.ui.displayRadar(true);
|
mp.game.ui.displayRadar(true);
|
||||||
|
|
||||||
globalData.LoggedIn = true;
|
globalData.LoggedIn = true;
|
||||||
globalData.InInput = false;
|
globalData.InMenu = false;
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
loginCam.setActive(false);
|
loginCam.setActive(false);
|
||||||
mp.game.cam.renderScriptCams(false, false, 0, true, false);
|
mp.game.cam.renderScriptCams(false, false, 0, true, false);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
var shiftModifier = false;
|
var shiftModifier = false;
|
||||||
var controlModifier = false;
|
var controlModifier = false;
|
||||||
var localPlayer = mp.players.local;
|
var localPlayer = mp.players.local;
|
||||||
mp.keys.bind(bindVirtualKeys.F2, true, function () {
|
mp.events.add('ADMIN:NoClip', () => {
|
||||||
isNoClip = !isNoClip;
|
isNoClip = !isNoClip;
|
||||||
mp.game.ui.displayRadar(!isNoClip);
|
mp.game.ui.displayRadar(!isNoClip);
|
||||||
if (isNoClip) {
|
if (isNoClip) {
|
||||||
|
|||||||
@@ -11,9 +11,7 @@ const player = mp.players.local;
|
|||||||
|
|
||||||
export default function keys(globalData: IGlobalData) {
|
export default function keys(globalData: IGlobalData) {
|
||||||
|
|
||||||
var showInventory = false;
|
|
||||||
var showGui = true;
|
var showGui = true;
|
||||||
var showInv = false;
|
|
||||||
|
|
||||||
//ENTER
|
//ENTER
|
||||||
mp.keys.bind(0x0D, false, function () {
|
mp.keys.bind(0x0D, false, function () {
|
||||||
@@ -24,21 +22,21 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//LEFT ARROW (Interaktion mit anderen Spielern)
|
//LEFT ARROW (Interaktion mit anderen Spielern)
|
||||||
mp.keys.bind(0x25, false, function () {
|
mp.keys.bind(0x25, false, function () {
|
||||||
if (!globalData.InChat && !showInv && !globalData.InMenu) {
|
if (!globalData.InChat && !globalData.InMenu && !globalData.InTuning) {
|
||||||
mp.events.callRemote("keyPress:LEFT_ARROW");
|
mp.events.callRemote("keyPress:LEFT_ARROW");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//UP ARROW (Interaktion mit Spielwelt)
|
//UP ARROW (Interaktion mit Spielwelt)
|
||||||
mp.keys.bind(0x26, false, function () {
|
mp.keys.bind(0x26, false, function () {
|
||||||
if (!globalData.InChat && !showInv && !globalData.InMenu) {
|
if (!globalData.InChat && !globalData.InMenu && !globalData.InTuning) {
|
||||||
mp.events.callRemote("keyPress:UP_ARROW");
|
mp.events.callRemote("keyPress:UP_ARROW");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//RIGHT ARROW (Fraktionsinteraktion)
|
//RIGHT ARROW (Fraktionsinteraktion)
|
||||||
mp.keys.bind(0x27, false, function () {
|
mp.keys.bind(0x27, false, function () {
|
||||||
if (!globalData.InChat && !showInv && !globalData.InMenu) {
|
if (!globalData.InChat && !globalData.InMenu && !globalData.InTuning) {
|
||||||
mp.events.callRemote("keyPress:RIGHT_ARROW");
|
mp.events.callRemote("keyPress:RIGHT_ARROW");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -70,7 +68,7 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//E
|
//E
|
||||||
mp.keys.bind(0x45, false, function () {
|
mp.keys.bind(0x45, false, function () {
|
||||||
if (!globalData.InChat && !globalData.InMenu) {
|
if (!globalData.InChat) {
|
||||||
mp.events.callRemote("keyPress:E");
|
mp.events.callRemote("keyPress:E");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -78,19 +76,14 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//I //Inventar
|
//I //Inventar
|
||||||
mp.keys.bind(0x49, false, function () {
|
mp.keys.bind(0x49, false, function () {
|
||||||
if (!globalData.InChat && !globalData.InTuning && !globalData.InMenu) {
|
if (!globalData.InChat && !globalData.InTuning) {
|
||||||
if (showInv === false) {
|
|
||||||
showInv = true;
|
|
||||||
} else {
|
|
||||||
showInv = false;
|
|
||||||
}
|
|
||||||
mp.events.callRemote("keyPress:I");
|
mp.events.callRemote("keyPress:I");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//O //Spielerliste
|
//O //Spielerliste
|
||||||
mp.keys.bind(0x4F, true, function () {
|
mp.keys.bind(0x4F, true, function () {
|
||||||
if (!globalData.InChat && !globalData.InMenu && !globalData.InTuning && !showInv) {
|
if (!globalData.InChat && !globalData.InTuning ) {
|
||||||
mp.events.callRemote("keyPress:O");
|
mp.events.callRemote("keyPress:O");
|
||||||
//mp.events.call("showPlayerlist");
|
//mp.events.call("showPlayerlist");
|
||||||
}
|
}
|
||||||
@@ -98,7 +91,7 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//K //Dienstkleidung
|
//K //Dienstkleidung
|
||||||
mp.keys.bind(0x4B, false, function () {
|
mp.keys.bind(0x4B, false, function () {
|
||||||
if (!globalData.InChat) {
|
if (!globalData.InChat && !globalData.InMenu) {
|
||||||
mp.events.callRemote("keyPress:K");
|
mp.events.callRemote("keyPress:K");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -112,7 +105,7 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//M (Interaktionsmenü)
|
//M (Interaktionsmenü)
|
||||||
mp.keys.bind(0x4D, false, function () {
|
mp.keys.bind(0x4D, false, function () {
|
||||||
if (!globalData.InChat && !showInv && !globalData.InMenu && !globalData.InInput && !globalData.InTuning) {
|
if (!globalData.InChat && !globalData.InTuning && !globalData.InMenu) {
|
||||||
mp.events.callRemote("keyPress:M");
|
mp.events.callRemote("keyPress:M");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -128,21 +121,21 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
|
|
||||||
//T
|
//T
|
||||||
mp.keys.bind(0x54, false, function () {
|
mp.keys.bind(0x54, false, function () {
|
||||||
if (!globalData.InChat) {
|
if (!globalData.InChat && !globalData.InTuning && !globalData.InMenu) {
|
||||||
globalData.InChat = true;
|
globalData.InChat = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//X // Fahrzeug Verwaltung - Menü
|
//X // Fahrzeug Verwaltung - Menü
|
||||||
mp.keys.bind(0x58, false, function () {
|
mp.keys.bind(0x58, false, function () {
|
||||||
if (!globalData.InChat) {
|
if (!globalData.InChat && !globalData.InMenu && !globalData.InTuning) {
|
||||||
mp.events.callRemote("keyPress:X");
|
mp.events.callRemote("keyPress:X");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//J // Job Starten
|
//J // Job Starten
|
||||||
mp.keys.bind(0x4A, false, () => {
|
mp.keys.bind(0x4A, false, () => {
|
||||||
if (!globalData.InChat && !globalData.InInput && !globalData.InMenu && globalData.LoggedIn) {
|
if (!globalData.InChat && globalData.LoggedIn && !globalData.InTuning) {
|
||||||
mp.events.callRemote("CLIENT:JobManager_ShowJobMenu");
|
mp.events.callRemote("CLIENT:JobManager_ShowJobMenu");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -150,4 +143,10 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
mp.keys.bind(0x7A, false, () => {
|
mp.keys.bind(0x7A, false, () => {
|
||||||
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
|
mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//F2 //Noclip
|
||||||
|
mp.keys.bind(0x71, false, () => {
|
||||||
|
mp.events.callRemote("Noclip");
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ export default function reportList(globalData: IGlobalData) {
|
|||||||
|
|
||||||
reportMenu.ItemSelect.on((item) => {
|
reportMenu.ItemSelect.on((item) => {
|
||||||
if (item.Text === "Absenden") {
|
if (item.Text === "Absenden") {
|
||||||
globalData.InInput = true;
|
globalData.InMenu = true;
|
||||||
var ticketContentBox = new InputHelper("Worin besteht dein Anliegen?", globalData);
|
var ticketContentBox = new InputHelper("Worin besteht dein Anliegen?", globalData);
|
||||||
ticketContentBox.show();
|
ticketContentBox.show();
|
||||||
ticketContentBox.getValue(data => {
|
ticketContentBox.getValue(data => {
|
||||||
|
|||||||
1
ReallifeGamemode.Client/global.d.ts
vendored
1
ReallifeGamemode.Client/global.d.ts
vendored
@@ -4,7 +4,6 @@
|
|||||||
InMenu: boolean,
|
InMenu: boolean,
|
||||||
InChat: boolean,
|
InChat: boolean,
|
||||||
LoggedIn: boolean,
|
LoggedIn: boolean,
|
||||||
InInput: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
declare type AccountData = {
|
declare type AccountData = {
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ let globalData: IGlobalData = {
|
|||||||
HideGui: false,
|
HideGui: false,
|
||||||
InChat: false,
|
InChat: false,
|
||||||
LoggedIn: false,
|
LoggedIn: false,
|
||||||
InInput: false,
|
|
||||||
|
|
||||||
get InMenu(): boolean {
|
get InMenu(): boolean {
|
||||||
return inMenu;
|
return inMenu;
|
||||||
@@ -142,8 +141,8 @@ keys(globalData);
|
|||||||
import quitHandler from './Player/quit';
|
import quitHandler from './Player/quit';
|
||||||
quitHandler();
|
quitHandler();
|
||||||
|
|
||||||
//import freeCam from './Player/freecam';
|
import freeCam from './Player/freecam';
|
||||||
//freeCam();
|
freeCam();
|
||||||
|
|
||||||
import saveManager from './Save/main';
|
import saveManager from './Save/main';
|
||||||
saveManager();
|
saveManager();
|
||||||
|
|||||||
@@ -36,7 +36,6 @@ export default class InputHelper {
|
|||||||
show() {
|
show() {
|
||||||
if (this.created) return;
|
if (this.created) return;
|
||||||
this.data.InMenu = true;
|
this.data.InMenu = true;
|
||||||
this.data.InInput = true;
|
|
||||||
this.created = true;
|
this.created = true;
|
||||||
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
|
this.browser = mp.browsers.new('package://assets/html/inputhelper/index.html');
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
@@ -50,7 +49,6 @@ export default class InputHelper {
|
|||||||
mp.events.remove('cef_request_title');
|
mp.events.remove('cef_request_title');
|
||||||
mp.events.remove('closeinputhelper');
|
mp.events.remove('closeinputhelper');
|
||||||
this.browser.destroy();
|
this.browser.destroy();
|
||||||
this.data.InInput = false;
|
|
||||||
this.data.InMenu = false;
|
this.data.InMenu = false;
|
||||||
this.created = false;
|
this.created = false;
|
||||||
this.browser = null;
|
this.browser = null;
|
||||||
|
|||||||
@@ -15,14 +15,12 @@
|
|||||||
if (invBrowser !== null) {
|
if (invBrowser !== null) {
|
||||||
invBrowser.destroy()
|
invBrowser.destroy()
|
||||||
invBrowser = null;
|
invBrowser = null;
|
||||||
globalData.InInput = false;
|
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
loaded = false;
|
loaded = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!globalData.InMenu) {
|
if (!globalData.InMenu) {
|
||||||
globalData.InInput = true;
|
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
itemArr = [];
|
itemArr = [];
|
||||||
@@ -38,7 +36,6 @@
|
|||||||
var tradeItemWeight;
|
var tradeItemWeight;
|
||||||
|
|
||||||
mp.events.add('openInventory', () => {
|
mp.events.add('openInventory', () => {
|
||||||
globalData.InInput = true;
|
|
||||||
globalData.InMenu = true;
|
globalData.InMenu = true;
|
||||||
mp.gui.cursor.show(true, true);
|
mp.gui.cursor.show(true, true);
|
||||||
itemArr = [];
|
itemArr = [];
|
||||||
@@ -48,7 +45,6 @@
|
|||||||
mp.events.add('closeInventory', () => {
|
mp.events.add('closeInventory', () => {
|
||||||
invBrowser.destroy()
|
invBrowser.destroy()
|
||||||
invBrowser = null;
|
invBrowser = null;
|
||||||
globalData.InInput = false;
|
|
||||||
globalData.InMenu = false;
|
globalData.InMenu = false;
|
||||||
loaded = false;
|
loaded = false;
|
||||||
mp.gui.cursor.show(false, false);
|
mp.gui.cursor.show(false, false);
|
||||||
|
|||||||
@@ -32,9 +32,15 @@ export default function attachmentManager(game: IGame) {
|
|||||||
} else if (entityRage.type === "vehicle") {
|
} else if (entityRage.type === "vehicle") {
|
||||||
var vehicle = game.vehicles.at(entityRage.remoteId);
|
var vehicle = game.vehicles.at(entityRage.remoteId);
|
||||||
entity = vehicle;
|
entity = vehicle;
|
||||||
|
var realName = mp.game.ui.getLabelText(mp.game.vehicle.getDisplayNameFromVehicleModel(entityRage.model));
|
||||||
|
} else if (entityRage.type === "object") {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let e = game.attachments.get(entity);
|
let e = game.attachments.get(entity);
|
||||||
|
|
||||||
if (this.attachments.hasOwnProperty(id)) {
|
if (this.attachments.hasOwnProperty(id)) {
|
||||||
@@ -59,7 +65,7 @@ export default function attachmentManager(game: IGame) {
|
|||||||
rotation: attInfo.rotation
|
rotation: attInfo.rotation
|
||||||
};
|
};
|
||||||
|
|
||||||
game.objects.setData(rageObject, attachmentData);
|
game.objects.setData(rageObject, attachmentData); // hier hakt es mein freund
|
||||||
|
|
||||||
let object = game.objects.at(rageObject.remoteId);
|
let object = game.objects.at(rageObject.remoteId);
|
||||||
|
|
||||||
@@ -258,6 +264,7 @@ export default function attachmentManager(game: IGame) {
|
|||||||
|
|
||||||
if (e != null) {
|
if (e != null) {
|
||||||
if (e.__attachmentObjects) {
|
if (e.__attachmentObjects) {
|
||||||
|
//game.wait(2500);
|
||||||
attachmentMngr.shutdownFor(entityRage);
|
attachmentMngr.shutdownFor(entityRage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export default function drivingSchoolHandle(globalData: IGlobalData) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function keyPressHandler() {
|
function keyPressHandler() {
|
||||||
if (globalData.InChat || globalData.InInput || globalData.InMenu) return;
|
if (globalData.InChat || globalData.InMenu || globalData.InMenu) return;
|
||||||
|
|
||||||
mp.events.call('removeDrivingSchoolMenu', false);
|
mp.events.call('removeDrivingSchoolMenu', false);
|
||||||
mp.events.call('showDrivingSchoolSelector');
|
mp.events.call('showDrivingSchoolSelector');
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ export default function planeSchoolHandle(globalData: IGlobalData) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function keyPressHandler() {
|
function keyPressHandler() {
|
||||||
if (globalData.InChat || globalData.InInput || globalData.InMenu) return;
|
if (globalData.InChat || globalData.InMenu) return;
|
||||||
|
|
||||||
mp.events.call('removeplaneSchoolMenu', false);
|
mp.events.call('removeplaneSchoolMenu', false);
|
||||||
mp.events.callRemote('startplaneSchool');
|
mp.events.callRemote('startplaneSchool');
|
||||||
|
|||||||
@@ -3650,5 +3650,17 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion ALevel1338
|
#endregion ALevel1338
|
||||||
|
|
||||||
|
[RemoteEvent("Noclip")]
|
||||||
|
public void Noclip(Player player)
|
||||||
|
{
|
||||||
|
if (!player.GetUser()?.IsAdmin(AdminLevel.HEADADMIN) ?? true)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(player.HasData("Adminduty") && player.GetData<bool>("Adminduty"))
|
||||||
|
player.TriggerEvent("ADMIN:NoClip");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -323,6 +323,12 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(player.Position.DistanceTo(target.Position) > 3)
|
||||||
|
{
|
||||||
|
ChatService.ErrorMessage(player, "Der Patient ist zu weit entfernt");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (price < 10 || price > 100)
|
if (price < 10 || price > 100)
|
||||||
{
|
{
|
||||||
ChatService.ErrorMessage(player, "Der Preis muss zwischen 10$ und 100$ liegen");
|
ChatService.ErrorMessage(player, "Der Preis muss zwischen 10$ und 100$ liegen");
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using ReallifeGamemode.Database.Entities;
|
using ReallifeGamemode.Database.Entities;
|
||||||
|
using ReallifeGamemode.Database.Models;
|
||||||
using ReallifeGamemode.Server.Extensions;
|
using ReallifeGamemode.Server.Extensions;
|
||||||
using ReallifeGamemode.Server.Finance;
|
using ReallifeGamemode.Server.Finance;
|
||||||
using ReallifeGamemode.Server.Managers;
|
using ReallifeGamemode.Server.Managers;
|
||||||
@@ -15,6 +16,16 @@ namespace ReallifeGamemode.Server.Commands
|
|||||||
{
|
{
|
||||||
internal class UserCommands : Script
|
internal class UserCommands : Script
|
||||||
{
|
{
|
||||||
|
|
||||||
|
[Command("skill")]
|
||||||
|
public void CmdUserSkill(Player player)
|
||||||
|
{
|
||||||
|
User user = player.GetUser(new DatabaseContext());
|
||||||
|
|
||||||
|
player.SendChatMessage($"~c~BusSkill = {user.BusSkill}/800, PilotSkill = {user.PilotSkill}/300.");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
[Command("id", "~m~Benutzung: ~s~/id [Name]")]
|
[Command("id", "~m~Benutzung: ~s~/id [Name]")]
|
||||||
public void CmdUserId(Player player, String targetname)
|
public void CmdUserId(Player player, String targetname)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -112,6 +112,10 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
//client.TriggerEvent("SERVER:WORLD_INTERACTION:ATM_ERROR", 0, checkATM.Balance);
|
//client.TriggerEvent("SERVER:WORLD_INTERACTION:ATM_ERROR", 0, checkATM.Balance);
|
||||||
client.SendNotification("~r~Nicht genügend Geld auf der Hand!");
|
client.SendNotification("~r~Nicht genügend Geld auf der Hand!");
|
||||||
}
|
}
|
||||||
|
else if(inputField1 < 0)
|
||||||
|
{
|
||||||
|
client.SendNotification("~r~Ungültiger Betrag!");
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var updateBankMoneyIn = user.BankAccount;
|
var updateBankMoneyIn = user.BankAccount;
|
||||||
|
|||||||
Reference in New Issue
Block a user