Move Waffenschein

This commit is contained in:
VegaZ
2021-04-17 03:07:34 +02:00
parent b810797024
commit a5059d2278
3 changed files with 46 additions and 3 deletions

View File

@@ -24,7 +24,7 @@ menu.MenuClose.on(() => {
game.events.add("SERVER:PoliceDepartment_EnterColShape", () => {
//game.ui.setHelpText("Drücke ~INPUT_CONTEXT~, um das Menü des Polizeireviers zu öffnen");
mp.events.call("renderHelpTextOnScreen", "~s~Drücke ~g~E~s~ um das Menü des ~b~Polizeireviers ~s~zu öffnen")
//mp.events.call("renderHelpTextOnScreen", "~s~Drücke ~g~E~s~ um das Menü des ~b~Polizeireviers ~s~zu öffnen")
game.events.bindKey(Key.E, false, keyPressHandler);
});

View File

@@ -0,0 +1,43 @@
CREATE TABLE `WeaponCategories` (
`Id` int NOT NULL AUTO_INCREMENT,
`Category` longtext CHARACTER SET utf8mb4 NULL,
CONSTRAINT `PK_WeaponCategories` PRIMARY KEY (`Id`)
);
CREATE TABLE `Weapons` (
`Id` int NOT NULL AUTO_INCREMENT,
`WeaponModel` longtext CHARACTER SET utf8mb4 NULL,
`CategoryId` int NOT NULL,
`SlotID` int NOT NULL,
`Ammo` int NOT NULL,
`Price` float NOT NULL,
CONSTRAINT `PK_Weapons` PRIMARY KEY (`Id`),
CONSTRAINT `FK_Weapons_WeaponCategories_CategoryId` FOREIGN KEY (`CategoryId`) REFERENCES `WeaponCategories` (`Id`) ON DELETE CASCADE
);
CREATE TABLE `UserWeapons` (
`Id` int NOT NULL AUTO_INCREMENT,
`UserId` int NOT NULL,
`WeaponId` int NOT NULL,
`Ammo` int NOT NULL,
CONSTRAINT `PK_UserWeapons` PRIMARY KEY (`Id`),
CONSTRAINT `FK_UserWeapons_Users_UserId` FOREIGN KEY (`UserId`) REFERENCES `Users` (`Id`) ON DELETE CASCADE,
CONSTRAINT `FK_UserWeapons_Weapons_WeaponId` FOREIGN KEY (`WeaponId`) REFERENCES `Weapons` (`Id`) ON DELETE CASCADE
);
CREATE INDEX `IX_UserWeapons_UserId` ON `UserWeapons` (`UserId`);
CREATE INDEX `IX_UserWeapons_WeaponId` ON `UserWeapons` (`WeaponId`);
CREATE INDEX `IX_Weapons_CategoryId` ON `Weapons` (`CategoryId`);
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`)
VALUES ('20210413201146_Ammunations', '3.1.3');
ALTER TABLE `Weapons` ADD `AmmunationActive` tinyint(1) NOT NULL DEFAULT FALSE;
ALTER TABLE `Weapons` ADD `Legal` tinyint(1) NOT NULL DEFAULT FALSE;
INSERT INTO `__EFMigrationsHistory` (`MigrationId`, `ProductVersion`)
VALUES ('20210416175726_Ammunations2', '3.1.3');

View File

@@ -61,9 +61,9 @@ namespace ReallifeGamemode.Server.Core.Menus
private void CreateVisuals()
{
Position pos = new Position(440.869, -981.045, 30.689);
Position pos = new Position(12.7499, -1105.1168, 29.797);
Api.TextLabel.CreateTextLabel("Polizeirevier\n\nDrücke ~y~E~s~, um das Menü zu öffnen", pos, 20f, 1.3f, Font.ChaletLondon, Color.White);
Api.TextLabel.CreateTextLabel("Waffenschein kaufen\n\nDrücke ~y~E~s~, um das Menü zu öffnen", pos, 20f, 1.3f, Font.ChaletLondon, Color.White);
Api.Marker.CreateMarker(MarkerType.VerticalCylinder, pos.Subtract(new Position(0, 0, 1.7)), new Position(), new Position(), 1f, Color.White);
IColShape colShape = Api.ColShape.CreateSphere(pos, 2f);