diff --git a/ReallifeGamemode.Client/Gui/blips.ts b/ReallifeGamemode.Client/Gui/blips.ts index 1c44de47..85b9e1ae 100644 --- a/ReallifeGamemode.Client/Gui/blips.ts +++ b/ReallifeGamemode.Client/Gui/blips.ts @@ -26,13 +26,24 @@ } let pBlip = playerBlipMap.get(player); if (player.isDead()) { - pBlip.setSprite(303); + pBlip.setSprite(274); + pBlip.setScale(0.7); } else { pBlip.setSprite(1); + pBlip.setScale(0.7); } let color = player.getVariable("blipColor"); - pBlip.setColour(isNaN(color) ? 0 : color); - pBlip.setPosition(player.position.x, player.position.y, player.position.z); + + if (color == -1) { + pBlip.setAlpha(0); + player.setAlpha(0); + } else { + pBlip.setAlpha(200); + player.setAlpha(255); + + pBlip.setColour(isNaN(color) ? 0 : color); + pBlip.setPosition(player.position.x, player.position.y, player.position.z); + } }); }, 50); diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index eb8a65fa..5e53bb15 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -14,6 +14,8 @@ export default function (globalData: IGlobalData): void { var draw = false; var editMode = false; var adutyMode = false; + var adminUnshow = false; + var adminTSupport = false; var dutyMode = false; let jailTime = 0; let att_score = 0; @@ -62,6 +64,14 @@ export default function (globalData: IGlobalData): void { adutyMode = toggle; }); + mp.events.add('toggleTSupportMode', (toggle) => { + adminTSupport = toggle; + }); + + mp.events.add('toggleAdminUnshowMode', (toggle) => { + adminUnshow = toggle; + }); + mp.events.add("toggleEditMode", (toggle) => { editMode = toggle; }); @@ -300,16 +310,6 @@ export default function (globalData: IGlobalData): void { centre: false }) } - if (adutyMode === true) { - mp.game.graphics.drawText("~r~SUPPORT", [0.92, 0.6], - { - font: 2, - color: [0, 255, 255, 255], - scale: [0.7, 0.7], - outline: true, - centre: false - }) - } if (dutyMode === true) { mp.game.graphics.drawText("~r~Duty", [0.92, 0.55], { @@ -320,7 +320,31 @@ export default function (globalData: IGlobalData): void { centre: false }) } - + if (adutyMode === true) { + var adutyText = "~r~SUPPORT"; + if (adminTSupport) { + adutyText = "SUPPORT"; + } + mp.game.graphics.drawText(adutyText, [0.92, 0.6], + { + font: 2, + color: [0, 229, 238, 255], + scale: [0.7, 0.7], + outline: true, + centre: false + }) + } + if (adminUnshow) { + mp.game.graphics.drawText("~r~UNSHOW", [0.92, 0.65], + { + font: 2, + color: [0, 255, 255, 255], + scale: [0.7, 0.7], + outline: true, + centre: false + }) + } + if (countdown > 0) { var now = Date.now(); var diff = Math.trunc((now - cdTimestamp) / 1000); diff --git a/ReallifeGamemode.Client/Gui/nametags.ts b/ReallifeGamemode.Client/Gui/nametags.ts index 97fd1cc5..1c106922 100644 --- a/ReallifeGamemode.Client/Gui/nametags.ts +++ b/ReallifeGamemode.Client/Gui/nametags.ts @@ -19,7 +19,7 @@ const colors = [ { id: 2, color: [200, 0, 0, alpha] }, //lsed { id: 3, color: [0, 0, 170, alpha] }, //fib { id: 4, color: [255, 180, 0, alpha] }, //trucker - { id: 5, color: [255, 255, 255, alpha] }, //terroristen + { id: 5, color: [255, 255, 100, alpha] }, //vagos { id: 6, color: [255, 255, 255, alpha] }, //hitman { id: 7, color: [0, 64, 0, alpha] }, //grove { id: 8, color: [171, 0, 150, alpha] }, //ballas @@ -49,6 +49,10 @@ export default function customNametags() { let colorId = game.players.at(player.remoteId).nametagColor; + if (colorId === -3) { + return; + } + let color = colors.find(c => c.id === colorId).color; let nametagText = player.name + " (" + player.remoteId + ")"; diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index 3a136335..4fadec66 100644 --- a/ReallifeGamemode.Client/Gui/playerlist.ts +++ b/ReallifeGamemode.Client/Gui/playerlist.ts @@ -1,4 +1,4 @@ -/** +/** * @overview Life of German Reallife - Gui Playerlist playerlist.js * @author VegaZ. Siga. * @copyright (c) 2008 - 2018 Life of German @@ -8,30 +8,42 @@ export default function playerList(globalData: IGlobalData): void { var playerlistBrowser: BrowserMp = null; var pList; + var factionPlayersMap: Map = new Map(); + const factionIds = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; mp.events.add("showPlayerlist", (playersJson) => { - if (playerlistBrowser !== null) { playerlistBrowser.destroy(); playerlistBrowser = null; globalData.InMenu = false; mp.gui.cursor.show(false, false); - mp.gui.chat.activate(true); + mp.gui.chat.activate(true); } else if (!globalData.InMenu) { globalData.InMenu = true; - playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); + playerlistBrowser = mp.browsers.new('package://assets/html/onlinelist/index.html'); mp.gui.chat.activate(false); mp.gui.cursor.show(true, true); pList = JSON.parse(playersJson); - pList.forEach((player) => { - playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',${JSON.stringify(player.FactionName)},'${JSON.stringify(player.Ping)}');`); - }); - } + } }); - mp.events.add("CEF:fetchPlayerList", () => { - + mp.events.add("CEF:PlayerList_Loaded", () => { + factionIds.forEach(f => { + factionPlayersMap.set(f, 0); + }); + + pList.forEach((player) => { + var facId = player.FactionId; + playerlistBrowser.execute(`addPlayerEntry('${player.Id}','${player.Name}', '${facId}','${player.Ping}');`); + factionPlayersMap.set(facId, factionPlayersMap.get(facId) + 1); + }); + + factionPlayersMap.forEach((value, key) => { + playerlistBrowser.execute(`setPlayerCount(${key}, ${value});`) + }); + + playerlistBrowser.execute(`setPlayerCount(-1, ${pList.length});`); }); } @@ -42,4 +54,4 @@ export default function playerList(globalData: IGlobalData): void { // table = table + tableRow; // }) // return document.write(table); -//} \ No newline at end of file +//} diff --git a/ReallifeGamemode.Client/Gui/vehiclemenu/main.ts b/ReallifeGamemode.Client/Gui/vehiclemenu/main.ts index 385eaacb..b967f544 100644 --- a/ReallifeGamemode.Client/Gui/vehiclemenu/main.ts +++ b/ReallifeGamemode.Client/Gui/vehiclemenu/main.ts @@ -33,6 +33,7 @@ export default function vehicleMenu(globalData: IGlobalData) { mp.events.add("CEF:VehicleLook_Loaded", () => { lastDriversBrowser.execute(`setDrivers('${JSON.stringify(lastDrivers)}');`); + mp.gui.cursor.show(true, true); }); mp.events.add("removeLookMenu", () => { diff --git a/ReallifeGamemode.Client/Interaction/interactionmenu.ts b/ReallifeGamemode.Client/Interaction/interactionmenu.ts index 3864a46d..0eb1b053 100644 --- a/ReallifeGamemode.Client/Interaction/interactionmenu.ts +++ b/ReallifeGamemode.Client/Interaction/interactionmenu.ts @@ -464,6 +464,23 @@ export default function (globalData: IGlobalData) { wageItem.SetRightLabel("$" + jobdata.wage.toString()) } jobMenu.AddItem(wageItem); + + if (jobdata.isActive) { + var quitJobItem = new UIMenuItem("Job Beenden", "Beendet den Job und bringt dich zurück zur Base") + jobMenu.AddItem(quitJobItem); + quitJobItem.HighlightedBackColor = new Color(213, 0, 0); + quitJobItem.BackColor = new Color(229, 57, 53); + + jobMenu.ItemSelect.on((item, index) => { + if (item == quitJobItem) { + mp.events.callRemote("CLIENT:Job_StopJob"); + jobMenu.Close(true); + mp.gui.chat.activate(true); + globalData.InMenu = false; + } + }); + } + jobMenu.Visible = false; mp.gui.chat.show(false); return jobMenu; diff --git a/ReallifeGamemode.Client/Player/antiafk.ts b/ReallifeGamemode.Client/Player/antiafk.ts index b8060c0c..1db1251f 100644 --- a/ReallifeGamemode.Client/Player/antiafk.ts +++ b/ReallifeGamemode.Client/Player/antiafk.ts @@ -30,7 +30,7 @@ } } - if (afkCounter >= 30) { + if (afkCounter >= 60) { afkStatus = true; globalData.IsAfk = afkStatus; setServerAfkStatus(afkStatus); diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index 0eaf4fed..44807c32 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -183,6 +183,8 @@ var loop = Behaviour.secs() mp.events.add("render", () => { + mp.game.player.setHealthRechargeMultiplier(0); + Behaviour.health = Number(mp.players.local.getHealth()) + Number(mp.players.local.getArmour()) if (loop < Behaviour.secs()) { if (Behaviour.active) { diff --git a/ReallifeGamemode.Client/admin/spectate.ts b/ReallifeGamemode.Client/admin/spectate.ts new file mode 100644 index 00000000..cf66bb43 --- /dev/null +++ b/ReallifeGamemode.Client/admin/spectate.ts @@ -0,0 +1,12 @@ +let cam: CameraMp = mp.cameras.new('spectateCam');; +mp.events.add("SERVER:ADMIN_SPECTATE", (targetPlayer) => { + cam.attachTo(targetPlayer.handle, 10.0, 0.0, 10.0, true); + cam.setActive(true); +}); + +mp.events.add("SERVER:ADMIN_STOP_SPECTATE", () => { + if (cam.isActive() == true) { + cam.setActive(false); + } +}); + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/login/styles.css b/ReallifeGamemode.Client/assets/css/login/styles.css index f08dfd6d..7385c7db 100644 --- a/ReallifeGamemode.Client/assets/css/login/styles.css +++ b/ReallifeGamemode.Client/assets/css/login/styles.css @@ -1,8 +1,10 @@ html { - -webkit-box-sizing: border-box; - box-sizing: border-box; - user-select: none; - + -webkit-box-sizing: border-box; + box-sizing: border-box; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } *, *::before, *::after { @@ -10,7 +12,6 @@ html { box-sizing: inherit; } - a { color: inherit; font-weight: bold; @@ -50,7 +51,7 @@ header { background-repeat: no-repeat; background-position: center; background-size: contain; - opacity: .3; + opacity: .4; } main { @@ -60,7 +61,7 @@ main { border-radius: .25em; font-size: 1em; line-height: 1.25; - background-color: rgba(0, 0, 0, 0.3); + background-color: rgba(0, 0, 0, 0.4); } main h1, main p { diff --git a/ReallifeGamemode.Client/assets/css/login/styles.css.map b/ReallifeGamemode.Client/assets/css/login/styles.css.map index 5bee04cc..66999e01 100644 --- a/ReallifeGamemode.Client/assets/css/login/styles.css.map +++ b/ReallifeGamemode.Client/assets/css/login/styles.css.map @@ -1,9 +1,9 @@ { "version": 3, - "mappings": "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", + "mappings": "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", "sources": [ "styles.scss" ], "names": [], "file": "styles.css" -} \ No newline at end of file +} diff --git a/ReallifeGamemode.Client/assets/css/login/styles.scss b/ReallifeGamemode.Client/assets/css/login/styles.scss index fcffc634..f4ecceaa 100644 --- a/ReallifeGamemode.Client/assets/css/login/styles.scss +++ b/ReallifeGamemode.Client/assets/css/login/styles.scss @@ -1,4 +1,8 @@ -html { box-sizing: border-box; } +html { + box-sizing: border-box; + user-select: none; +} + *, *::before, *::after { box-sizing: inherit; } a { @@ -34,7 +38,7 @@ header { background-repeat: no-repeat; background-position: center; background-size: contain; - opacity: .3; + opacity: .4; } main { @@ -46,7 +50,7 @@ main { font-size: 1em; line-height: 1.25; - background-color: rgba(0, 0, 0, .3); + background-color: rgba(0, 0, 0, .4); h1, p { margin: 0; @@ -220,4 +224,4 @@ body.light { footer { color: rgba(255, 255, 255, .5); } -} \ No newline at end of file +} diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css b/ReallifeGamemode.Client/assets/css/onlinelist/style.css new file mode 100644 index 00000000..28dd56ed --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css @@ -0,0 +1,221 @@ +html { + -webkit-box-sizing: border-box; + box-sizing: border-box; + height: 100vh; + background: transparent; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +html, body { + margin: unset; +} + +*, *:before, *:after { + -webkit-box-sizing: inherit; + box-sizing: inherit; +} + +body { + margin: 15vh auto 0; + width: 32vw; + color: white; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-size: 1em; +} + +h1, h2 { + margin: unset; + line-height: 1; +} + +h1 { + font-size: 1.75em; +} + +h2 { + font-size: 1.125em; +} + +.heading { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-pack: justify; + -ms-flex-pack: justify; + justify-content: space-between; + -webkit-box-align: start; + -ms-flex-align: start; + align-items: flex-start; + margin-bottom: 1.5em; + padding: 1em 1em 0; +} + +.wrapper { + min-height: 50vh; + max-height: 70vh; + overflow-y: scroll; + border-radius: .25em; + background-color: rgba(0, 0, 0, 0.75); +} + +.wrapper::-webkit-scrollbar { + display: none; +} + +table { + border-collapse: collapse; + width: 100%; + border-radius: inherit; +} + +table th { + position: -webkit-sticky; + position: sticky; + top: 0; + text-align: left; + z-index: 2; + background-color: black; +} + +table th:first-child { + border-top-left-radius: .25em; +} + +table th:last-child { + border-top-right-radius: .25em; +} + +table th, table td { + padding: .6em .3em; +} + +table th:first-child, table td:first-child { + padding-left: 1em; +} + +table th:last-child, table td:last-child { + padding-right: 1em; +} + +table tr td { + overflow: hidden; +} + +table tr td:nth-child(1) { + width: 7ch !important; +} + +table tr td:nth-child(2) { + max-width: 36ch; + font-weight: bold; + overflow-x: auto; + white-space: nowrap; +} + +table tr td:nth-child(2)::-webkit-scrollbar { + display: none; +} + +table tr td:nth-child(3) { + width: 15ch !important; +} + +table tr td:nth-child(4) { + width: 13ch !important; +} + +table tr:nth-child(even) { + background-color: rgba(0, 0, 0, 0.25); +} + +.group::before { + content: ""; + height: .65em; + width: .65em; + border-radius: 50%; + display: inline-block; + color: inherit; + border: 2px solid rgba(255, 255, 255, 0.125); + margin-right: .4em; + margin-bottom: 1px; +} + +.group--0::before { + background-color: white; +} + +.group--1::before { + background-color: #005fbe; +} + +.group--2::before { + background-color: #c80000; +} + +.group--3::before { + background-color: #0000aa; +} + +.group--4::before { + background-color: #ffb400; +} + +.group--5::before { + background-color: #ffb400; +} + +.group--6::before { + background-color: white; +} + +.group--7::before { + background-color: #004000; +} + +.group--8::before { + background-color: #ab0096; +} + +.group--9::before { + background-color: #00a685; +} + +ol.inline { + display: -webkit-box; + display: -ms-flexbox; + display: flex; + list-style: unset; + list-style-type: none; + margin: 0; + padding: unset; +} + +ol.inline li:not(:last-child) { + margin-right: 1em; +} + +ol.inline.stats { + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; +} + +ol.inline.stats:first-of-type { + margin-top: 1em !important; +} + +ol.inline.stats:last-of-type { + margin-bottom: 1em; +} + +ol.inline.stats:not(:last-of-type) { + margin-bottom: .125em; +} + +ol.inline.stats abbr { + text-decoration: none; +} +/*# sourceMappingURL=style.css.map */ \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map new file mode 100644 index 00000000..74b823b9 --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "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", + "sources": [ + "style.scss" + ], + "names": [], + "file": "style.css" +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss new file mode 100644 index 00000000..6486aa77 --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss @@ -0,0 +1,138 @@ +html { + box-sizing: border-box; + height: 100vh; + background: transparent; + user-select: none; +} + +html, body { margin: unset; } +*, *:before, *:after { box-sizing: inherit; } + +body { + margin: 15vh auto 0; + + width: 32vw; + color: white; + + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-size: 1em; +} + +h1, h2 { + margin: unset; + line-height: 1; +} + +h1 { font-size: 1.75em; } +h2 { font-size: 1.125em; } + +.heading { + display: flex; + justify-content: space-between; + align-items: flex-start; + margin-bottom: 1.5em; + padding: 1em 1em 0; +} + +.wrapper { + min-height: 50vh; + max-height: 70vh; + overflow-y: scroll; + + border-radius: .25em; + background-color: rgba(0, 0, 0, .75); + + &::-webkit-scrollbar { display: none; } +} + +table { + border-collapse: collapse; + width: 100%; + border-radius: inherit; + + th { + position: sticky; + top: 0; + text-align: left; + z-index: 2; + + background-color: black; + + &:first-child { border-top-left-radius: .25em; } + &:last-child { border-top-right-radius: .25em; } + } + + th, td { + padding: .6em .3em; + + &:first-child { padding-left: 1em; } + &:last-child { padding-right: 1em; } + } + + tr { + td { + overflow: hidden; + + &:nth-child(1) { width: 7ch !important; } + &:nth-child(2) { + max-width: 36ch; + font-weight: bold; + overflow-x: auto; + white-space: nowrap; + + &::-webkit-scrollbar { display: none; } + } + &:nth-child(3) { width: 15ch !important; } + &:nth-child(4) { width: 13ch !important; } + } + + &:nth-child(even) { background-color: rgba(0, 0, 0, .25); } + } +} + +.group { + &::before { + content: ""; + height: .65em; + width: .65em; + border-radius: 50%; + display: inline-block; + color: inherit; + border: 2px solid rgba(255, 255, 255, 0.125); + + margin-right: .4em; + margin-bottom: 1px; + } + + &--0::before { background-color: rgb(255, 255, 255); } + &--1::before { background-color: rgb(0, 95, 190); } + &--2::before { background-color: rgb(200, 0, 0); } + &--3::before { background-color: rgb(0, 0, 170); } + &--4::before { background-color: rgb(255, 180, 0); } + &--5::before { background-color: rgb(255, 180, 0); } + &--6::before { background-color: rgb(255, 255, 255); } + &--7::before { background-color: rgb(0, 64, 0); } + &--8::before { background-color: rgb(171, 0, 150); } + &--9::before { background-color: rgb(0, 166, 133); } +} + +ol.inline { + display: flex; + + list-style: unset; + list-style-type: none; + margin: 0; + padding: unset; + + li:not(:last-child) { margin-right: 1em; } +} + +ol.inline.stats { + justify-content: center; + + &:first-of-type { margin-top: 1em !important; } + &:last-of-type { margin-bottom: 1em; } + &:not(:last-of-type) { margin-bottom: .125em; } + + abbr { text-decoration: none; } +} diff --git a/ReallifeGamemode.Client/assets/html/login/register.html b/ReallifeGamemode.Client/assets/html/login/register.html index 31a5be29..afd9bd89 100644 --- a/ReallifeGamemode.Client/assets/html/login/register.html +++ b/ReallifeGamemode.Client/assets/html/login/register.html @@ -1,4 +1,4 @@ - + @@ -6,6 +6,8 @@ Registrierung | Life of German + + diff --git a/ReallifeGamemode.Client/assets/html/onlinelist/index.html b/ReallifeGamemode.Client/assets/html/onlinelist/index.html new file mode 100644 index 00000000..84fe2a70 --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/onlinelist/index.html @@ -0,0 +1,52 @@ + + + + + + + Spielerliste + + + +
+
+

Spielerliste

+

Spieler: 0

+
+ + + + + + + + + + + + + +
IDNameFraktionPing (ms)
+ +
    +
  1. LSPD: 0
  2. +
  3. FIB: 0
  4. +
  5. LSED: 0
  6. +
+ +
    +
  1. GSF: 0
  2. +
  3. FYB: 0
  4. +
  5. LSV: 0
  6. +
+ +
    +
  1. WZN: 0
  2. +
  3. Zivilisten: 0
  4. +
+
+ + + + + diff --git a/ReallifeGamemode.Client/assets/img/login/logo-light.png b/ReallifeGamemode.Client/assets/img/login/logo-light.png index 54b271b6..46f93732 100644 Binary files a/ReallifeGamemode.Client/assets/img/login/logo-light.png and b/ReallifeGamemode.Client/assets/img/login/logo-light.png differ diff --git a/ReallifeGamemode.Client/assets/img/login/logo.png b/ReallifeGamemode.Client/assets/img/login/logo.png index 42b11ef1..ded92370 100644 Binary files a/ReallifeGamemode.Client/assets/img/login/logo.png and b/ReallifeGamemode.Client/assets/img/login/logo.png differ diff --git a/ReallifeGamemode.Client/assets/img/login/source.txt b/ReallifeGamemode.Client/assets/img/login/source.txt index b6409761..8bddd06d 100644 --- a/ReallifeGamemode.Client/assets/img/login/source.txt +++ b/ReallifeGamemode.Client/assets/img/login/source.txt @@ -1,2 +1,2 @@ Enter-Icon: https://icons8.com/icons/set/enter-mac-key -Augen: Icons made by Pixel perfect from www.flaticon.com \ No newline at end of file +Augen: Font Awesome diff --git a/ReallifeGamemode.Client/assets/js/onlinelist/script.js b/ReallifeGamemode.Client/assets/js/onlinelist/script.js new file mode 100644 index 00000000..c9b9e2b9 --- /dev/null +++ b/ReallifeGamemode.Client/assets/js/onlinelist/script.js @@ -0,0 +1,32 @@ +window.onbeforeunload = () => { window.scrollTo(0, 0); } + +$(document).ready(function () { + mp.trigger('CEF:PlayerList_Loaded'); +}); + +setPlayerCount = (factionId, value) => { + if (factionId == -1) { + document.getElementById('player-count').innerHTML = value; + } else if (factionId >= 0 && factionId <= 9) { + document.getElementById(factionId).innerHTML = value; + } +} + +function getFactionNameByFactionId(factionId) { + switch (parseInt(factionId)) { + case 1: return "LSPD"; + case 2: return "LSED"; + case 3: return "FIB"; + case 4: return "Trucker"; + case 5: return "Vagos"; + case 7: return "Grove Street"; + case 8: return "Ballas"; + case 9: return "Weazle News"; + default: return "Zivilisten"; + } +} + +function addPlayerEntry(userId, userName, factionId, userPing) { + var factionName = getFactionNameByFactionId(factionId); + document.getElementById('players').innerHTML += `${userId} ${userName} ${factionName} ${userPing}`; +} diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index 576f9826..dfd560c5 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -30,6 +30,7 @@ declare type JobData = { busskill: number; pilotskill: number; wage: number; + isActive: boolean; } declare type VehicleData = { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 5a2a287f..89257c40 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -267,6 +267,7 @@ ammunation(globalData); require('./Gui/policedepartment'); require('./Gui/helptext'); +require('./admin/spectate'); interface VehicleData { EngineState: boolean; diff --git a/ReallifeGamemode.Client/util/Gangwar.ts b/ReallifeGamemode.Client/util/Gangwar.ts index 102908c0..f9136552 100644 --- a/ReallifeGamemode.Client/util/Gangwar.ts +++ b/ReallifeGamemode.Client/util/Gangwar.ts @@ -111,6 +111,11 @@ self.colorZone_r = 22; self.colorZone_g = 87; self.colorZone_b = 0; + } else if (owner === "Vagos") { + self.color = 33; + self.colorZone_r = 255; + self.colorZone_g = 255; + self.colorZone_b = 100; } else if (owner === "Neutral") { self.color = 0; self.colorZone_r = 255; diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/ChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/ChatLogEntry.cs new file mode 100644 index 00000000..815c51cf --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/ChatLogEntry.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public abstract class ChatLogEntry + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + [ForeignKey(nameof(UserId))] + public User User { get; set; } + + public int UserId { get; set; } + + public string Text { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public DateTime Time { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/DepartmentChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/DepartmentChatLogEntry.cs new file mode 100644 index 00000000..625812d4 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/DepartmentChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class DepartmentChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/FactionChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/FactionChatLogEntry.cs new file mode 100644 index 00000000..b71e1767 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/FactionChatLogEntry.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class FactionChatLogEntry : ChatLogEntry + { + [ForeignKey(nameof(Faction))] + public int FactionId { get; set; } + + public Faction Faction { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/GangChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/GangChatLogEntry.cs new file mode 100644 index 00000000..8df7c95e --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/GangChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class GangChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/GroupChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/GroupChatLogEntry.cs new file mode 100644 index 00000000..75768a04 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/GroupChatLogEntry.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class GroupChatLogEntry : ChatLogEntry + { + public int GroupId { get; set; } + + [ForeignKey(nameof(GroupId))] + public Group Group { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/LeaderChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/LeaderChatLogEntry.cs new file mode 100644 index 00000000..ab1052c2 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/LeaderChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class LeaderChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/LocalChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/LocalChatLogEntry.cs new file mode 100644 index 00000000..1d68b01a --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/LocalChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class LocalChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/NewsChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/NewsChatLogEntry.cs new file mode 100644 index 00000000..80cc617c --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/NewsChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class NewsChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/Chat/OChatLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/Chat/OChatLogEntry.cs new file mode 100644 index 00000000..4a9dbbe7 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/Chat/OChatLogEntry.cs @@ -0,0 +1,10 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs.Chat +{ + public class OChatLogEntry : ChatLogEntry + { + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/CommandLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/CommandLogEntry.cs new file mode 100644 index 00000000..903c5565 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/CommandLogEntry.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs +{ + public class CommandLogEntry + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + public User User { get; set; } + + public string Command { get; set; } + + public DateTime Time { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/LogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/LogEntry.cs new file mode 100644 index 00000000..0b025ba2 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/LogEntry.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs +{ + public class LogEntry + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + public User User { get; set; } + + public int UserId { get; set; } + + public User AffectedBy { get; set; } + + public int? AffectedById { get; set; } + + public Faction AffectedFaction { get; set; } + + public int? AffectedFactionId { get; set; } + + public string Message { get; set; } + + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public DateTime Time { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Entities/Logs/LoginLogoutLogEntry.cs b/ReallifeGamemode.Database/Entities/Logs/LoginLogoutLogEntry.cs new file mode 100644 index 00000000..56a5ef79 --- /dev/null +++ b/ReallifeGamemode.Database/Entities/Logs/LoginLogoutLogEntry.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Text; + +namespace ReallifeGamemode.Database.Entities.Logs +{ + public class LoginLogoutLogEntry + { + [DatabaseGenerated(DatabaseGeneratedOption.Identity)] + public long Id { get; set; } + + public string Username { get; set; } + + public string SocialClubName { get; set; } + + public User User { get; set; } + + public long PlayerId { get; set; } + + public string IpAddress { get; set; } + + public bool LoginLogout { get; set; } + + public DateTime Time { get; set; } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.Designer.cs b/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.Designer.cs new file mode 100644 index 00000000..7652c2e8 --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.Designer.cs @@ -0,0 +1,2010 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using ReallifeGamemode.Database.Models; + +namespace ReallifeGamemode.Database.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20210419090246_CommandLogs")] + partial class CommandLogs + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.3") + .HasAnnotation("PropertyAccessMode", PropertyAccessMode.PreferFieldDuringConstruction) + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ATM", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Faulty") + .HasColumnType("tinyint(1)"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ATMs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Applied") + .HasColumnType("int"); + + b.Property("BannedBy") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Reason") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("UntilDateTime") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Bans"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("BusRoutes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusRouteId") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BusRouteId"); + + b.ToTable("BusRoutesPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.ToTable("BusinessBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessData", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("BusinessData"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ageing") + .HasColumnType("tinyint unsigned"); + + b.Property("AgeingOpacity") + .HasColumnType("float"); + + b.Property("BeardColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Blemishes") + .HasColumnType("tinyint unsigned"); + + b.Property("BlemishesOpacity") + .HasColumnType("float"); + + b.Property("Blush") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushColor") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushOpacity") + .HasColumnType("float"); + + b.Property("BrowDepth") + .HasColumnType("float"); + + b.Property("BrowHeight") + .HasColumnType("float"); + + b.Property("CheekDepth") + .HasColumnType("float"); + + b.Property("CheekboneHeight") + .HasColumnType("float"); + + b.Property("CheekboneWidth") + .HasColumnType("float"); + + b.Property("ChestHair") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairOpacity") + .HasColumnType("float"); + + b.Property("ChinDepth") + .HasColumnType("float"); + + b.Property("ChinHeight") + .HasColumnType("float"); + + b.Property("ChinIndent") + .HasColumnType("float"); + + b.Property("ChinWidth") + .HasColumnType("float"); + + b.Property("Complexion") + .HasColumnType("tinyint unsigned"); + + b.Property("ComplexionOpacity") + .HasColumnType("float"); + + b.Property("EyeColor") + .HasColumnType("tinyint unsigned"); + + b.Property("EyeSize") + .HasColumnType("float"); + + b.Property("EyebrowColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Eyebrows") + .HasColumnType("tinyint unsigned"); + + b.Property("EyebrowsOpacity") + .HasColumnType("float"); + + b.Property("FacialHair") + .HasColumnType("tinyint unsigned"); + + b.Property("FacialHairOpacity") + .HasColumnType("float"); + + b.Property("Father") + .HasColumnType("tinyint unsigned"); + + b.Property("Freckles") + .HasColumnType("tinyint unsigned"); + + b.Property("FrecklesOpacity") + .HasColumnType("float"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Hair") + .HasColumnType("tinyint unsigned"); + + b.Property("HairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("HairHighlightColor") + .HasColumnType("tinyint unsigned"); + + b.Property("JawShape") + .HasColumnType("float"); + + b.Property("JawWidth") + .HasColumnType("float"); + + b.Property("LipThickness") + .HasColumnType("float"); + + b.Property("Lipstick") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickColor") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickOpacity") + .HasColumnType("float"); + + b.Property("Makeup") + .HasColumnType("tinyint unsigned"); + + b.Property("MakeupOpacity") + .HasColumnType("float"); + + b.Property("Mother") + .HasColumnType("tinyint unsigned"); + + b.Property("NeckWidth") + .HasColumnType("float"); + + b.Property("NoseBottomHeight") + .HasColumnType("float"); + + b.Property("NoseBridgeDepth") + .HasColumnType("float"); + + b.Property("NoseBroken") + .HasColumnType("float"); + + b.Property("NoseTipHeight") + .HasColumnType("float"); + + b.Property("NoseTipLength") + .HasColumnType("float"); + + b.Property("NoseWidth") + .HasColumnType("float"); + + b.Property("Similarity") + .HasColumnType("float"); + + b.Property("SkinSimilarity") + .HasColumnType("float"); + + b.Property("SunDamage") + .HasColumnType("tinyint unsigned"); + + b.Property("SunDamageOpacity") + .HasColumnType("float"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Characters"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("Duty") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.Property("Texture") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CharacterClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ClothCombination", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Top") + .HasColumnType("int"); + + b.Property("Torso") + .HasColumnType("int"); + + b.Property("Undershirt") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ClothCombinations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Radius") + .HasColumnType("float"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("Doors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("DutyClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("GangOwned") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("StateOwned") + .HasColumnType("tinyint(1)"); + + b.Property("WeaponDealTime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Factions"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("FactionBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("RankName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionRanks"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammount") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Rank") + .HasColumnType("int"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GotoPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("GotoPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Groups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("GroupBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("CanRentIn") + .HasColumnType("tinyint(1)"); + + b.Property("LastRentSetTime") + .HasColumnType("datetime(6)"); + + b.Property("OwnerId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("RentalFee") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Houses"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("HouseBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("HouseId"); + + b.HasIndex("UserId"); + + b.ToTable("HouseRentals"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Interior", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("EnterPositionStr") + .HasColumnName("EnterPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ExitPositionStr") + .HasColumnName("ExitPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("Interiors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("double"); + + b.Property("X") + .HasColumnType("double"); + + b.Property("Y") + .HasColumnType("double"); + + b.Property("Z") + .HasColumnType("double"); + + b.HasKey("Id"); + + b.ToTable("Locations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.BankAccountTransactionHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Fee") + .HasColumnType("int"); + + b.Property("MoneySent") + .HasColumnType("int"); + + b.Property("NewReceiverBalance") + .HasColumnType("int"); + + b.Property("NewSenderBalance") + .HasColumnType("int"); + + b.Property("Origin") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Receiver") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("ReceiverBalance") + .HasColumnType("int"); + + b.Property("Sender") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("SenderBalance") + .HasColumnType("int"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("BankAccountTransactionLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Command") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CommandLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CauseOfDeath") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("KillerHeading") + .HasColumnType("float"); + + b.Property("KillerId") + .HasColumnType("int"); + + b.Property("KillerPositionX") + .HasColumnType("float"); + + b.Property("KillerPositionY") + .HasColumnType("float"); + + b.Property("KillerPositionZ") + .HasColumnType("float"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("VictimHeading") + .HasColumnType("float"); + + b.Property("VictimId") + .HasColumnType("int"); + + b.Property("VictimPositionX") + .HasColumnType("float"); + + b.Property("VictimPositionY") + .HasColumnType("float"); + + b.Property("VictimPositionZ") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("KillerId"); + + b.HasIndex("VictimId"); + + b.ToTable("DeathLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Caption") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Content") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Timestamp") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("News"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedBlip", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Alpha") + .HasColumnType("tinyint unsigned"); + + b.Property("Color") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("ShortRange") + .HasColumnType("tinyint(1)"); + + b.Property("Sprite") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.ToTable("Blips"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedMarker", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DirectionX") + .HasColumnType("float"); + + b.Property("DirectionY") + .HasColumnType("float"); + + b.Property("DirectionZ") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("tinyint unsigned"); + + b.Property("Visible") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Markers"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("HashModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Peds"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPickup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("PositionX") + .HasColumnType("float") + .HasMaxLength(128); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RespawnTime") + .HasColumnType("int"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Vehicle") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Pickups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedTextLabel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Font") + .HasColumnType("tinyint unsigned"); + + b.Property("LOS") + .HasColumnType("tinyint(1)"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("TextLabels"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVariable", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Variable") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ServerVariables"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVehicle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("DistanceDriven") + .HasColumnType("float"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("Livery") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int unsigned"); + + b.Property("NumberPlate") + .HasColumnType("varchar(8) CHARACTER SET utf8mb4") + .HasMaxLength(8); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("PrimaryColor") + .HasColumnType("int"); + + b.Property("SecondaryColor") + .HasColumnType("int"); + + b.Property("TankAmount") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ServerVehicles"); + + b.HasDiscriminator("Discriminator").HasValue("ServerVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopClothe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ClotheId") + .HasColumnType("int"); + + b.Property("ComponentId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("TypeId") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ShopClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("ShopId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ShopItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.TuningGarage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("TuningGarages"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Turfs", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("MaxValue") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Owner") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Range") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Surplus") + .HasColumnType("tinyint(1)"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Vector") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("Turfs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AdminLevel") + .HasColumnType("int"); + + b.Property("BanId") + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("BusSkill") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Dead") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseBike") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseVehicle") + .HasColumnType("tinyint(1)"); + + b.Property("Email") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("FactionLeader") + .HasColumnType("tinyint(1)"); + + b.Property("FactionRankId") + .HasColumnType("int"); + + b.Property("FlyingLicensePlane") + .HasColumnType("tinyint(1)"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("GroupRank") + .HasColumnType("int"); + + b.Property("Handmoney") + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("JailTime") + .HasColumnType("int"); + + b.Property("JobId") + .HasColumnType("int"); + + b.Property("LogUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Password") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("PaydayTimer") + .HasColumnType("int"); + + b.Property("PilotSkill") + .HasColumnType("int"); + + b.Property("PlayedMinutes") + .HasColumnType("int"); + + b.Property("Points") + .HasColumnType("int"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RegistrationDate") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("SocialClubName") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Wage") + .HasColumnType("int"); + + b.Property("Wanteds") + .HasColumnType("int"); + + b.Property("WeaponLicense") + .HasColumnType("tinyint(1)"); + + b.Property("failpoints") + .HasColumnType("int"); + + b.Property("otheramount") + .HasColumnType("int"); + + b.Property("trashcount") + .HasColumnType("int"); + + b.Property("warn") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BanId"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.HasIndex("CharacterId"); + + b.HasIndex("FactionId"); + + b.HasIndex("FactionRankId"); + + b.HasIndex("GroupId"); + + b.HasIndex("HouseId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("UserBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("WeaponId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("WeaponId"); + + b.ToTable("UserWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("VehicleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VehicleId"); + + b.ToTable("VehicleItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ModId") + .HasColumnType("int"); + + b.Property("ServerVehicleId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ServerVehicleId", "Slot") + .IsUnique(); + + b.ToTable("VehicleMods"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("AmmunationActive") + .HasColumnType("tinyint(1)"); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("Legal") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("float"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Weapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.WeaponCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WeaponCategories"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Whitelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WhitelistEntries"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BuyPrice") + .HasColumnType("int"); + + b.Property("Owners") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.ToTable("FactionVehicles"); + + b.HasDiscriminator().HasValue("FactionVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("GroupVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.JobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("JobId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("JobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobSpawnVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobSpawnVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("SavedVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.SchoolVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("SchoolId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("SchoolVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.ToTable("ShopVehicles"); + + b.HasDiscriminator().HasValue("ShopVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("Price") + .HasColumnName("UserVehicle_Price") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasIndex("UserId"); + + b.ToTable("UserVehicles"); + + b.HasDiscriminator().HasValue("UserVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.BusRoute", "BusRoute") + .WithMany("RoutePoints") + .HasForeignKey("BusRouteId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.FactionBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.GroupBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.HouseBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Owner") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany("Rentals") + .HasForeignKey("HouseId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "Killer") + .WithMany() + .HasForeignKey("KillerId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Victim") + .WithMany() + .HasForeignKey("VictimId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Ban", "Ban") + .WithMany() + .HasForeignKey("BanId"); + + b.HasOne("ReallifeGamemode.Database.Entities.UserBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + + b.HasOne("ReallifeGamemode.Database.Entities.FactionRank", "FactionRank") + .WithMany() + .HasForeignKey("FactionRankId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany() + .HasForeignKey("HouseId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("ReallifeGamemode.Database.Entities.Weapon", "Weapon") + .WithMany() + .HasForeignKey("WeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("VehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("ServerVehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.WeaponCategory", "WeaponCategory") + .WithMany() + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.cs b/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.cs new file mode 100644 index 00000000..45864b80 --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419090246_CommandLogs.cs @@ -0,0 +1,44 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace ReallifeGamemode.Database.Migrations +{ + public partial class CommandLogs : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "CommandLogs", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(nullable: true), + Command = table.Column(nullable: true), + Time = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_CommandLogs", x => x.Id); + table.ForeignKey( + name: "FK_CommandLogs_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_CommandLogs_UserId", + table: "CommandLogs", + column: "UserId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "CommandLogs"); + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.Designer.cs b/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.Designer.cs new file mode 100644 index 00000000..d26084ca --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.Designer.cs @@ -0,0 +1,2051 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using ReallifeGamemode.Database.Models; + +namespace ReallifeGamemode.Database.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20210419100958_LoginLogoutLogs")] + partial class LoginLogoutLogs + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.3") + .HasAnnotation("PropertyAccessMode", PropertyAccessMode.PreferFieldDuringConstruction) + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ATM", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Faulty") + .HasColumnType("tinyint(1)"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ATMs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Applied") + .HasColumnType("int"); + + b.Property("BannedBy") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Reason") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("UntilDateTime") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Bans"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("BusRoutes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusRouteId") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BusRouteId"); + + b.ToTable("BusRoutesPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.ToTable("BusinessBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessData", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("BusinessData"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ageing") + .HasColumnType("tinyint unsigned"); + + b.Property("AgeingOpacity") + .HasColumnType("float"); + + b.Property("BeardColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Blemishes") + .HasColumnType("tinyint unsigned"); + + b.Property("BlemishesOpacity") + .HasColumnType("float"); + + b.Property("Blush") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushColor") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushOpacity") + .HasColumnType("float"); + + b.Property("BrowDepth") + .HasColumnType("float"); + + b.Property("BrowHeight") + .HasColumnType("float"); + + b.Property("CheekDepth") + .HasColumnType("float"); + + b.Property("CheekboneHeight") + .HasColumnType("float"); + + b.Property("CheekboneWidth") + .HasColumnType("float"); + + b.Property("ChestHair") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairOpacity") + .HasColumnType("float"); + + b.Property("ChinDepth") + .HasColumnType("float"); + + b.Property("ChinHeight") + .HasColumnType("float"); + + b.Property("ChinIndent") + .HasColumnType("float"); + + b.Property("ChinWidth") + .HasColumnType("float"); + + b.Property("Complexion") + .HasColumnType("tinyint unsigned"); + + b.Property("ComplexionOpacity") + .HasColumnType("float"); + + b.Property("EyeColor") + .HasColumnType("tinyint unsigned"); + + b.Property("EyeSize") + .HasColumnType("float"); + + b.Property("EyebrowColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Eyebrows") + .HasColumnType("tinyint unsigned"); + + b.Property("EyebrowsOpacity") + .HasColumnType("float"); + + b.Property("FacialHair") + .HasColumnType("tinyint unsigned"); + + b.Property("FacialHairOpacity") + .HasColumnType("float"); + + b.Property("Father") + .HasColumnType("tinyint unsigned"); + + b.Property("Freckles") + .HasColumnType("tinyint unsigned"); + + b.Property("FrecklesOpacity") + .HasColumnType("float"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Hair") + .HasColumnType("tinyint unsigned"); + + b.Property("HairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("HairHighlightColor") + .HasColumnType("tinyint unsigned"); + + b.Property("JawShape") + .HasColumnType("float"); + + b.Property("JawWidth") + .HasColumnType("float"); + + b.Property("LipThickness") + .HasColumnType("float"); + + b.Property("Lipstick") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickColor") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickOpacity") + .HasColumnType("float"); + + b.Property("Makeup") + .HasColumnType("tinyint unsigned"); + + b.Property("MakeupOpacity") + .HasColumnType("float"); + + b.Property("Mother") + .HasColumnType("tinyint unsigned"); + + b.Property("NeckWidth") + .HasColumnType("float"); + + b.Property("NoseBottomHeight") + .HasColumnType("float"); + + b.Property("NoseBridgeDepth") + .HasColumnType("float"); + + b.Property("NoseBroken") + .HasColumnType("float"); + + b.Property("NoseTipHeight") + .HasColumnType("float"); + + b.Property("NoseTipLength") + .HasColumnType("float"); + + b.Property("NoseWidth") + .HasColumnType("float"); + + b.Property("Similarity") + .HasColumnType("float"); + + b.Property("SkinSimilarity") + .HasColumnType("float"); + + b.Property("SunDamage") + .HasColumnType("tinyint unsigned"); + + b.Property("SunDamageOpacity") + .HasColumnType("float"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Characters"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("Duty") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.Property("Texture") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CharacterClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ClothCombination", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Top") + .HasColumnType("int"); + + b.Property("Torso") + .HasColumnType("int"); + + b.Property("Undershirt") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ClothCombinations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Radius") + .HasColumnType("float"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("Doors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("DutyClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("GangOwned") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("StateOwned") + .HasColumnType("tinyint(1)"); + + b.Property("WeaponDealTime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Factions"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("FactionBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("RankName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionRanks"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammount") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Rank") + .HasColumnType("int"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GotoPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("GotoPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Groups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("GroupBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("CanRentIn") + .HasColumnType("tinyint(1)"); + + b.Property("LastRentSetTime") + .HasColumnType("datetime(6)"); + + b.Property("OwnerId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("RentalFee") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Houses"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("HouseBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("HouseId"); + + b.HasIndex("UserId"); + + b.ToTable("HouseRentals"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Interior", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("EnterPositionStr") + .HasColumnName("EnterPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ExitPositionStr") + .HasColumnName("ExitPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("Interiors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("double"); + + b.Property("X") + .HasColumnType("double"); + + b.Property("Y") + .HasColumnType("double"); + + b.Property("Z") + .HasColumnType("double"); + + b.HasKey("Id"); + + b.ToTable("Locations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.BankAccountTransactionHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Fee") + .HasColumnType("int"); + + b.Property("MoneySent") + .HasColumnType("int"); + + b.Property("NewReceiverBalance") + .HasColumnType("int"); + + b.Property("NewSenderBalance") + .HasColumnType("int"); + + b.Property("Origin") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Receiver") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("ReceiverBalance") + .HasColumnType("int"); + + b.Property("Sender") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("SenderBalance") + .HasColumnType("int"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("BankAccountTransactionLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Command") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CommandLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CauseOfDeath") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("KillerHeading") + .HasColumnType("float"); + + b.Property("KillerId") + .HasColumnType("int"); + + b.Property("KillerPositionX") + .HasColumnType("float"); + + b.Property("KillerPositionY") + .HasColumnType("float"); + + b.Property("KillerPositionZ") + .HasColumnType("float"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("VictimHeading") + .HasColumnType("float"); + + b.Property("VictimId") + .HasColumnType("int"); + + b.Property("VictimPositionX") + .HasColumnType("float"); + + b.Property("VictimPositionY") + .HasColumnType("float"); + + b.Property("VictimPositionZ") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("KillerId"); + + b.HasIndex("VictimId"); + + b.ToTable("DeathLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("IpAddress") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("LoginLogout") + .HasColumnType("tinyint(1)"); + + b.Property("PlayerId") + .HasColumnType("bigint"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("Username") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("LoginLogoutLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Caption") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Content") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Timestamp") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("News"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedBlip", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Alpha") + .HasColumnType("tinyint unsigned"); + + b.Property("Color") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("ShortRange") + .HasColumnType("tinyint(1)"); + + b.Property("Sprite") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.ToTable("Blips"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedMarker", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DirectionX") + .HasColumnType("float"); + + b.Property("DirectionY") + .HasColumnType("float"); + + b.Property("DirectionZ") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("tinyint unsigned"); + + b.Property("Visible") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Markers"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("HashModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Peds"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPickup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("PositionX") + .HasColumnType("float") + .HasMaxLength(128); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RespawnTime") + .HasColumnType("int"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Vehicle") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Pickups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedTextLabel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Font") + .HasColumnType("tinyint unsigned"); + + b.Property("LOS") + .HasColumnType("tinyint(1)"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("TextLabels"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVariable", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Variable") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ServerVariables"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVehicle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("DistanceDriven") + .HasColumnType("float"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("Livery") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int unsigned"); + + b.Property("NumberPlate") + .HasColumnType("varchar(8) CHARACTER SET utf8mb4") + .HasMaxLength(8); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("PrimaryColor") + .HasColumnType("int"); + + b.Property("SecondaryColor") + .HasColumnType("int"); + + b.Property("TankAmount") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ServerVehicles"); + + b.HasDiscriminator("Discriminator").HasValue("ServerVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopClothe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ClotheId") + .HasColumnType("int"); + + b.Property("ComponentId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("TypeId") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ShopClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("ShopId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ShopItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.TuningGarage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("TuningGarages"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Turfs", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("MaxValue") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Owner") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Range") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Surplus") + .HasColumnType("tinyint(1)"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Vector") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("Turfs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AdminLevel") + .HasColumnType("int"); + + b.Property("BanId") + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("BusSkill") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Dead") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseBike") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseVehicle") + .HasColumnType("tinyint(1)"); + + b.Property("Email") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("FactionLeader") + .HasColumnType("tinyint(1)"); + + b.Property("FactionRankId") + .HasColumnType("int"); + + b.Property("FlyingLicensePlane") + .HasColumnType("tinyint(1)"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("GroupRank") + .HasColumnType("int"); + + b.Property("Handmoney") + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("JailTime") + .HasColumnType("int"); + + b.Property("JobId") + .HasColumnType("int"); + + b.Property("LogUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Password") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("PaydayTimer") + .HasColumnType("int"); + + b.Property("PilotSkill") + .HasColumnType("int"); + + b.Property("PlayedMinutes") + .HasColumnType("int"); + + b.Property("Points") + .HasColumnType("int"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RegistrationDate") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("SocialClubName") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Wage") + .HasColumnType("int"); + + b.Property("Wanteds") + .HasColumnType("int"); + + b.Property("WeaponLicense") + .HasColumnType("tinyint(1)"); + + b.Property("failpoints") + .HasColumnType("int"); + + b.Property("otheramount") + .HasColumnType("int"); + + b.Property("trashcount") + .HasColumnType("int"); + + b.Property("warn") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BanId"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.HasIndex("CharacterId"); + + b.HasIndex("FactionId"); + + b.HasIndex("FactionRankId"); + + b.HasIndex("GroupId"); + + b.HasIndex("HouseId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("UserBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("WeaponId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("WeaponId"); + + b.ToTable("UserWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("VehicleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VehicleId"); + + b.ToTable("VehicleItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ModId") + .HasColumnType("int"); + + b.Property("ServerVehicleId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ServerVehicleId", "Slot") + .IsUnique(); + + b.ToTable("VehicleMods"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("AmmunationActive") + .HasColumnType("tinyint(1)"); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("Legal") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("float"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Weapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.WeaponCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WeaponCategories"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Whitelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WhitelistEntries"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BuyPrice") + .HasColumnType("int"); + + b.Property("Owners") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.ToTable("FactionVehicles"); + + b.HasDiscriminator().HasValue("FactionVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("GroupVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.JobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("JobId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("JobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobSpawnVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobSpawnVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("SavedVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.SchoolVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("SchoolId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("SchoolVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.ToTable("ShopVehicles"); + + b.HasDiscriminator().HasValue("ShopVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("Price") + .HasColumnName("UserVehicle_Price") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasIndex("UserId"); + + b.ToTable("UserVehicles"); + + b.HasDiscriminator().HasValue("UserVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.BusRoute", "BusRoute") + .WithMany("RoutePoints") + .HasForeignKey("BusRouteId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.FactionBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.GroupBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.HouseBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Owner") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany("Rentals") + .HasForeignKey("HouseId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "Killer") + .WithMany() + .HasForeignKey("KillerId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Victim") + .WithMany() + .HasForeignKey("VictimId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Ban", "Ban") + .WithMany() + .HasForeignKey("BanId"); + + b.HasOne("ReallifeGamemode.Database.Entities.UserBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + + b.HasOne("ReallifeGamemode.Database.Entities.FactionRank", "FactionRank") + .WithMany() + .HasForeignKey("FactionRankId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany() + .HasForeignKey("HouseId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("ReallifeGamemode.Database.Entities.Weapon", "Weapon") + .WithMany() + .HasForeignKey("WeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("VehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("ServerVehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.WeaponCategory", "WeaponCategory") + .WithMany() + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.cs b/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.cs new file mode 100644 index 00000000..7f6b3fef --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419100958_LoginLogoutLogs.cs @@ -0,0 +1,48 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace ReallifeGamemode.Database.Migrations +{ + public partial class LoginLogoutLogs : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "LoginLogoutLogs", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Username = table.Column(nullable: true), + SocialClubName = table.Column(nullable: true), + UserId = table.Column(nullable: true), + PlayerId = table.Column(nullable: false), + IpAddress = table.Column(nullable: true), + LoginLogout = table.Column(nullable: false), + Time = table.Column(nullable: false) + }, + constraints: table => + { + table.PrimaryKey("PK_LoginLogoutLogs", x => x.Id); + table.ForeignKey( + name: "FK_LoginLogoutLogs_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_LoginLogoutLogs_UserId", + table: "LoginLogoutLogs", + column: "UserId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "LoginLogoutLogs"); + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.Designer.cs b/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.Designer.cs new file mode 100644 index 00000000..5b6acf89 --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.Designer.cs @@ -0,0 +1,2167 @@ +// +using System; +using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; +using Microsoft.EntityFrameworkCore.Migrations; +using Microsoft.EntityFrameworkCore.Storage.ValueConversion; +using ReallifeGamemode.Database.Models; + +namespace ReallifeGamemode.Database.Migrations +{ + [DbContext(typeof(DatabaseContext))] + [Migration("20210419104509_ChatLogs")] + partial class ChatLogs + { + protected override void BuildTargetModel(ModelBuilder modelBuilder) + { +#pragma warning disable 612, 618 + modelBuilder + .HasAnnotation("ProductVersion", "3.1.3") + .HasAnnotation("PropertyAccessMode", PropertyAccessMode.PreferFieldDuringConstruction) + .HasAnnotation("Relational:MaxIdentifierLength", 64); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ATM", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Faulty") + .HasColumnType("tinyint(1)"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ATMs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Applied") + .HasColumnType("int"); + + b.Property("BannedBy") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Reason") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("UntilDateTime") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Bans"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoute", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("BusRoutes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusRouteId") + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BusRouteId"); + + b.ToTable("BusRoutesPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.ToTable("BusinessBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusinessData", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("BusinessData"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ageing") + .HasColumnType("tinyint unsigned"); + + b.Property("AgeingOpacity") + .HasColumnType("float"); + + b.Property("BeardColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Blemishes") + .HasColumnType("tinyint unsigned"); + + b.Property("BlemishesOpacity") + .HasColumnType("float"); + + b.Property("Blush") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushColor") + .HasColumnType("tinyint unsigned"); + + b.Property("BlushOpacity") + .HasColumnType("float"); + + b.Property("BrowDepth") + .HasColumnType("float"); + + b.Property("BrowHeight") + .HasColumnType("float"); + + b.Property("CheekDepth") + .HasColumnType("float"); + + b.Property("CheekboneHeight") + .HasColumnType("float"); + + b.Property("CheekboneWidth") + .HasColumnType("float"); + + b.Property("ChestHair") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("ChestHairOpacity") + .HasColumnType("float"); + + b.Property("ChinDepth") + .HasColumnType("float"); + + b.Property("ChinHeight") + .HasColumnType("float"); + + b.Property("ChinIndent") + .HasColumnType("float"); + + b.Property("ChinWidth") + .HasColumnType("float"); + + b.Property("Complexion") + .HasColumnType("tinyint unsigned"); + + b.Property("ComplexionOpacity") + .HasColumnType("float"); + + b.Property("EyeColor") + .HasColumnType("tinyint unsigned"); + + b.Property("EyeSize") + .HasColumnType("float"); + + b.Property("EyebrowColor") + .HasColumnType("tinyint unsigned"); + + b.Property("Eyebrows") + .HasColumnType("tinyint unsigned"); + + b.Property("EyebrowsOpacity") + .HasColumnType("float"); + + b.Property("FacialHair") + .HasColumnType("tinyint unsigned"); + + b.Property("FacialHairOpacity") + .HasColumnType("float"); + + b.Property("Father") + .HasColumnType("tinyint unsigned"); + + b.Property("Freckles") + .HasColumnType("tinyint unsigned"); + + b.Property("FrecklesOpacity") + .HasColumnType("float"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Hair") + .HasColumnType("tinyint unsigned"); + + b.Property("HairColor") + .HasColumnType("tinyint unsigned"); + + b.Property("HairHighlightColor") + .HasColumnType("tinyint unsigned"); + + b.Property("JawShape") + .HasColumnType("float"); + + b.Property("JawWidth") + .HasColumnType("float"); + + b.Property("LipThickness") + .HasColumnType("float"); + + b.Property("Lipstick") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickColor") + .HasColumnType("tinyint unsigned"); + + b.Property("LipstickOpacity") + .HasColumnType("float"); + + b.Property("Makeup") + .HasColumnType("tinyint unsigned"); + + b.Property("MakeupOpacity") + .HasColumnType("float"); + + b.Property("Mother") + .HasColumnType("tinyint unsigned"); + + b.Property("NeckWidth") + .HasColumnType("float"); + + b.Property("NoseBottomHeight") + .HasColumnType("float"); + + b.Property("NoseBridgeDepth") + .HasColumnType("float"); + + b.Property("NoseBroken") + .HasColumnType("float"); + + b.Property("NoseTipHeight") + .HasColumnType("float"); + + b.Property("NoseTipLength") + .HasColumnType("float"); + + b.Property("NoseWidth") + .HasColumnType("float"); + + b.Property("Similarity") + .HasColumnType("float"); + + b.Property("SkinSimilarity") + .HasColumnType("float"); + + b.Property("SunDamage") + .HasColumnType("tinyint unsigned"); + + b.Property("SunDamageOpacity") + .HasColumnType("float"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("Characters"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("Duty") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.Property("Texture") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CharacterClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ClothCombination", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Top") + .HasColumnType("int"); + + b.Property("Torso") + .HasColumnType("int"); + + b.Property("Undershirt") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ClothCombinations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Radius") + .HasColumnType("float"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("Doors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ClothId") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("SlotId") + .HasColumnType("int"); + + b.Property("SlotType") + .HasColumnType("tinyint unsigned"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("DutyClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("GangOwned") + .HasColumnType("tinyint(1)"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("StateOwned") + .HasColumnType("tinyint(1)"); + + b.Property("WeaponDealTime") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Factions"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("FactionBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Order") + .HasColumnType("int"); + + b.Property("RankName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionRanks"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammount") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("Rank") + .HasColumnType("int"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("FactionId"); + + b.ToTable("FactionWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GotoPoint", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Description") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("GotoPoints"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.ToTable("Groups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("GroupBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("CanRentIn") + .HasColumnType("tinyint(1)"); + + b.Property("LastRentSetTime") + .HasColumnType("datetime(6)"); + + b.Property("OwnerId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("RentalFee") + .HasColumnType("int"); + + b.Property("Type") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("OwnerId"); + + b.ToTable("Houses"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Balance") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("HouseBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("HouseId"); + + b.HasIndex("UserId"); + + b.ToTable("HouseRentals"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Interior", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("EnterPositionStr") + .HasColumnName("EnterPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("ExitPositionStr") + .HasColumnName("ExitPosition") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("Interiors"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Location", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Description") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("double"); + + b.Property("X") + .HasColumnType("double"); + + b.Property("Y") + .HasColumnType("double"); + + b.Property("Z") + .HasColumnType("double"); + + b.HasKey("Id"); + + b.ToTable("Locations"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.BankAccountTransactionHistory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Fee") + .HasColumnType("int"); + + b.Property("MoneySent") + .HasColumnType("int"); + + b.Property("NewReceiverBalance") + .HasColumnType("int"); + + b.Property("NewSenderBalance") + .HasColumnType("int"); + + b.Property("Origin") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Receiver") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("ReceiverBalance") + .HasColumnType("int"); + + b.Property("Sender") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("SenderBalance") + .HasColumnType("int"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.HasKey("Id"); + + b.ToTable("BankAccountTransactionLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Text") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("ChatLogs"); + + b.HasDiscriminator("Discriminator").HasValue("ChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Command") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CommandLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("CauseOfDeath") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("KillerHeading") + .HasColumnType("float"); + + b.Property("KillerId") + .HasColumnType("int"); + + b.Property("KillerPositionX") + .HasColumnType("float"); + + b.Property("KillerPositionY") + .HasColumnType("float"); + + b.Property("KillerPositionZ") + .HasColumnType("float"); + + b.Property("Timestamp") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("VictimHeading") + .HasColumnType("float"); + + b.Property("VictimId") + .HasColumnType("int"); + + b.Property("VictimPositionX") + .HasColumnType("float"); + + b.Property("VictimPositionY") + .HasColumnType("float"); + + b.Property("VictimPositionZ") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.HasIndex("KillerId"); + + b.HasIndex("VictimId"); + + b.ToTable("DeathLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("IpAddress") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("LoginLogout") + .HasColumnType("tinyint(1)"); + + b.Property("PlayerId") + .HasColumnType("bigint"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("Username") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("LoginLogoutLogs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Caption") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Content") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Timestamp") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("News"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedBlip", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Alpha") + .HasColumnType("tinyint unsigned"); + + b.Property("Color") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("ShortRange") + .HasColumnType("tinyint(1)"); + + b.Property("Sprite") + .HasColumnType("smallint"); + + b.HasKey("Id"); + + b.ToTable("Blips"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedMarker", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DirectionX") + .HasColumnType("float"); + + b.Property("DirectionY") + .HasColumnType("float"); + + b.Property("DirectionZ") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Scale") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("tinyint unsigned"); + + b.Property("Visible") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Markers"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPed", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("HashModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Type") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("Peds"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedPickup", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("PositionX") + .HasColumnType("float") + .HasMaxLength(128); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RespawnTime") + .HasColumnType("int"); + + b.Property("RotationX") + .HasColumnType("float"); + + b.Property("RotationY") + .HasColumnType("float"); + + b.Property("RotationZ") + .HasColumnType("float"); + + b.Property("Vehicle") + .HasColumnType("tinyint(1)"); + + b.HasKey("Id"); + + b.ToTable("Pickups"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedTextLabel", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("ColorA") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorB") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorG") + .HasColumnType("tinyint unsigned"); + + b.Property("ColorR") + .HasColumnType("tinyint unsigned"); + + b.Property("Dimension") + .HasColumnType("tinyint unsigned"); + + b.Property("DrawDistance") + .HasColumnType("float"); + + b.Property("Font") + .HasColumnType("tinyint unsigned"); + + b.Property("LOS") + .HasColumnType("tinyint(1)"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("Text") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("TextLabels"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVariable", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Variable") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ServerVariables"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ServerVehicle", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .ValueGeneratedOnAdd() + .HasColumnType("tinyint(1)") + .HasDefaultValue(true); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("DistanceDriven") + .HasColumnType("float"); + + b.Property("Heading") + .HasColumnType("float"); + + b.Property("Livery") + .HasColumnType("int"); + + b.Property("Locked") + .HasColumnType("tinyint(1)"); + + b.Property("Model") + .HasColumnType("int unsigned"); + + b.Property("NumberPlate") + .HasColumnType("varchar(8) CHARACTER SET utf8mb4") + .HasMaxLength(8); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("PrimaryColor") + .HasColumnType("int"); + + b.Property("SecondaryColor") + .HasColumnType("int"); + + b.Property("TankAmount") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("ServerVehicles"); + + b.HasDiscriminator("Discriminator").HasValue("ServerVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopClothe", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("int"); + + b.Property("ClotheId") + .HasColumnType("int"); + + b.Property("ComponentId") + .HasColumnType("int"); + + b.Property("Gender") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("TypeId") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("ShopClothes"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.Property("ShopId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.ToTable("ShopItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.TuningGarage", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.Property("Z") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("TuningGarages"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Turfs", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Color") + .HasColumnType("int"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("MaxValue") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Owner") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Range") + .HasColumnType("float"); + + b.Property("Rotation") + .HasColumnType("float"); + + b.Property("Surplus") + .HasColumnType("tinyint(1)"); + + b.Property("Value") + .HasColumnType("int"); + + b.Property("Vector") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("X") + .HasColumnType("float"); + + b.Property("Y") + .HasColumnType("float"); + + b.HasKey("Id"); + + b.ToTable("Turfs"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("AdminLevel") + .HasColumnType("int"); + + b.Property("BanId") + .HasColumnType("int"); + + b.Property("BankAccountId") + .HasColumnType("int"); + + b.Property("BusSkill") + .HasColumnType("int"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("CharacterId") + .HasColumnType("int"); + + b.Property("Dead") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseBike") + .HasColumnType("tinyint(1)"); + + b.Property("DriverLicenseVehicle") + .HasColumnType("tinyint(1)"); + + b.Property("Email") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("FactionId") + .HasColumnType("int"); + + b.Property("FactionLeader") + .HasColumnType("tinyint(1)"); + + b.Property("FactionRankId") + .HasColumnType("int"); + + b.Property("FlyingLicensePlane") + .HasColumnType("tinyint(1)"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.Property("GroupRank") + .HasColumnType("int"); + + b.Property("Handmoney") + .HasColumnType("int"); + + b.Property("HouseId") + .HasColumnType("int"); + + b.Property("JailTime") + .HasColumnType("int"); + + b.Property("JobId") + .HasColumnType("int"); + + b.Property("LogUserId") + .HasColumnType("int"); + + b.Property("Name") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Password") + .HasColumnType("varchar(64) CHARACTER SET utf8mb4") + .HasMaxLength(64); + + b.Property("PaydayTimer") + .HasColumnType("int"); + + b.Property("PilotSkill") + .HasColumnType("int"); + + b.Property("PlayedMinutes") + .HasColumnType("int"); + + b.Property("Points") + .HasColumnType("int"); + + b.Property("PositionX") + .HasColumnType("float"); + + b.Property("PositionY") + .HasColumnType("float"); + + b.Property("PositionZ") + .HasColumnType("float"); + + b.Property("RegistrationDate") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("SocialClubName") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.Property("Wage") + .HasColumnType("int"); + + b.Property("Wanteds") + .HasColumnType("int"); + + b.Property("WeaponLicense") + .HasColumnType("tinyint(1)"); + + b.Property("failpoints") + .HasColumnType("int"); + + b.Property("otheramount") + .HasColumnType("int"); + + b.Property("trashcount") + .HasColumnType("int"); + + b.Property("warn") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("BanId"); + + b.HasIndex("BankAccountId"); + + b.HasIndex("BusinessId") + .IsUnique(); + + b.HasIndex("CharacterId"); + + b.HasIndex("FactionId"); + + b.HasIndex("FactionRankId"); + + b.HasIndex("GroupId"); + + b.HasIndex("HouseId"); + + b.HasIndex("Name") + .IsUnique(); + + b.ToTable("Users"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserBankAccount", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Active") + .HasColumnType("tinyint(1)"); + + b.Property("Balance") + .HasColumnType("int"); + + b.Property("Bic") + .HasColumnType("varchar(12) CHARACTER SET utf8mb4") + .HasMaxLength(12); + + b.Property("Iban") + .HasColumnType("varchar(32) CHARACTER SET utf8mb4") + .HasMaxLength(32); + + b.HasKey("Id"); + + b.ToTable("UserBankAccounts"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("UserItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("WeaponId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.HasIndex("WeaponId"); + + b.ToTable("UserWeapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Amount") + .HasColumnType("int"); + + b.Property("ItemId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.Property("VehicleId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("VehicleId"); + + b.ToTable("VehicleItems"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("ModId") + .HasColumnType("int"); + + b.Property("ServerVehicleId") + .HasColumnType("int"); + + b.Property("Slot") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("ServerVehicleId", "Slot") + .IsUnique(); + + b.ToTable("VehicleMods"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Ammo") + .HasColumnType("int"); + + b.Property("AmmunationActive") + .HasColumnType("tinyint(1)"); + + b.Property("CategoryId") + .HasColumnType("int"); + + b.Property("Legal") + .HasColumnType("tinyint(1)"); + + b.Property("Price") + .HasColumnType("float"); + + b.Property("SlotID") + .HasColumnType("int"); + + b.Property("WeaponModel") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("CategoryId"); + + b.ToTable("Weapons"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.WeaponCategory", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("Category") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WeaponCategories"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Whitelist", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("int"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.ToTable("WhitelistEntries"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.DepartmentChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("DepartmentChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.HasIndex("FactionId"); + + b.HasDiscriminator().HasValue("FactionChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GangChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("GangChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("GroupChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LeaderChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("LeaderChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LocalChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("LocalChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.NewsChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("NewsChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.OChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("OChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BuyPrice") + .HasColumnType("int"); + + b.Property("Owners") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.ToTable("FactionVehicles"); + + b.HasDiscriminator().HasValue("FactionVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("GroupVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.JobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("JobId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("JobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobSpawnVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobSpawnVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.NoobVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("NoobVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Saves.SavedVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.HasDiscriminator().HasValue("SavedVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.SchoolVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("SchoolId") + .HasColumnType("int"); + + b.HasDiscriminator().HasValue("SchoolVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.ShopVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("BusinessId") + .HasColumnType("int"); + + b.Property("Price") + .HasColumnType("int"); + + b.ToTable("ShopVehicles"); + + b.HasDiscriminator().HasValue("ShopVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + + b.Property("Price") + .HasColumnName("UserVehicle_Price") + .HasColumnType("int"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasIndex("UserId"); + + b.ToTable("UserVehicles"); + + b.HasDiscriminator().HasValue("UserVehicle"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Ban", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.BusRoutePoint", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.BusRoute", "BusRoute") + .WithMany("RoutePoints") + .HasForeignKey("BusRouteId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Character", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.CharacterCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Door", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.DutyCloth", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Faction", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.FactionBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionRank", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Group", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.GroupBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.House", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.HouseBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Owner") + .WithMany() + .HasForeignKey("OwnerId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.HouseRental", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany("Rentals") + .HasForeignKey("HouseId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "Killer") + .WithMany() + .HasForeignKey("KillerId"); + + b.HasOne("ReallifeGamemode.Database.Entities.User", "Victim") + .WithMany() + .HasForeignKey("VictimId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.User", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Ban", "Ban") + .WithMany() + .HasForeignKey("BanId"); + + b.HasOne("ReallifeGamemode.Database.Entities.UserBankAccount", "BankAccount") + .WithMany() + .HasForeignKey("BankAccountId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Character", "Character") + .WithMany() + .HasForeignKey("CharacterId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + + b.HasOne("ReallifeGamemode.Database.Entities.FactionRank", "FactionRank") + .WithMany() + .HasForeignKey("FactionRankId"); + + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + + b.HasOne("ReallifeGamemode.Database.Entities.House", "House") + .WithMany() + .HasForeignKey("HouseId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserWeapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + + b.HasOne("ReallifeGamemode.Database.Entities.Weapon", "Weapon") + .WithMany() + .HasForeignKey("WeaponId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleItem", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("VehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.VehicleMod", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.ServerVehicle", "Vehicle") + .WithMany() + .HasForeignKey("ServerVehicleId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Weapon", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.WeaponCategory", "WeaponCategory") + .WithMany() + .HasForeignKey("CategoryId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.UserVehicle", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); +#pragma warning restore 612, 618 + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.cs b/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.cs new file mode 100644 index 00000000..75e644a0 --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210419104509_ChatLogs.cs @@ -0,0 +1,70 @@ +using System; +using Microsoft.EntityFrameworkCore.Metadata; +using Microsoft.EntityFrameworkCore.Migrations; + +namespace ReallifeGamemode.Database.Migrations +{ + public partial class ChatLogs : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.CreateTable( + name: "ChatLogs", + columns: table => new + { + Id = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + UserId = table.Column(nullable: true), + Text = table.Column(nullable: true), + Time = table.Column(nullable: false) + .Annotation("MySql:ValueGenerationStrategy", MySqlValueGenerationStrategy.IdentityColumn), + Discriminator = table.Column(nullable: false), + FactionId = table.Column(nullable: true), + GroupId = table.Column(nullable: true) + }, + constraints: table => + { + table.PrimaryKey("PK_ChatLogs", x => x.Id); + table.ForeignKey( + name: "FK_ChatLogs_Users_UserId", + column: x => x.UserId, + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ChatLogs_Factions_FactionId", + column: x => x.FactionId, + principalTable: "Factions", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + table.ForeignKey( + name: "FK_ChatLogs_Groups_GroupId", + column: x => x.GroupId, + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + }); + + migrationBuilder.CreateIndex( + name: "IX_ChatLogs_UserId", + table: "ChatLogs", + column: "UserId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatLogs_FactionId", + table: "ChatLogs", + column: "FactionId"); + + migrationBuilder.CreateIndex( + name: "IX_ChatLogs_GroupId", + table: "ChatLogs", + column: "GroupId"); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropTable( + name: "ChatLogs"); + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs b/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs index d392d034..a13f30e6 100644 --- a/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs +++ b/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs @@ -797,6 +797,57 @@ namespace ReallifeGamemode.Database.Migrations b.ToTable("BankAccountTransactionLogs"); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Discriminator") + .IsRequired() + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Text") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .ValueGeneratedOnAdd() + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("ChatLogs"); + + b.HasDiscriminator("Discriminator").HasValue("ChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("Command") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("CommandLogs"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => { b.Property("Id") @@ -850,6 +901,40 @@ namespace ReallifeGamemode.Database.Migrations b.ToTable("DeathLogs"); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.Property("Id") + .ValueGeneratedOnAdd() + .HasColumnType("bigint"); + + b.Property("IpAddress") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("LoginLogout") + .HasColumnType("tinyint(1)"); + + b.Property("PlayerId") + .HasColumnType("bigint"); + + b.Property("SocialClubName") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.Property("Time") + .HasColumnType("datetime(6)"); + + b.Property("UserId") + .HasColumnType("int"); + + b.Property("Username") + .HasColumnType("longtext CHARACTER SET utf8mb4"); + + b.HasKey("Id"); + + b.HasIndex("UserId"); + + b.ToTable("LoginLogoutLogs"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => { b.Property("Id") @@ -1653,6 +1738,72 @@ namespace ReallifeGamemode.Database.Migrations b.ToTable("WhitelistEntries"); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.DepartmentChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("DepartmentChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.Property("FactionId") + .HasColumnType("int"); + + b.HasIndex("FactionId"); + + b.HasDiscriminator().HasValue("FactionChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GangChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("GangChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.Property("GroupId") + .HasColumnType("int"); + + b.HasIndex("GroupId"); + + b.HasDiscriminator().HasValue("GroupChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LeaderChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("LeaderChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.LocalChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("LocalChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.NewsChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("NewsChatLogEntry"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.OChatLogEntry", b => + { + b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); + + b.HasDiscriminator().HasValue("OChatLogEntry"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.FactionVehicle", b => { b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); @@ -1856,6 +2007,20 @@ namespace ReallifeGamemode.Database.Migrations .HasForeignKey("UserId"); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Death", b => { b.HasOne("ReallifeGamemode.Database.Entities.User", "Killer") @@ -1869,6 +2034,13 @@ namespace ReallifeGamemode.Database.Migrations .IsRequired(); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.LoginLogoutLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.User", "User") + .WithMany() + .HasForeignKey("UserId"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.News", b => { b.HasOne("ReallifeGamemode.Database.Entities.User", "User") @@ -1958,6 +2130,20 @@ namespace ReallifeGamemode.Database.Migrations .IsRequired(); }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.FactionChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") + .WithMany() + .HasForeignKey("FactionId"); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId"); + }); + modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => { b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") diff --git a/ReallifeGamemode.Database/Models/DatabaseContext.cs b/ReallifeGamemode.Database/Models/DatabaseContext.cs index 890b0768..6a8fb10d 100644 --- a/ReallifeGamemode.Database/Models/DatabaseContext.cs +++ b/ReallifeGamemode.Database/Models/DatabaseContext.cs @@ -53,7 +53,7 @@ namespace ReallifeGamemode.Database.Models e.HasIndex(u => u.Name) .IsUnique(true); }); - + modelBuilder.Entity() .Property(sv => sv.Active) @@ -87,7 +87,7 @@ namespace ReallifeGamemode.Database.Models public DbSet FactionVehicles { get; set; } //Shops - public DbSet ShopClothes { get; set; } + public DbSet ShopClothes { get; set; } public DbSet ShopItems { get; set; } public DbSet Weapons { get; set; } public DbSet WeaponCategories { get; set; } @@ -97,6 +97,21 @@ namespace ReallifeGamemode.Database.Models //public DbSet BanLogs { get; set; } public DbSet BankAccountTransactionLogs { get; set; } public DbSet DeathLogs { get; set; } + public DbSet CommandLogs { get; set; } + public DbSet LoginLogoutLogs { get; set; } + + // Chat Logs + + public DbSet ChatLogs { get; set; } + public DbSet FactionChatLogs { get; set; } + public DbSet DepartmentChatLogs { get; set; } + public DbSet GangChatLogs { get; set; } + public DbSet GroupChatLogs { get; set; } + public DbSet LeaderChatLogs { get; set; } + public DbSet LocalChatLogs { get; set; } + public DbSet NewsChatLogs { get; set; } + public DbSet OChatLogs { get; set; } + //Saves public DbSet ATMs { get; set; } diff --git a/ReallifeGamemode.Server.Core/Commands/CommandHandler.cs b/ReallifeGamemode.Server.Core/Commands/CommandHandler.cs index 91819a84..a372974b 100644 --- a/ReallifeGamemode.Server.Core/Commands/CommandHandler.cs +++ b/ReallifeGamemode.Server.Core/Commands/CommandHandler.cs @@ -8,6 +8,8 @@ using ReallifeGamemode.Server.Types; using ReallifeGamemode.Server.Common; using ReallifeGamemode.Server.Log; using Microsoft.Extensions.Logging; +using ReallifeGamemode.Database.Entities.Logs; +using ReallifeGamemode.Server.Core.Extensions; namespace ReallifeGamemode.Server.Core.Commands { @@ -33,6 +35,18 @@ namespace ReallifeGamemode.Server.Core.Commands logger.LogInformation("Player '{Name}' executed command '{command}'", player.Name, command); + using var dbContext = Main.GetDbContext(); + + var commandLogEntry = new CommandLogEntry() + { + Command = "/" + string.Join(' ', args), + Time = DateTime.Now, + User = player.GetUser(dbContext) + }; + + dbContext.CommandLogs.Add(commandLogEntry); + dbContext.SaveChanges(); + if (legacyCommands.Contains(command)) { return; diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 90862772..4a29423d 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -7,6 +7,7 @@ using GTANetworkAPI; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; using ReallifeGamemode.Database.Entities; +using ReallifeGamemode.Database.Entities.Logs.Chat; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Business; using ReallifeGamemode.Server.Classes; @@ -239,6 +240,30 @@ namespace ReallifeGamemode.Server.Commands player.SendNotification("~g~[Info]~w~ Connect-Logs werden nun angezeigt."); } break; + case "d": + if (player.HasData("togd")) + { + player.ResetData("togd"); + player.SendNotification("~g~[Info]~w~ D-Chat wird nun ausgeblendet."); + } + else + { + player.SetData("togd", true); + player.SendNotification("~g~[Info]~w~ D-Chat wird nun angezeigt."); + } + break; + case "ga": + if (player.HasData("togga")) + { + player.ResetData("togga"); + player.SendNotification("~g~[Info]~w~ GA-Chat wird nun ausgeblendet."); + } + else + { + player.SetData("togga", true); + player.SendNotification("~g~[Info]~w~ GA-Chat wird nun angezeigt."); + } + break; } } @@ -258,11 +283,13 @@ namespace ReallifeGamemode.Server.Commands } if (player.GetData("SAdminduty") == false) { + player.TriggerEvent("toggleTSupportMode", true); player.SetData("SAdminduty", true); ChatService.SendMessage(player, "~g~ ** " + "Du befindest dich im T-Support"); } else { + player.TriggerEvent("toggleTSupportMode", false); player.SetData("SAdminduty", false); ChatService.SendMessage(player, "!{#ee4d2e}** " + "Du befindest dich nicht mehr im T-Support"); } @@ -302,13 +329,31 @@ namespace ReallifeGamemode.Server.Commands [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)] public void CmdAdminO(Player player, string message) { - if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) + if(!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + User user = player.GetUser(dbContext); + + if (!user.IsAdmin(AdminLevel.SUPPORTER)) { ChatService.NotAuthorized(player); return; } message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + + var logEntry = new OChatLogEntry() + { + Text = message, + UserId = user.Id, + }; + + dbContext.OChatLogs.Add(logEntry); + dbContext.SaveChanges(); + message = Regex.Replace(message, "#([0-9A-Fa-f]{6})", m => "!{" + m.Groups[0].Value + "}"); string publicMessage = "~b~(( " + player.GetUser().AdminLevel.GetName() + " " + player.Name + ": " + message + " ~b~))"; @@ -1423,6 +1468,33 @@ namespace ReallifeGamemode.Server.Commands Medic.delReviveTask(target); } + [Command("aunshow", "~m~Benutzung:~s~ /aunshow")] + public void CmdAdminUnshow(Player player) + { + User user = player.GetUser(); + if (!user.IsAdmin(AdminLevel.HEADADMIN)) + { + ChatService.NotAuthorized(player); + return; + } + + bool currentStatus = user.GetData("adminUnshow"); + currentStatus = !currentStatus; + user.SetData("adminUnshow", currentStatus); + player.TriggerEvent("toggleAdminUnshowMode", currentStatus); + + user.SetBlipAndNametagColor(); + + if(currentStatus) + { + ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du bist nun Unshow"); + } + else + { + ChatService.SendMessage(player, "~b~[ADMIN]~s~ Du bist nun nicht mehr Unshow"); + } + } + [Command("setap", "~m~Benutzung: ~s~/setap [Spieler] (Armor)")] public void CmdAdminSetAP(Player player, string name, int armor = 100) { @@ -1693,6 +1765,32 @@ namespace ReallifeGamemode.Server.Commands NAPI.Vehicle.SetVehicleTyreSmokeColor(veh, new Color(r, g, b)); } + [Command("spectate", "~m~Benutzung: ~s~/spectate [NAME/ID]", Alias = "spec")] + public void CmdAdminSpectate(Player player, string targetname = null) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + Player target; + if (targetname != null) + { + target = PlayerService.GetPlayerByNameOrId(targetname); + if (target == null || !target.IsLoggedIn()) + { + ChatService.PlayerNotFound(player); + return; + } + player.TriggerEvent("SERVER:ADMIN_SPECTATE", target); + } + else + { + player.TriggerEvent("SERVER:ADMIN_STOP_SPECTATE"); + } + } + + #endregion Admin #region ALevel1337 @@ -2066,6 +2164,7 @@ namespace ReallifeGamemode.Server.Commands return; } + [Command("showtuningmenu", "~m~Benutzung: ~s~/showtuningmenu", Alias = "stm")] public void CmdAdminShowtuningmenu(Player player) { diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 2383b2fe..d9dd2668 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -5,6 +5,7 @@ using System.Text.RegularExpressions; using GTANetworkAPI; using Microsoft.EntityFrameworkCore; using ReallifeGamemode.Database.Entities; +using ReallifeGamemode.Database.Entities.Logs.Chat; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Admin; using ReallifeGamemode.Server.Extensions; @@ -30,7 +31,15 @@ namespace ReallifeGamemode.Server.Commands [Command("f", "~m~Benutzung: ~s~/f [Nachricht]", GreedyArg = true)] public void CmdFactionF(Player player, string message) { - Faction f = player.GetUser()?.Faction; + if (!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + User user = player.GetUser(); + + Faction f = user?.Faction; if (f == null || f.StateOwned) { ChatService.NotAuthorized(player); @@ -39,51 +48,78 @@ namespace ReallifeGamemode.Server.Commands message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); - string broadcastMessage = "!{02FCFF}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + " **"; + var logEntry = new FactionChatLogEntry() + { + Text = message, + UserId = user.Id, + FactionId = user.Faction.Id, + }; + + dbContext.FactionChatLogs.Add(logEntry); + dbContext.SaveChanges(); + + string broadcastMessage = "!{02FCFF}** " + user.FactionRank.RankName + " " + player.Name + ": " + message + " **"; ChatService.BroadcastFaction(broadcastMessage, f); } [Command("ga", "~m~Benutzung: ~s~/ga [Nachricht]", GreedyArg = true)] public void CmdFactionGA(Player player, string message) { - User user = player.GetUser(); + if (!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + + User user = player.GetUser(dbContext); Faction f = user?.Faction; - if ((f == null || f.StateOwned) && !user.IsAdmin(AdminLevel.ADMIN)) + if ((f == null || !f.GangOwned) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("togga"))) { ChatService.NotAuthorized(player); return; } - if (f?.Name == "Ballas" || f?.Name == "Grove" || user.IsAdmin(AdminLevel.ADMIN)) + + message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + + string rank = string.Empty; + + if (f?.GangOwned == true) { - message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); - - string rank = string.Empty; - - if (f?.Name == "Ballas" || f?.Name == "Grove") - { - rank = player.GetUser().GetFactionRank().RankName; - } - else - { - rank = "[ADMIN]"; - } - - string broadcastMessage = "!{FF0000}** " + rank + " " + player.Name + ": " + message + " **"; - using (var context = new DatabaseContext()) - { - ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true); - } + rank = user.FactionRank.RankName; } else { - return; + rank = "[ADMIN]"; + } + + var logEntry = new GangChatLogEntry() + { + Text = message, + UserId = user.Id, + }; + + dbContext.GangChatLogs.Add(logEntry); + dbContext.SaveChanges(); + + string broadcastMessage = "!{FF0000}** " + rank + " " + player.Name + ": " + message + " **"; + using (var context = new DatabaseContext()) + { + ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.GangOwned), true, (admin) => admin.HasData("togga")); } } [Command("r", "~m~Benutzung: ~s~/r [Nachricht]", GreedyArg = true)] public void CmdFactionR(Player player, string message) { - Faction f = player.GetUser()?.Faction; + if (!player.IsLoggedIn()) + { + return; + } + using var dbContext = new DatabaseContext(); + + User user = player.GetUser(dbContext); + Faction f = user?.Faction; if (f == null || !f.StateOwned) { ChatService.NotAuthorized(player); @@ -92,6 +128,16 @@ namespace ReallifeGamemode.Server.Commands message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + var logEntry = new FactionChatLogEntry() + { + Text = message, + UserId = user.Id, + Faction = user.Faction, + }; + + dbContext.FactionChatLogs.Add(logEntry); + dbContext.SaveChanges(); + string broadcastMessage = "!{33AA33}** " + player.GetUser().GetFactionRank().RankName + " " + player.Name + ": " + message + ", over **"; ChatService.BroadcastFaction(broadcastMessage, f); } @@ -99,9 +145,16 @@ namespace ReallifeGamemode.Server.Commands [Command("d", "~m~Benutzung: ~s~/d [Nachricht]", GreedyArg = true)] public void CmdFactionD(Player player, string message) { - User u = player.GetUser(); - Faction f = player.GetUser()?.Faction; - if ((f == null || !f.StateOwned) && !u.IsAdmin(AdminLevel.ADMIN)) + if (!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + + User user = player.GetUser(dbContext); + Faction f = user?.Faction; + if ((f == null || !f.StateOwned) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("todg"))) { ChatService.NotAuthorized(player); return; @@ -113,17 +166,26 @@ namespace ReallifeGamemode.Server.Commands if (f?.StateOwned ?? false) { - factionName = u.GetFactionRank().RankName; + factionName = user.FactionRank.RankName; } else { factionName = "[ADMIN]"; } + var logEntry = new DepartmentChatLogEntry() + { + Text = message, + UserId = user.Id, + }; + + dbContext.DepartmentChatLogs.Add(logEntry); + dbContext.SaveChanges(); + string broadcastMessage = "!{CC3333}** " + factionName + " " + player.Name + ": " + message + ", over **"; using (var context = new DatabaseContext()) { - ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.StateOwned), true); + ChatService.BroadcastFaction(broadcastMessage, context.Factions.ToList().FindAll(c => c.StateOwned), true, (admin) => admin.HasData("togd")); } } @@ -134,23 +196,34 @@ namespace ReallifeGamemode.Server.Commands [Command("news", "~m~Benutzung: ~s~/news [Nachricht]", GreedyArg = true)] public void CmdFactionNR(Player player, string message) { - Faction f = player.GetUser()?.Faction; - if (f == null) + if (!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + + User user = player.GetUser(dbContext); + + Faction f = user?.Faction; + if (f == null || f.Id != 9) { ChatService.NotAuthorized(player); return; } - if (player.GetUser().Faction.Id == 9) - { - message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); - string broadcastMessage = "!{ff9531}** News Reporter" + " " + player.Name + ": " + message + " **"; - ChatService.Broadcast(broadcastMessage); - } - else + var logEntry = new NewsChatLogEntry() { - return; - } + Text = message, + UserId = user.Id, + }; + + dbContext.NewsChatLogs.Add(logEntry); + dbContext.SaveChanges(); + + string broadcastMessage = "!{ff9531}** News Reporter" + " " + player.Name + ": " + message + " **"; + ChatService.Broadcast(broadcastMessage); } #endregion NewsReporter commands @@ -200,7 +273,13 @@ namespace ReallifeGamemode.Server.Commands [Command("lc", "~m~Benutzung: ~s~/lc [Nachricht]", GreedyArg = true)] public void CmdFactionLc(Player player, string message) { - User user = player.GetUser(); + if (!player.IsLoggedIn()) + { + return; + } + using var dbContext = new DatabaseContext(); + + User user = player.GetUser(dbContext); if ((user?.FactionId == null || user.FactionLeader == false) && !user.IsAdmin(AdminLevel.ADMIN)) { ChatService.NotAuthorized(player); @@ -209,10 +288,19 @@ namespace ReallifeGamemode.Server.Commands message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + var logEntry = new LeaderChatLogEntry() + { + Text = message, + UserId = user.Id, + }; + + dbContext.LeaderChatLogs.Add(logEntry); + dbContext.SaveChanges(); + string factionName = string.Empty; if (user.FactionLeader) { - factionName = player.GetUser().Faction.Name; + factionName = user.Faction.Name; } else { @@ -224,7 +312,7 @@ namespace ReallifeGamemode.Server.Commands NAPI.Pools.GetAllPlayers().ForEach(p => { User pUser = p.GetUser(); - if ((pUser?.FactionLeader ?? false) || (pUser.IsAdmin(AdminLevel.ADMIN) && !p.HasData("toglc"))) + if ((pUser?.FactionLeader ?? false) || (pUser.IsAdmin(AdminLevel.ADMIN) && p.HasData("toglc"))) { ChatService.SendMessage(p, broadcastMsg); } @@ -356,7 +444,7 @@ namespace ReallifeGamemode.Server.Commands public void CmdFactionMedicHealive(Player player, string receiver, int price = 10) { Player target = PlayerService.GetPlayerByNameOrId(receiver); - if(target == null || !target.IsLoggedIn()) + if (target == null || !target.IsLoggedIn()) { ChatService.PlayerNotFound(player); return; @@ -539,6 +627,11 @@ namespace ReallifeGamemode.Server.Commands target.TriggerEvent("jailTime", 0); targetUser.Wanteds = 0; + if (PositionManager.cuffPoints.Contains(player)) + { + PositionManager.cuffPoints.Remove(player); + } + targetUser.SetBlipAndNametagColor(); dbContext.SaveChanges(); diff --git a/ReallifeGamemode.Server/Commands/GroupCommands.cs b/ReallifeGamemode.Server/Commands/GroupCommands.cs index 47c790e9..88e89c03 100644 --- a/ReallifeGamemode.Server/Commands/GroupCommands.cs +++ b/ReallifeGamemode.Server/Commands/GroupCommands.cs @@ -1,5 +1,7 @@ -using System.Text.RegularExpressions; -using GTANetworkAPI; +using GTANetworkAPI; +using ReallifeGamemode.Database.Entities; +using ReallifeGamemode.Database.Entities.Logs.Chat; +using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Services; @@ -12,14 +14,33 @@ namespace ReallifeGamemode.Server.Commands [Command("gc", "~m~Benutzung: ~s~/gc [Nachricht]", GreedyArg = true)] public void CmdGroupG(Player player, string message) { - Database.Entities.Group group = player.GetUser().Group; + if(!player.IsLoggedIn()) + { + return; + } + + using var dbContext = new DatabaseContext(); + User user = player.GetUser(dbContext); + + Group group = user?.Group; if (group == null) { ChatService.NotAuthorized(player); return; } - message = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); + + var logEntry = new GroupChatLogEntry() + { + Text = message, + UserId = user.Id, + GroupId = user.Group.Id + }; + + dbContext.GroupChatLogs.Add(logEntry); + dbContext.SaveChanges(); + + message = System.Text.RegularExpressions.Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); message = $"{player.Name}: {message}"; ChatService.BroadcastGroup(message, group); diff --git a/ReallifeGamemode.Server/DrivingSchool/DrivingSchool.cs b/ReallifeGamemode.Server/DrivingSchool/DrivingSchool.cs index 9163cc08..fe51c527 100644 --- a/ReallifeGamemode.Server/DrivingSchool/DrivingSchool.cs +++ b/ReallifeGamemode.Server/DrivingSchool/DrivingSchool.cs @@ -98,8 +98,18 @@ namespace ReallifeGamemode.Server.DrivingSchool private static void EntityEnterBusinessColShape(ColShape colShape, Player client) { + var user = client.GetUser(); if (client.IsInVehicle || !client.IsLoggedIn()) return; - + if (user.GetData("duty")) + { + client.SendNotification("~r~Im Dienst kannst du keinen Führerschein machen", false); + return; + } + if (user.Wanteds > 0) + { + client.SendNotification("~r~Mit Wanteds kannst du keinen Führerschein machen", false); + return; + } client.TriggerEvent("drivingSchoolMenu"); } @@ -112,11 +122,13 @@ namespace ReallifeGamemode.Server.DrivingSchool public void StartDrivingSchool(Player client) { User user = client.GetUser(); + if (user.DriverLicenseVehicle || client.HasData("ActiveSchool")) { client.SendChatMessage("~b~[INFO]~s~ Du besitzt schon einen Führerschein."); return; } + if (user.Handmoney < 2500) { client.SendNotification("~r~[FEHLER]~s~ Du hast nicht genug Geld auf der Hand($2.500)!", true); diff --git a/ReallifeGamemode.Server/Events/Chat.cs b/ReallifeGamemode.Server/Events/Chat.cs index 47f1e8fa..6d6782ca 100644 --- a/ReallifeGamemode.Server/Events/Chat.cs +++ b/ReallifeGamemode.Server/Events/Chat.cs @@ -1,5 +1,8 @@ using System.Text.RegularExpressions; using GTANetworkAPI; +using ReallifeGamemode.Database.Entities.Logs.Chat; +using ReallifeGamemode.Database.Models; +using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Services; namespace ReallifeGamemode.Server.Events @@ -9,8 +12,25 @@ namespace ReallifeGamemode.Server.Events [ServerEvent(Event.ChatMessage)] public void ChatEvent(Player player, string message) { + if(!player.IsLoggedIn()) + { + return; + } + string serverMsg = Regex.Replace(message, "(~[a-zA-Z]~)|(!{(.*)})", ""); if (serverMsg.Trim().Length == 0) return; + + using var dbContext = new DatabaseContext(); + + var logEntry = new LocalChatLogEntry() + { + Text = serverMsg, + UserId = player.GetUser(dbContext).Id + }; + + dbContext.LocalChatLogs.Add(logEntry); + dbContext.SaveChanges(); + NAPI.Player.GetPlayersInRadiusOfPlayer(25, player).ForEach(p => { ChatService.SendMessage(p, $"{player.Name} sagt: {serverMsg}"); diff --git a/ReallifeGamemode.Server/Events/Disconnect.cs b/ReallifeGamemode.Server/Events/Disconnect.cs index 14d74fb3..356d548b 100644 --- a/ReallifeGamemode.Server/Events/Disconnect.cs +++ b/ReallifeGamemode.Server/Events/Disconnect.cs @@ -17,6 +17,7 @@ using ReallifeGamemode.Server.Report; using ReallifeGamemode.Server.Factions.Medic; using ReallifeGamemode.Server.Inventory.Interfaces; using ReallifeGamemode.Server.Inventory; +using ReallifeGamemode.Database.Entities.Logs; /** * @overview Life of German Reallife - Event Login (Login.cs) @@ -40,6 +41,19 @@ namespace ReallifeGamemode.Server.Events return; } + var logEntry = new LoginLogoutLogEntry() + { + LoginLogout = false, + User = user, + PlayerId = player.Handle.Value, + Username = player.Name, + SocialClubName = player.SocialClubName, + IpAddress = player.Address, + Time = DateTime.Now, + }; + + saveUser.LoginLogoutLogs.Add(logEntry); + if (type == DisconnectionType.Left) { NAPI.Util.ConsoleOutput(player.Name + " left"); diff --git a/ReallifeGamemode.Server/Events/EnterVehicle.cs b/ReallifeGamemode.Server/Events/EnterVehicle.cs index 0ac95d38..5725b4a3 100644 --- a/ReallifeGamemode.Server/Events/EnterVehicle.cs +++ b/ReallifeGamemode.Server/Events/EnterVehicle.cs @@ -22,19 +22,22 @@ namespace ReallifeGamemode.Server.Events if (vehicle.HasMarkerBehind()) vehicle.RemoveMarkerBehind(); - if (!VehicleManager.lastDriversInVehicle.ContainsKey(vehicle)) + if(vehicle != null && !string.IsNullOrEmpty(client.Name)) { - VehicleManager.lastDriversInVehicle.Add(vehicle, new Dictionary()); - } + if (!VehicleManager.lastDriversInVehicle.ContainsKey(vehicle)) + { + VehicleManager.lastDriversInVehicle.Add(vehicle, new Dictionary()); + } - VehicleManager.lastDriversInVehicle[vehicle][client.Name] = DateTime.Now; + VehicleManager.lastDriversInVehicle[vehicle][client.Name] = DateTime.Now; + } if (vehicle.GetServerVehicle() is FactionVehicle veh) { User u = client.GetUser(); if (u.FactionId != null && veh.GetOwners().Contains(u.FactionId.Value) - && (veh.Model == VehicleHash.Burrito3 || veh.Model == VehicleHash.Policet) + && (veh.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || veh.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) && vehicle.HasData("weaponDeal") && vehicle.GetData("weaponDeal") == true && (!vehicle.HasData("WeaponDealLoad") || vehicle.GetData("WeaponDealLoad") == false)) @@ -44,7 +47,7 @@ namespace ReallifeGamemode.Server.Events CheckPointHandle.StartCheckPointRoute(client, dealPoint, 5000, 1, 7, 3, true, "loadWeaponTransport"); } else if ((u.FactionId != null) - && ((VehicleHash)vehicle.Model == VehicleHash.Burrito3 || (VehicleHash)vehicle.Model == VehicleHash.Policet) + && (veh.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || veh.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) && vehicle.HasData("WeaponDealLoad") && vehicle.GetData("WeaponDealLoad") == true) { diff --git a/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs b/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs index b63b7661..0370afa7 100644 --- a/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs +++ b/ReallifeGamemode.Server/Events/EnterVehicleAttempt.cs @@ -9,6 +9,7 @@ using ReallifeGamemode.Server.Types; using ReallifeGamemode.Server.Util; using ReallifeGamemode.Server.WeaponDeal; using ReallifeGamemode.Server.Managers; +using ReallifeGamemode.Server.Job; namespace ReallifeGamemode.Server.Events { @@ -28,9 +29,9 @@ namespace ReallifeGamemode.Server.Events if (vehicle.GetServerVehicle() is FactionVehicle veh) { - if (!veh.GetOwners().Contains(player.GetUser().FactionId ?? 0) && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty())) + if (!veh.GetOwners().Contains(player.GetUser().FactionId ?? 0) && !(u.IsAdmin(AdminLevel.HEADADMIN) && player.IsAdminDuty()) && !JobBase.GetPlayerInJob().Contains(player)) { - if ((VehicleHash)vehicle.Model == VehicleHash.Burrito3) + if ((VehicleHash)vehicle.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH) { if (WeaponDealManager.checkWeaponDbyVehicle(vehicle)) return; diff --git a/ReallifeGamemode.Server/Events/ExitVehicle.cs b/ReallifeGamemode.Server/Events/ExitVehicle.cs index b6e0187a..255b4a5c 100644 --- a/ReallifeGamemode.Server/Events/ExitVehicle.cs +++ b/ReallifeGamemode.Server/Events/ExitVehicle.cs @@ -8,6 +8,7 @@ using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Managers; using ReallifeGamemode.Server.Services; using ReallifeGamemode.Server.Util; +using ReallifeGamemode.Server.WeaponDeal; namespace ReallifeGamemode.Server.Events { @@ -27,7 +28,7 @@ namespace ReallifeGamemode.Server.Events User u = client.GetUser(); if ((u.FactionId != null) && (veh.GetOwners().Contains(u.FactionId ?? 0)) - && ((VehicleHash)vehicle.Model == VehicleHash.Burrito3 || (VehicleHash)vehicle.Model == VehicleHash.Policet) + && (veh.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || veh.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) && vehicle.HasData("weaponDeal") && vehicle.GetData("weaponDeal") == true) { @@ -35,7 +36,7 @@ namespace ReallifeGamemode.Server.Events client.TriggerEvent("destroyCP"); } else if ((u.FactionId != null) - && ((VehicleHash)vehicle.Model == VehicleHash.Burrito3 || (VehicleHash)vehicle.Model == VehicleHash.Policet) + && (veh.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || veh.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) && vehicle.HasData("WeaponDealLoad") && vehicle.GetData("WeaponDealLoad") == true) { diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 2652ad41..92a7af80 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -168,6 +168,7 @@ namespace ReallifeGamemode.Server.Events busskill = u.BusSkill, pilotskill = u.PilotSkill, wage = u.Wage, + isActive = JobBase.GetPlayerInJob().Contains(player), }; var memberList = dbContext.Users.Where(f => f.FactionId == u.FactionId && u.FactionId != 0).OrderByDescending(f => f.FactionRank.Order).ThenBy(f => f.Name).Select(m => new @@ -230,8 +231,8 @@ namespace ReallifeGamemode.Server.Events WeaponPoint nearestWeapon = PositionManager.WeaponPoints.Find(w => w.Position.DistanceTo(player.Position) <= 1.5 && w.FactionId == user.FactionId); JailReleasePoint nearestJailReleasePoint = PositionManager.JailReleasePoints.Find(j => j.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 3) && user.GetData("duty")); ElevatorPoint nearestElevatorPoint = PositionManager.ElevatorPoints.Find(e => e.Position.DistanceTo(player.Position) <= 1.5 && (user.FactionId == 1 || user.FactionId == 2 || user.FactionId == 3)); - ClotheshopPoint nearestClotheShopPoint = PositionManager.clotheshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5 && (!user.GetData("duty"))); - FriseurPoint nearestFriseurPoint = PositionManager.friseurPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5 && (!user.GetData("duty"))); + ClotheshopPoint nearestClotheShopPoint = PositionManager.clotheshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5); + FriseurPoint nearestFriseurPoint = PositionManager.friseurPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5); ItemshopPoint nearestItemShopPoint = PositionManager.itemshopPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.5); JobPoint nearestJobPoint = PositionManager.JobPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.6); Player nearestCuffPlayer = PositionManager.cuffPoints.Find(s => s.Position.DistanceTo(player.Position) <= 1.6 && user.GetData("duty")); @@ -239,7 +240,7 @@ namespace ReallifeGamemode.Server.Events if (user?.FactionId != null) { - BehindVehiclePoint nearestBehindVehiclePoint = MarkerBehinVehicle.behindVehiclePoints.Find(s => s.marker.Position.DistanceTo(player.Position) <= 3 && (user.FactionId == 8 || user.FactionId == 7 || user.FactionId == 1 || user.FactionId == 3)); + BehindVehiclePoint nearestBehindVehiclePoint = MarkerBehinVehicle.behindVehiclePoints.Find(s => s.marker.Position.DistanceTo(player.Position) <= 3 && WeaponDealManager.WEAPON_DEAL_FACTIONS.Contains(user.FactionId ?? 0)); if (nearestBehindVehiclePoint != null) { if (player.HasAttachment("ammobox")) return; @@ -452,7 +453,7 @@ namespace ReallifeGamemode.Server.Events int amount = 0; var tempFactionWeapon = weapons.Where(f => f.WeaponModel == weapon).FirstOrDefault(); - if(tempFactionWeapon != null) + if (tempFactionWeapon != null) { amount = tempFactionWeapon.Ammount; } @@ -507,6 +508,16 @@ namespace ReallifeGamemode.Server.Events } if (nearestClotheShopPoint != null) { + if (user.GetData("duty")) + { + player.SendNotification("~r~Im Dienst kannst du keine Kleidung kaufen", false); + return; + } + if (JobBase.GetPlayerInJob().Contains(player)) + { + player.SendNotification("~r~Im aktiven Job kannst du keine Kleidung kaufen", false); + return; + } nearestClotheShopPoint.clotheShop.LoadShopNUI(player); } if (nearestItemShopPoint != null) @@ -515,6 +526,16 @@ namespace ReallifeGamemode.Server.Events } if (nearestFriseurPoint != null) { + if (user.GetData("duty")) + { + player.SendNotification("~r~Im Dienst wirst du nicht vom Friseur bedient", false); + return; + } + if (JobBase.GetPlayerInJob().Contains(player)) + { + player.SendNotification("~r~Im aktiven Job wirst du nicht vom Friseur bedient", false); + return; + } nearestFriseurPoint.friseurShop.LoadShopNUI(player); } if (nearestAmmunationPoint != null) @@ -547,6 +568,16 @@ namespace ReallifeGamemode.Server.Events } if (!job.GetUsersInJob().Contains(player)) { + if (user.GetData("duty")) + { + player.SendNotification("~r~Im Dienst kannst du keinen Job ausführen", false); + return; + } + if (user.Wanteds > 0) + { + player.SendNotification("~r~Mit Wanteds kannst du keinen Job starten", false); + return; + } if (player.GetUser().JobId == 3) { if (nearestJobPoint.Skill > user.PilotSkill) @@ -594,6 +625,15 @@ namespace ReallifeGamemode.Server.Events return; } + if(player.GetData("SellVehicleDecision") == true && player.HasData("VehicleToSell")) + { + InteractionManager.SellPlayerVehicle(player, player.GetData("VehicleToSell")); + player.ResetData("SellVehicleDecision"); + player.ResetData("VehicleToSell"); + player.SendNotification("~g~Du hast dein Fahrzeug verkauft"); + return; + } + User u = player.GetUser(); if (u.JobId == null) return; @@ -655,12 +695,18 @@ namespace ReallifeGamemode.Server.Events List players = NAPI.Pools.GetAllPlayers().Where(p => p.IsLoggedIn() == true).OrderBy(o => o.Handle.Value).ToList(); - var listPlayers = players.Select(p => new + var listPlayers = players.Select(p => { - Id = p.Handle.Value, - p.Name, - p.Ping, - FactionName = p.GetUser()?.Faction?.Name ?? "Zivilist", + User u = p.GetUser(); + + return new + { + Id = p.Handle.Value, + p.Name, + p.Ping, + FactionName = u?.Faction?.Name ?? "Zivilist", + FactionId = u?.FactionId ?? 0 + }; }); player.TriggerEvent("showPlayerlist", JsonConvert.SerializeObject(listPlayers)); } @@ -743,6 +789,13 @@ namespace ReallifeGamemode.Server.Events Medic.MakeHealDecision(player, false); return; } + if (player.GetData("SellVehicleDecision") == true && player.HasData("VehicleToSell")) + { + player.ResetData("SellVehicleDecision"); + player.ResetData("VehicleToSell"); + player.SendNotification("~r~Du hast den Fahrzeugverkauf abgebrochen"); + return; + } if (!player.IsInVehicle) return; if (player.VehicleSeat != 0) return; @@ -769,14 +822,8 @@ namespace ReallifeGamemode.Server.Events } else if (sV is FactionVehicle fV) { - if (fV.Model == VehicleHash.Burrito3 && u.FactionId == 1 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 3 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 7 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 8 - || fV.Model == VehicleHash.Policet && u.FactionId == 1 - || fV.Model == VehicleHash.Policet && u.FactionId == 3 - || fV.Model == VehicleHash.Policet && u.FactionId == 7 - || fV.Model == VehicleHash.Policet && u.FactionId == 8) + if ((fV.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || fV.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) + && WeaponDealManager.WEAPON_DEAL_FACTIONS.Contains(u.FactionId ?? 0)) { VehicleStreaming.SetEngineState(v, !state); } diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index de2ba0cd..197ccbdc 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -13,6 +13,7 @@ using ReallifeGamemode.Database.Entities; using System; using System.Collections.Generic; using ReallifeGamemode.Server.Inventory.Interfaces; +using ReallifeGamemode.Database.Entities.Logs; /** * @overview Life of German Reallife - Event Login (Login.cs) @@ -56,6 +57,20 @@ namespace ReallifeGamemode.Server.Events return; } + var logEntry = new LoginLogoutLogEntry() + { + IpAddress = player.Address, + User = user, + PlayerId = player.Handle.Value, + SocialClubName = player.SocialClubName, + Username = player.Name, + LoginLogout = true, + Time = DateTime.Now + }; + + dbContext.LoginLogoutLogs.Add(logEntry); + dbContext.SaveChanges(); + player.SetData("dbId", user.Id); player.Name = username; player.TriggerEvent("SERVER:Login_Success"); diff --git a/ReallifeGamemode.Server/Events/Register.cs b/ReallifeGamemode.Server/Events/Register.cs index 1ec96ced..37baf622 100644 --- a/ReallifeGamemode.Server/Events/Register.cs +++ b/ReallifeGamemode.Server/Events/Register.cs @@ -6,6 +6,7 @@ using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Util; using System; +using ReallifeGamemode.Database.Entities.Logs; /** * @overview Life of German Reallife - Event Register (Register.cs) @@ -51,7 +52,20 @@ namespace ReallifeGamemode.Server.Events } }; + var logEntry = new LoginLogoutLogEntry() + { + IpAddress = player.Address, + User = user, + PlayerId = player.Handle.Value, + SocialClubName = player.SocialClubName, + Username = player.Name, + LoginLogout = true, + Time = DateTime.Now + }; + dbContext.Users.Add(user); + dbContext.LoginLogoutLogs.Add(logEntry); + dbContext.SaveChanges(); player.SetData("dbId", user.Id); diff --git a/ReallifeGamemode.Server/Events/Vehicle.cs b/ReallifeGamemode.Server/Events/Vehicle.cs index 263b8f8a..c9bbe549 100644 --- a/ReallifeGamemode.Server/Events/Vehicle.cs +++ b/ReallifeGamemode.Server/Events/Vehicle.cs @@ -1,10 +1,12 @@ using System; +using System.Linq; using GTANetworkAPI; using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Types; using ReallifeGamemode.Server.Util; +using ReallifeGamemode.Server.WeaponDeal; namespace ReallifeGamemode.Server.Events { @@ -38,14 +40,8 @@ namespace ReallifeGamemode.Server.Events } else if (sV is FactionVehicle fV) { - if (fV.Model == VehicleHash.Burrito3 && u.FactionId == 1 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 3 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 7 - || fV.Model == VehicleHash.Burrito3 && u.FactionId == 8 - || fV.Model == VehicleHash.Policet && u.FactionId == 1 - || fV.Model == VehicleHash.Policet && u.FactionId == 3 - || fV.Model == VehicleHash.Policet && u.FactionId == 7 - || fV.Model == VehicleHash.Policet && u.FactionId == 8) + if ((fV.Model == WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH || fV.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) + && WeaponDealManager.WEAPON_DEAL_FACTIONS.Contains(u.FactionId ?? 0)) { VehicleStreaming.SetEngineState(v, !state); } diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index 7058cbae..3a665dd0 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -345,8 +345,14 @@ namespace ReallifeGamemode.Server.Extensions } bool duty = user.GetData("duty"); + bool adminUnshow = user.GetData("adminUnshow"); - if (player.GetData("SAdminduty")) + if(adminUnshow) + { + blipColor = -1; + nameTagColor = -3; + } + else if (player.GetData("SAdminduty")) { blipColor = 30; nameTagColor = -2; @@ -378,10 +384,10 @@ namespace ReallifeGamemode.Server.Extensions break; case 4: - blipColor = 5; break; case 5: + blipColor = 33; break; case 6: diff --git a/ReallifeGamemode.Server/Extensions/VehicleExtension.cs b/ReallifeGamemode.Server/Extensions/VehicleExtension.cs index 06af94bf..e0f75f46 100644 --- a/ReallifeGamemode.Server/Extensions/VehicleExtension.cs +++ b/ReallifeGamemode.Server/Extensions/VehicleExtension.cs @@ -3,6 +3,7 @@ using GTANetworkAPI; using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Managers; +using ReallifeGamemode.Server.WeaponDeal; namespace ReallifeGamemode.Server.Extensions { @@ -107,7 +108,7 @@ namespace ReallifeGamemode.Server.Extensions return 0; case 18: - if ((VehicleHash)vehicle.Model == VehicleHash.Policet) + if ((VehicleHash)vehicle.Model == WeaponDealManager.WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) return 1000 * 1000; else if ((VehicleHash)vehicle.Model == VehicleHash.Firetruk || (VehicleHash)vehicle.Model == VehicleHash.Pbus diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index f5c27650..50ef6941 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -297,7 +297,7 @@ namespace ReallifeGamemode.Server.Factions.Medic public static void UpdateDutyMedics() { - dutyMedics = NAPI.Pools.GetAllPlayers().Where(c => c.GetData("duty") == true && c.GetUser().FactionId == 2).ToList().Count; + dutyMedics = NAPI.Pools.GetAllPlayers().Where(c => c.IsDuty() == true && c.GetUser().FactionId == 2).ToList().Count; NAPI.ClientEvent.TriggerClientEventForAll("updateDutyMedics", dutyMedics); } } diff --git a/ReallifeGamemode.Server/Gangwar/Gangwar.cs b/ReallifeGamemode.Server/Gangwar/Gangwar.cs index 376d5e77..2f03c031 100644 --- a/ReallifeGamemode.Server/Gangwar/Gangwar.cs +++ b/ReallifeGamemode.Server/Gangwar/Gangwar.cs @@ -94,6 +94,11 @@ namespace ReallifeGamemode.Server.Gangwar [RemoteEvent("Gangarea:Leave")] public void RmtEvent_TurfLeave(Player client, string jsonId) { + if(string.IsNullOrEmpty(jsonId)) + { + return; + } + int id = JsonConvert.DeserializeObject(jsonId); foreach (var turf in getTurfs()) @@ -181,7 +186,13 @@ namespace ReallifeGamemode.Server.Gangwar [RemoteEvent("SERVER:StartGangwar")] public void RmtEvent_StartGangwar(Player client) { - if (!client.GetUser().FactionLeader) + User user = client.GetUser(); + if(user == null || user.Faction == null) + { + return; + } + + if (!user.FactionLeader) return; foreach (var turf in getTurfs()) @@ -192,7 +203,7 @@ namespace ReallifeGamemode.Server.Gangwar return; } } - if (client.GetUser().Faction.Name == "Ballas" || client.GetUser().Faction.Name == "Grove") + if (user.Faction.GangOwned) { foreach (var turf in getTurfs()) { @@ -200,8 +211,11 @@ namespace ReallifeGamemode.Server.Gangwar { if (u == client) { - if (turf.Owner != client.GetUser().Faction.Name) - turf.attack(client.GetUser().Faction.Name); + if (turf.Owner != user.Faction.Name) + { + turf.attack(user.Faction.Name); + break; + } } } } diff --git a/ReallifeGamemode.Server/Inventory/Items/Apfel.cs b/ReallifeGamemode.Server/Inventory/Items/Apfel.cs index 116dbfc7..4b396c17 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Apfel.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Apfel.cs @@ -17,8 +17,8 @@ namespace ReallifeGamemode.Server.Inventory.Items public override string Einheit => "g"; public override int HpAmount => 10; public override uint Object => 2240524752; - public override int Price => 200; - public override float Cooldown => 10000; + public override int Price => 50; + public override float Cooldown => 60000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/AviateChips.cs b/ReallifeGamemode.Server/Inventory/Items/AviateChips.cs index 025c98f7..b65f0f86 100644 --- a/ReallifeGamemode.Server/Inventory/Items/AviateChips.cs +++ b/ReallifeGamemode.Server/Inventory/Items/AviateChips.cs @@ -19,7 +19,7 @@ namespace ReallifeGamemode.Server.Inventory.Items public override uint Object => 2240524752; public override int Price => 1000; - public override float Cooldown => 5000; + public override float Cooldown => 60000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/Baklava.cs b/ReallifeGamemode.Server/Inventory/Items/Baklava.cs index 88e7ccfd..e5825cf8 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Baklava.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Baklava.cs @@ -17,9 +17,9 @@ namespace ReallifeGamemode.Server.Inventory.Items public override string Einheit => "g"; public override int HpAmount => 30; public override uint Object => 2240524752; - public override int Price => 600; + public override int Price => 150; - public override float Cooldown => 20000; + public override float Cooldown => 180000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/Cheeseburger.cs b/ReallifeGamemode.Server/Inventory/Items/Cheeseburger.cs index ccf4d4fe..225962ba 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Cheeseburger.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Cheeseburger.cs @@ -20,8 +20,8 @@ namespace ReallifeGamemode.Server.Inventory.Items public override string Einheit => "g"; public override int HpAmount => 20; public override uint Object => 2240524752; - public override int Price => 500; - public override float Cooldown => 7000; + public override int Price => 100; + public override float Cooldown => 120000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/Chips.cs b/ReallifeGamemode.Server/Inventory/Items/Chips.cs index 323e1b99..3198deb5 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Chips.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Chips.cs @@ -17,9 +17,9 @@ namespace ReallifeGamemode.Server.Inventory.Items public override string Einheit => "g"; public override int HpAmount => 5; public override uint Object => 2240524752; - public override int Price => 5; + public override int Price => 25; - public override float Cooldown => 5500; + public override float Cooldown => 30000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/Kebab.cs b/ReallifeGamemode.Server/Inventory/Items/Kebab.cs index c8df6e16..508e9c50 100644 --- a/ReallifeGamemode.Server/Inventory/Items/Kebab.cs +++ b/ReallifeGamemode.Server/Inventory/Items/Kebab.cs @@ -15,11 +15,11 @@ namespace ReallifeGamemode.Server.Inventory.Items public override string Description => "Von Emre selbst gemacht."; public override int Gewicht => 500; public override string Einheit => "g"; - public override int HpAmount => 80; + public override int HpAmount => 50; public override uint Object => 2240524752; - public override int Price => 1800; + public override int Price => 250; - public override float Cooldown => 50000; + public override float Cooldown => 300000; public override void Consume(UserItem uItem) { diff --git a/ReallifeGamemode.Server/Inventory/Items/WeaponDealItem.cs b/ReallifeGamemode.Server/Inventory/Items/WeaponDealItem.cs index fdaff5cd..d36904d7 100644 --- a/ReallifeGamemode.Server/Inventory/Items/WeaponDealItem.cs +++ b/ReallifeGamemode.Server/Inventory/Items/WeaponDealItem.cs @@ -2,6 +2,7 @@ using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Server.Extensions; using ReallifeGamemode.Server.Inventory.Interfaces; +using ReallifeGamemode.Server.WeaponDeal; namespace ReallifeGamemode.Server.Inventory.Items { @@ -19,7 +20,7 @@ namespace ReallifeGamemode.Server.Inventory.Items { if (!fVeh.GetOwners().Contains(client.GetUser().FactionId ?? 0)) return false; - if (fVeh.Model != VehicleHash.Burrito3) + if (fVeh.Model != WeaponDealManager.WEAPON_DEAL_GANG_VEHICLE_HASH) return false; return true; diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index a80c1688..1cc4b1a4 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -181,6 +181,11 @@ namespace ReallifeGamemode.Server.Managers ChatService.ErrorMessage(player, "Dieser Spieler ist schon in einer Fraktion"); return; } + if (targetUser?.Wanteds > 0) + { + player.SendNotification("~r~Du kannst diesen Spieler nicht inviten da er aktuell gesucht wird. (Wanted)", false); + return; + } target.SetData("accept_faction_invite", player.Name); @@ -468,18 +473,30 @@ namespace ReallifeGamemode.Server.Managers { var vehPrice = userVehicle.Price; var backPrice = (int)(vehPrice * 0.4); - - user.BankAccount.Balance += backPrice; - - ChatService.SendMessage(player, $"~b~[INFO]~s~ Du hast durch den Autoverkauf ~g~{backPrice.ToMoneyString()}~s~ erhalten."); - - dbContext.UserVehicles.Remove(userVehicle); - dbContext.SaveChanges(); - - veh?.Delete(); + player.SetData("SellVehicleDecision", true); + player.SetData("VehicleToSell", id); + ChatService.SendMessage(player,"~s~Möchtes du das Fahrzeug ~y~" + veh.DisplayName + " ~s~wirklich für ~g~$" + backPrice + " ~s~verkaufen? Drücke ~g~J~s~ zum Bestätigen oder ~r~N ~s~zum Abbrechen"); } } + public static void SellPlayerVehicle(Player player, int id) + { + using var dbContext = new DatabaseContext(); + var user = player.GetUser(dbContext); + var userVehicle = dbContext.UserVehicles.Where(v => v.Id == id && v.UserId == user.Id).FirstOrDefault(); + var vehPrice = userVehicle.Price; + var backPrice = (int)(vehPrice * 0.4); + GTANetworkAPI.Vehicle veh = VehicleManager.GetVehicleFromServerVehicle(userVehicle); + user.BankAccount.Balance += backPrice; + + ChatService.SendMessage(player, $"~b~[INFO]~s~ Du hast durch den Autoverkauf ~g~{backPrice.ToMoneyString()}~s~ erhalten."); + + dbContext.UserVehicles.Remove(userVehicle); + dbContext.SaveChanges(); + + veh?.Delete(); + } + [RemoteEvent("CLIENT:InteractionMenu_FactionVehicleInteraction")] public void FactionVehicleInteraction(Player player, int id, string selection) { diff --git a/ReallifeGamemode.Server/Managers/JobManager.cs b/ReallifeGamemode.Server/Managers/JobManager.cs index bd66afbe..63abaff8 100644 --- a/ReallifeGamemode.Server/Managers/JobManager.cs +++ b/ReallifeGamemode.Server/Managers/JobManager.cs @@ -186,7 +186,7 @@ namespace ReallifeGamemode.Server.Managers { VehicleStreaming.SetEngineState(player.Vehicle, false); } - + player.Position = playerJobStartPosition[player]; job.StopJob(player); if (playerTimersJobVehicleRespawn.ContainsKey(player)) diff --git a/ReallifeGamemode.Server/Managers/PositionManager.cs b/ReallifeGamemode.Server/Managers/PositionManager.cs index e53e9aef..7a3c8c05 100644 --- a/ReallifeGamemode.Server/Managers/PositionManager.cs +++ b/ReallifeGamemode.Server/Managers/PositionManager.cs @@ -88,11 +88,17 @@ namespace ReallifeGamemode.Server.Managers Position = new Vector3(129.8998, -1938.709, 20.61865), FactionId = 7 }; + WeaponPoint weaponPointVagos = new WeaponPoint() + { + Position = new Vector3(-1076.6572, -1677.4907, 4.575236), + FactionId = 5 + }; WeaponPoints.Add(weaponPointLSPD); WeaponPoints.Add(weaponPointFIB); WeaponPoints.Add(weaponPointBallas); WeaponPoints.Add(weaponPointGrove); + WeaponPoints.Add(weaponPointVagos); foreach (WeaponPoint w in WeaponPoints) { diff --git a/ReallifeGamemode.Server/Services/ChatService.cs b/ReallifeGamemode.Server/Services/ChatService.cs index c4584315..fa3b1165 100644 --- a/ReallifeGamemode.Server/Services/ChatService.cs +++ b/ReallifeGamemode.Server/Services/ChatService.cs @@ -53,7 +53,7 @@ namespace ReallifeGamemode.Server.Services /// /// Die Nachricht, die gesendet werden soll /// Die Liste an Fraktionen, die diese Nachricht bekommen sollen - public static void BroadcastFaction(string message, List factions, bool toAdmins = false) + public static void BroadcastFaction(string message, List factions, bool toAdmins = false, Predicate shouldSendToAdmins = null) { foreach (Player c in NAPI.Pools.GetAllPlayers()) { @@ -63,7 +63,7 @@ namespace ReallifeGamemode.Server.Services { ChatService.SendMessage(c, message); } - else if (user.IsAdmin(AdminLevel.ADMIN) && toAdmins) + else if (user.IsAdmin(AdminLevel.ADMIN) && (toAdmins && (shouldSendToAdmins == null || shouldSendToAdmins(c)))) { ChatService.SendMessage(c, message); } diff --git a/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs b/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs index 560c4e4b..4aa656ca 100644 --- a/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs +++ b/ReallifeGamemode.Server/WeaponDeal/WeaponDealManager.cs @@ -12,6 +12,14 @@ namespace ReallifeGamemode.Server.WeaponDeal { public class WeaponDealManager : Script { + public static readonly int[] WEAPON_DEAL_GANG_IDS = new int[] { 5, 7, 8 }; + public static readonly int[] WEAPON_DEAL_STAATSFRAK_IDS = new int[] { 1, 3 }; + + public static int[] WEAPON_DEAL_FACTIONS => WEAPON_DEAL_GANG_IDS.Concat(WEAPON_DEAL_STAATSFRAK_IDS).Distinct().ToArray(); + + public static readonly VehicleHash WEAPON_DEAL_GANG_VEHICLE_HASH = VehicleHash.Gburrito2; + public static readonly VehicleHash WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH = VehicleHash.Policet; + private const int WEAPON_AMOUNT_GANG = 2; private const int WEAPON_AMOUNT_COP = 4; private const int WEAPON_AMOUNT_COP_STUNGUN = 4; @@ -30,14 +38,17 @@ namespace ReallifeGamemode.Server.WeaponDeal public void SrvEVENT_startWeaponDeal(Player client) { var user = client.GetUser(); - if(user == null || user.FactionId == null) + if (user == null || user.FactionId == null) { return; } using (var context = new DatabaseContext(true)) { - FactionVehicle factionVehicle = context.FactionVehicles.Where(f => f.Model == VehicleHash.Burrito3 || f.Model == VehicleHash.Policet).ToList().Where(f => f.GetOwners().Contains(user.FactionId ?? 0)).FirstOrDefault(); + FactionVehicle factionVehicle = context.FactionVehicles.Where(f => f.Model == WEAPON_DEAL_GANG_VEHICLE_HASH || f.Model == WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) + .ToList() + .Where(f => f.GetOwners().Contains(user.FactionId ?? 0)) + .FirstOrDefault(); if (factionVehicle == null) { @@ -54,7 +65,7 @@ namespace ReallifeGamemode.Server.WeaponDeal } float distance = fVeh.Position.DistanceTo2D(client.Position); - if ((distance > 80 && factionVehicle.Model == VehicleHash.Burrito3) || (distance > 400 && factionVehicle.Model == VehicleHash.Policet)) + if ((distance > 80 && factionVehicle.Model == WEAPON_DEAL_GANG_VEHICLE_HASH) || (distance > 400 && factionVehicle.Model == WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH)) { ChatService.ErrorMessage(client, "Der Transporter ist zu weit entfernt"); return; @@ -175,7 +186,7 @@ namespace ReallifeGamemode.Server.WeaponDeal { return; } - if ((VehicleHash)veh.Model != VehicleHash.Burrito3 && (VehicleHash)veh.Model != VehicleHash.Policet) + if ((VehicleHash)veh.Model != WEAPON_DEAL_GANG_VEHICLE_HASH && (VehicleHash)veh.Model != WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) { return; } @@ -184,11 +195,13 @@ namespace ReallifeGamemode.Server.WeaponDeal using (var context = new DatabaseContext()) { FactionVehicle factionVehicle = context.FactionVehicles - .Where(f => f.Model == VehicleHash.Burrito3 || f.Model == VehicleHash.Policet) + .Where(f => f.Model == WEAPON_DEAL_GANG_VEHICLE_HASH || f.Model == WEAPON_DEAL_STAATSFRAK_VEHICLE_HASH) .ToList() .Where(f => f.GetOwners().Contains(user.FactionId ?? 0)) .FirstOrDefault(); + var owners = factionVehicle.GetOwners(); + Vehicle fVeh = VehicleManager.GetVehicleFromServerVehicle(factionVehicle); fVeh.SetData("weaponDeal", false); fVeh.SetData("WeaponDealLoad", true); @@ -198,7 +211,7 @@ namespace ReallifeGamemode.Server.WeaponDeal InventoryManager.RemoveAllItemsfromVehicleInventory(fVeh); int oMembers = NAPI.Pools.GetAllPlayers().Where(p => !p.IsAfk() && p.IsLoggedIn() && p.GetUser(context).FactionId == user.FactionId).Count(); - if (factionVehicle.GetOwners().Contains(8) || factionVehicle.GetOwners().Contains(7)) + if (owners.Any(o => WEAPON_DEAL_GANG_IDS.Contains(o))) // Gang WT { VehicleItem item = new VehicleItem() { ItemId = 2, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_GANG * oMembers }; //pistol50 InventoryManager.AddItemToVehicleInventory(fVeh, item.ItemId, item.Amount); @@ -211,7 +224,7 @@ namespace ReallifeGamemode.Server.WeaponDeal VehicleItem item5 = new VehicleItem() { ItemId = 13, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_GANG * oMembers }; //AssaultRifle InventoryManager.AddItemToVehicleInventory(fVeh, item5.ItemId, item5.Amount); } - else if (factionVehicle.GetOwners().Contains(1)) + else if (owners.Contains(1)) // LSPD { VehicleItem item = new VehicleItem() { ItemId = 1, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_COP * oMembers }; //pistol InventoryManager.AddItemToVehicleInventory(fVeh, item.ItemId, item.Amount); @@ -228,7 +241,7 @@ namespace ReallifeGamemode.Server.WeaponDeal VehicleItem item7 = new VehicleItem() { ItemId = 14, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_COP_STUNGUN * oMembers }; // AssaultSmg InventoryManager.AddItemToVehicleInventory(fVeh, item7.ItemId, item7.Amount); } - else if (factionVehicle.GetOwners().Contains(3)) + else if (owners.Contains(3)) // FIB { VehicleItem item = new VehicleItem() { ItemId = 3, VehicleId = factionVehicle.Id, Amount = WEAPON_AMOUNT_COP * oMembers }; //pistol_mk2 InventoryManager.AddItemToVehicleInventory(fVeh, item.ItemId, item.Amount);