interaktion on Key-M & add error massage for driving,planeschool
This commit is contained in:
@@ -44,9 +44,9 @@ export default function keys(globalData: IGlobalData) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
//DOWN ARROW (Eigeninteraktion)
|
//DOWN ARROW (Eigeninteraktion)
|
||||||
mp.keys.bind(0x28, false, function () {
|
mp.keys.bind(0x4D, false, function () {
|
||||||
if (!globalData.InChat && !showInv && !globalData.InMenu && !globalData.InInput && !globalData.InTuning) {
|
if (!globalData.InChat && !showInv && !globalData.InMenu && !globalData.InInput && !globalData.InTuning) {
|
||||||
mp.events.callRemote("keyPress:DOWN_ARROW");
|
mp.events.callRemote("keyPress:M");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//F7 //Unshowalles
|
//F7 //Unshowalles
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ using ReallifeGamemode.Server.Core.API;
|
|||||||
using ReallifeGamemode.Server.Types;
|
using ReallifeGamemode.Server.Types;
|
||||||
using ReallifeGamemode.Server.Core.Extensions;
|
using ReallifeGamemode.Server.Core.Extensions;
|
||||||
|
|
||||||
|
|
||||||
namespace ReallifeGamemode.Server.Core.Menus
|
namespace ReallifeGamemode.Server.Core.Menus
|
||||||
{
|
{
|
||||||
internal class PoliceDepartment : Script
|
internal class PoliceDepartment : Script
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using ReallifeGamemode.Database.Entities;
|
using ReallifeGamemode.Database.Entities;
|
||||||
using ReallifeGamemode.Database.Models;
|
using ReallifeGamemode.Database.Models;
|
||||||
@@ -111,11 +111,13 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
{
|
{
|
||||||
User user = client.GetUser();
|
User user = client.GetUser();
|
||||||
if (user.DriverLicenseVehicle || client.HasData("ActiveSchool"))
|
if (user.DriverLicenseVehicle || client.HasData("ActiveSchool"))
|
||||||
|
{
|
||||||
|
client.SendChatMessage("~b~[INFO]~s~ Du besitzt schon einen Führerschein.");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (user.Handmoney < 2500)
|
if (user.Handmoney < 2500)
|
||||||
{
|
{
|
||||||
client.SendNotification("~r~Du brauchst ~g~$2500~r~ auf der Hand um die Prüfung zu starten.", true);
|
client.SendNotification("~r~[FEHLER]~s~ Du hast nicht genug Geld auf der Hand($2.500)!", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -205,11 +207,13 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
{
|
{
|
||||||
User user = client.GetUser();
|
User user = client.GetUser();
|
||||||
if (user.DriverLicenseBike || client.HasData("ActiveSchool"))
|
if (user.DriverLicenseBike || client.HasData("ActiveSchool"))
|
||||||
|
{
|
||||||
|
client.SendChatMessage("~b~[INFO]~s~ Du besitzt schon einen Motorradschein.");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (user.Handmoney < 3500)
|
if (user.Handmoney < 3500)
|
||||||
{
|
{
|
||||||
client.SendNotification("~r~Du brauchst ~g~$3500~r~ auf der Hand um die Prüfung zu starten.", true);
|
client.SendNotification("~r~[FEHLER]~s~Du hast nicht genug Geld auf der Hand($3.500)!", true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using GTANetworkAPI;
|
using GTANetworkAPI;
|
||||||
using ReallifeGamemode.Database.Entities;
|
using ReallifeGamemode.Database.Entities;
|
||||||
using ReallifeGamemode.Database.Models;
|
using ReallifeGamemode.Database.Models;
|
||||||
@@ -68,8 +68,10 @@ namespace ReallifeGamemode.Server.DrivingSchool
|
|||||||
User user = client.GetUser();
|
User user = client.GetUser();
|
||||||
|
|
||||||
if (user.FlyingLicensePlane || client.HasData("ActiveSchool"))
|
if (user.FlyingLicensePlane || client.HasData("ActiveSchool"))
|
||||||
|
{
|
||||||
|
client.SendChatMessage("~b~[INFO]~s~ Du besitzt schon einen Flugschein.");
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
if (user.Handmoney < 5000)
|
if (user.Handmoney < 5000)
|
||||||
{
|
{
|
||||||
client.SendNotification("~r~Du brauchst ~g~$5000~r~ auf der Hand um die Prüfung zu starten.", true);
|
client.SendNotification("~r~Du brauchst ~g~$5000~r~ auf der Hand um die Prüfung zu starten.", true);
|
||||||
|
|||||||
@@ -119,8 +119,8 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[RemoteEvent("keyPress:DOWN_ARROW")]
|
[RemoteEvent("keyPress:M")]
|
||||||
public void KeyPressDownArrow(Player player)
|
public void KeyPressM(Player player)
|
||||||
{
|
{
|
||||||
using var dbContext = new DatabaseContext();
|
using var dbContext = new DatabaseContext();
|
||||||
User u = player.GetUser(dbContext);
|
User u = player.GetUser(dbContext);
|
||||||
@@ -159,7 +159,7 @@ namespace ReallifeGamemode.Server.Events
|
|||||||
paycheck,
|
paycheck,
|
||||||
licenses,
|
licenses,
|
||||||
vehicles,
|
vehicles,
|
||||||
factionVehicles = u.FactionLeader ? factionVehicles : null,
|
factionVehicles,
|
||||||
nextPayday = u.PaydayTimer
|
nextPayday = u.PaydayTimer
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Managers
|
|||||||
{
|
{
|
||||||
public class InteractionManager : Script
|
public class InteractionManager : Script
|
||||||
{
|
{
|
||||||
#region Eigeninteraktionen PFEILTASTE-RUNTER
|
#region Eigeninteraktionen Taste-M
|
||||||
|
|
||||||
[RemoteEvent("CLIENT:InteractionMenu_AcceptInvite")]
|
[RemoteEvent("CLIENT:InteractionMenu_AcceptInvite")]
|
||||||
public void InteractionMenuAcceptInvite(Player player, string type)
|
public void InteractionMenuAcceptInvite(Player player, string type)
|
||||||
|
|||||||
Reference in New Issue
Block a user