Removed textlabels, Fixed chat not showing up after exiting tuning menu

This commit is contained in:
hydrant
2018-10-22 22:46:19 +02:00
parent 43211a5eea
commit 3173fab98a
2 changed files with 8 additions and 13 deletions

View File

@@ -50,11 +50,11 @@ mp.events.add('showTuningInfo', () => {
keyBound = true;
});
mp.events.add('hideTuningInfo', () => {
mp.events.add('hideTuningInfo', (unbind) => {
mp.game.ui.clearHelp(true);
mp.gui.chat.show(true);
if (keyBound) {
if (keyBound && unbind) {
mp.keys.unbind(0x45, false, keyPressHandler);
keyBound = false;
}
@@ -65,7 +65,7 @@ function keyPressHandler() {
}
mp.events.add("showTuningMenu", () => {
mp.events.call("hideTuningInfo");
mp.events.call("hideTuningInfo" , false);
mp.gui.chat.show(false);
var localPlayer = mp.players.local;
@@ -116,6 +116,10 @@ mp.events.add("showTuningMenu", () => {
modMenu.Visible = true;
});
mainMenu.MenuClose.on(() => {
mp.events.call("hideTuningInfo", false);
});
});
function getSlotName(slot) {

View File

@@ -1,9 +1,5 @@
using GTANetworkAPI;
using reallife_gamemode.Server.Util;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace reallife_gamemode.Server.Managers
{
@@ -13,11 +9,6 @@ namespace reallife_gamemode.Server.Managers
public static void AddTuningGarage(Vector3 pos1, Vector3 pos2)
{
// DEBUG
NAPI.TextLabel.CreateTextLabel("Pos1", pos1, 100, 1, 0, new Color(255, 255, 255), true, 0);
NAPI.TextLabel.CreateTextLabel("Pos2", pos2, 100, 1, 0, new Color(255, 255, 255), true, 0);
ColShape colShape = NAPI.ColShape.CreateSphereColShape(pos1, 10, 0);
colShape.OnEntityEnterColShape += (cs, c) =>
@@ -30,7 +21,7 @@ namespace reallife_gamemode.Server.Managers
colShape.OnEntityExitColShape += (cs, c) =>
{
c.TriggerEvent("hideTuningInfo");
c.TriggerEvent("hideTuningInfo", true);
};
tuningGarages.Add(colShape);