From 69a68048336d461df7f7914c7da1aa9a746bf6ee Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 20 Apr 2021 22:33:49 +0000 Subject: [PATCH 001/138] duden.de --- .../assets/html/onlinelist/index.html | 16 ++++++++-------- .../assets/js/onlinelist/script.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ReallifeGamemode.Client/assets/html/onlinelist/index.html b/ReallifeGamemode.Client/assets/html/onlinelist/index.html index 84fe2a70..ed0290f9 100644 --- a/ReallifeGamemode.Client/assets/html/onlinelist/index.html +++ b/ReallifeGamemode.Client/assets/html/onlinelist/index.html @@ -29,20 +29,20 @@
    -
  1. LSPD: 0
  2. -
  3. FIB: 0
  4. -
  5. LSED: 0
  6. +
  7. LSPD: 0
  8. +
  9. FIB: 0
  10. +
  11. LSED: 0
    -
  1. GSF: 0
  2. -
  3. FYB: 0
  4. -
  5. LSV: 0
  6. +
  7. GSF: 0
  8. +
  9. FYB: 0
  10. +
  11. LSV: 0
    -
  1. WZN: 0
  2. -
  3. Zivilisten: 0
  4. +
  5. WZN: 0
  6. +
  7. Zivilisten: 0
diff --git a/ReallifeGamemode.Client/assets/js/onlinelist/script.js b/ReallifeGamemode.Client/assets/js/onlinelist/script.js index c9b9e2b9..e6a5154c 100644 --- a/ReallifeGamemode.Client/assets/js/onlinelist/script.js +++ b/ReallifeGamemode.Client/assets/js/onlinelist/script.js @@ -21,7 +21,7 @@ function getFactionNameByFactionId(factionId) { case 5: return "Vagos"; case 7: return "Grove Street"; case 8: return "Ballas"; - case 9: return "Weazle News"; + case 9: return "Weazel News"; default: return "Zivilisten"; } } From dd08eaf11a45f6edb2ab3fbed2510a17133d69fe Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 06:29:06 +0000 Subject: [PATCH 002/138] posbuild config default angepasst --- postbuild.ps1 | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/postbuild.ps1 b/postbuild.ps1 index 4d1396ef..96ee0dc8 100644 --- a/postbuild.ps1 +++ b/postbuild.ps1 @@ -1,4 +1,4 @@ -# +# # @author Codename # @copyright (c) 2008 - 2019 Life of German # @warning Start this script only once, after building server dll @@ -54,25 +54,6 @@ if (![System.IO.File]::Exists($configPath)) { - - false - 127.0.0.1 - 21 - USERNAME - PASSWORD - . - - - false - false - - - false - false - false - - - " # create default content @@ -180,4 +161,4 @@ if ($xmlConfig.config.remote.enabled -eq "true") { # TODO: connect to remote ftp server and update files } -exit 0 \ No newline at end of file +exit 0 From ea2f75b1caf4ea41976fdbc46620f010b1498955 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 12:06:33 +0000 Subject: [PATCH 003/138] =?UTF-8?q?chat=20sch=C3=B6ner=3F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/chat/index.html | 14 --- .../{chat/style => css/chat}/checkbox.css | 2 +- .../assets/css/chat/main.css | 92 ++++++++++++++++++ .../assets/css/chat/main.css.map | 9 ++ .../assets/css/chat/main.scss | 89 +++++++++++++++++ .../style/main.css => css/chat/main_old.css} | 0 .../chat}/CenturyGothicRegular.ttf | Bin .../{chat/fonts => font/chat}/CodeProLC.otf | Bin .../fonts => font/chat}/emoji_unicode.php | 0 .../assets/html/chat/index.html | 16 +++ .../assets/{ => js}/chat/jquery-1.11.3.min.js | 0 .../assets/{chat/js => js/chat}/main.js | 15 +-- .../assets/{chat/js => js/chat}/newMain.js | 0 ReallifeGamemode.Client/index.ts | 4 +- 14 files changed, 217 insertions(+), 24 deletions(-) delete mode 100644 ReallifeGamemode.Client/assets/chat/index.html rename ReallifeGamemode.Client/assets/{chat/style => css/chat}/checkbox.css (94%) create mode 100644 ReallifeGamemode.Client/assets/css/chat/main.css create mode 100644 ReallifeGamemode.Client/assets/css/chat/main.css.map create mode 100644 ReallifeGamemode.Client/assets/css/chat/main.scss rename ReallifeGamemode.Client/assets/{chat/style/main.css => css/chat/main_old.css} (100%) rename ReallifeGamemode.Client/assets/{chat/fonts => font/chat}/CenturyGothicRegular.ttf (100%) rename ReallifeGamemode.Client/assets/{chat/fonts => font/chat}/CodeProLC.otf (100%) rename ReallifeGamemode.Client/assets/{chat/fonts => font/chat}/emoji_unicode.php (100%) create mode 100644 ReallifeGamemode.Client/assets/html/chat/index.html rename ReallifeGamemode.Client/assets/{ => js}/chat/jquery-1.11.3.min.js (100%) rename ReallifeGamemode.Client/assets/{chat/js => js/chat}/main.js (94%) rename ReallifeGamemode.Client/assets/{chat/js => js/chat}/newMain.js (100%) diff --git a/ReallifeGamemode.Client/assets/chat/index.html b/ReallifeGamemode.Client/assets/chat/index.html deleted file mode 100644 index d4354663..00000000 --- a/ReallifeGamemode.Client/assets/chat/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - -
-
    -
    - - - - \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/chat/style/checkbox.css b/ReallifeGamemode.Client/assets/css/chat/checkbox.css similarity index 94% rename from ReallifeGamemode.Client/assets/chat/style/checkbox.css rename to ReallifeGamemode.Client/assets/css/chat/checkbox.css index 53fddb26..5d5fb115 100644 --- a/ReallifeGamemode.Client/assets/chat/style/checkbox.css +++ b/ReallifeGamemode.Client/assets/css/chat/checkbox.css @@ -1 +1 @@ -input[type=checkbox].css-checkbox{position:absolute;z-index:-1000;left:-1000px;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0;}input[type=checkbox].css-checkbox+label.css-label{height:20px;width:20px;display:inline-block;background-repeat:no-repeat;background-position:0 0;cursor:pointer;}input[type=checkbox].css-checkbox:checked+label.css-label:after{content:'x';color:white;}label.css-label{background:#7b3784;border-radius:2px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;} \ No newline at end of file +input[type=checkbox].css-checkbox{position:absolute;z-index:-1000;left:-1000px;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0;}input[type=checkbox].css-checkbox+label.css-label{height:20px;width:20px;display:inline-block;background-repeat:no-repeat;background-position:0 0;cursor:pointer;}input[type=checkbox].css-checkbox:checked+label.css-label:after{content:'x';color:white;}label.css-label{background:#7b3784;border-radius:2px;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;} diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css b/ReallifeGamemode.Client/assets/css/chat/main.css new file mode 100644 index 00000000..4c92d73d --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/chat/main.css @@ -0,0 +1,92 @@ +*, body, html { + padding: 0; + margin: 0; +} + +#chat, a, body, html { + color: #fff; +} + +body, html { + -webkit-font-smoothing: antialiased; + overflow: hidden; + font-size: 14px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-size: calc(.7em + .4vw); + font-weight: 500; + direction: ltr; +} + +a { + text-decoration: none; +} + +.ui_element { + display: none; + position: absolute; + width: 100vw; + height: 100vh; + z-index: 2; +} + +#chat { + display: block; + z-index: 0; + line-height: 1.25; + text-shadow: 1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000; + letter-spacing: .4px; + margin-top: 1em; + margin-left: 1em; +} + +#chat ul#chat_messages { + height: 17.5em; + min-width: 35vw; + max-width: 85vw; + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + overflow-y: auto; + overflow-x: hidden; + list-style-type: none; + margin-bottom: .25em; +} + +#chat ul#chat_messages > li { + -webkit-transform: rotate(0deg); + transform: rotate(0deg); + margin-bottom: .25em; +} + +#chat input#chat_msg { + width: 35vw; + outline: 0; + border: none; + border-radius: 3px; + font-size: inherit; + font-weight: inherit; + line-height: inherit; + color: white; + background: rgba(0, 0, 0, 0.5); + padding: .5em; +} + +::-webkit-scrollbar { + width: 11px; +} + +::-webkit-scrollbar-thumb { + background: rgba(255, 17, 0, 0); + border-radius: 20px; +} + +::-webkit-scrollbar-thumb:hover { + background: rgba(255, 17, 0, 0); +} +/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css.map b/ReallifeGamemode.Client/assets/css/chat/main.css.map new file mode 100644 index 00000000..a32a063d --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/chat/main.css.map @@ -0,0 +1,9 @@ +{ + "version": 3, + "mappings": "AAAA,AAAA,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;EACZ,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CACV;CAAC;;AAED,AAAA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;EACnB,KAAK,EAAE,IACT;CAAC;;AAED,AAAA,IAAI,EAAE,IAAI,CAAC;EACT,sBAAsB,EAAE,WAAW;EACnC,QAAQ,EAAE,MAAM;EAChB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;CAClB;;AAED,AAAA,IAAI,CAAC;EACH,WAAW,EAAE,oIAAoI;EACjJ,SAAS,EAAE,iBAAiB;EAC5B,WAAW,EAAE,GAAG;EAChB,SAAS,EAAE,GAAG;CACf;;AAED,AAAA,CAAC,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI;;AAE7B,AAAA,WAAW,CAAC;EACV,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,CACX;CAAC;;AAED,AAAA,KAAK,CAAC;EACJ,OAAO,EAAE,KAAK;EACd,OAAO,EAAE,CAAC;EAEV,WAAW,EAAE,IAAI;EACjB,WAAW,EAAE,8EAA8E;EAC3F,cAAc,EAAE,IAAI;EAEpB,UAAU,EAAE,GAAG;EACf,WAAW,EAAE,GAAG;CAmCjB;;AA5CD,AAWE,KAXG,CAWH,EAAE,AAAA,cAAc,CAAC;EACf,MAAM,EAAE,MAAM;EACd,SAAS,EAAE,IAAI;EACf,SAAS,EAAE,IAAI;EACf,SAAS,EAAE,YAAY;EAEvB,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM;EAElB,eAAe,EAAE,IAAI;EACrB,aAAa,EAAE,KAAK;CAMrB;;AA3BH,AAuBI,KAvBC,CAWH,EAAE,AAAA,cAAc,GAYX,EAAE,CAAC;EACJ,SAAS,EAAE,YAAY;EACvB,aAAa,EAAE,KAAK;CACrB;;AA1BL,AA6BE,KA7BG,CA6BH,KAAK,AAAA,SAAS,CAAC;EACb,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,IAAI;EACZ,aAAa,EAAE,GAAG;EAElB,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,OAAO;EACpB,WAAW,EAAE,OAAO;EAEpB,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,kBAAiB;EAE7B,OAAO,EAAE,IAAI;CACd;;AAGH,AAAA,mBAAmB,CAAC;EAClB,KAAK,EAAE,IAAI;CAQZ;;AATD,AAGE,mBAHiB,AAGhB,MAAM,CAAC;EACN,UAAU,EAAE,mBAAmB;EAC/B,aAAa,EAAE,IAAI;CAGpB;;AARH,AAOI,mBAPe,AAGhB,MAAM,AAIJ,MAAM,CAAC;EAAE,UAAU,EAAE,mBAAmB;CAAI", + "sources": [ + "main.scss" + ], + "names": [], + "file": "main.css" +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/chat/main.scss b/ReallifeGamemode.Client/assets/css/chat/main.scss new file mode 100644 index 00000000..0fa00fea --- /dev/null +++ b/ReallifeGamemode.Client/assets/css/chat/main.scss @@ -0,0 +1,89 @@ +*, body, html { + padding: 0; + margin: 0 +} + +#chat, a, body, html { + color: #fff +} + +body, html { + -webkit-font-smoothing: antialiased; + overflow: hidden; + font-size: 14px; + user-select: none; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-size: calc(.7em + .4vw); + font-weight: 500; + direction: ltr; +} + +a { text-decoration: none; } + +.ui_element { + display: none; + position: absolute; + width: 100vw; + height: 100vh; + z-index: 2 +} + +#chat { + display: block; + z-index: 0; + + line-height: 1.25; + text-shadow: 1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000; + letter-spacing: .4px; + + margin-top: 1em; + margin-left: 1em; + + ul#chat_messages { + height: 17.5em; + min-width: 35vw; + max-width: 85vw; + transform: rotate(0deg); + + overflow-y: auto; + overflow-x: hidden; + + list-style-type: none; + margin-bottom: .25em; + + &> li { + transform: rotate(0deg); + margin-bottom: .25em; + } + } + + input#chat_msg { + width: 35vw; + outline: 0; + border: none; + border-radius: 3px; + + font-size: inherit; + font-weight: inherit; + line-height: inherit; + + color: white; + background: rgba(0, 0, 0, .5); + + padding: .5em; + } +} + +::-webkit-scrollbar { + width: 11px; + + &-thumb { + background: rgba(255, 17, 0, 0); + border-radius: 20px; + + &:hover { background: rgba(255, 17, 0, 0); } + } +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/chat/style/main.css b/ReallifeGamemode.Client/assets/css/chat/main_old.css similarity index 100% rename from ReallifeGamemode.Client/assets/chat/style/main.css rename to ReallifeGamemode.Client/assets/css/chat/main_old.css diff --git a/ReallifeGamemode.Client/assets/chat/fonts/CenturyGothicRegular.ttf b/ReallifeGamemode.Client/assets/font/chat/CenturyGothicRegular.ttf similarity index 100% rename from ReallifeGamemode.Client/assets/chat/fonts/CenturyGothicRegular.ttf rename to ReallifeGamemode.Client/assets/font/chat/CenturyGothicRegular.ttf diff --git a/ReallifeGamemode.Client/assets/chat/fonts/CodeProLC.otf b/ReallifeGamemode.Client/assets/font/chat/CodeProLC.otf similarity index 100% rename from ReallifeGamemode.Client/assets/chat/fonts/CodeProLC.otf rename to ReallifeGamemode.Client/assets/font/chat/CodeProLC.otf diff --git a/ReallifeGamemode.Client/assets/chat/fonts/emoji_unicode.php b/ReallifeGamemode.Client/assets/font/chat/emoji_unicode.php similarity index 100% rename from ReallifeGamemode.Client/assets/chat/fonts/emoji_unicode.php rename to ReallifeGamemode.Client/assets/font/chat/emoji_unicode.php diff --git a/ReallifeGamemode.Client/assets/html/chat/index.html b/ReallifeGamemode.Client/assets/html/chat/index.html new file mode 100644 index 00000000..655c409d --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/chat/index.html @@ -0,0 +1,16 @@ + + + + + + + + +
    +
      +
      + + + + + \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/chat/jquery-1.11.3.min.js b/ReallifeGamemode.Client/assets/js/chat/jquery-1.11.3.min.js similarity index 100% rename from ReallifeGamemode.Client/assets/chat/jquery-1.11.3.min.js rename to ReallifeGamemode.Client/assets/js/chat/jquery-1.11.3.min.js diff --git a/ReallifeGamemode.Client/assets/chat/js/main.js b/ReallifeGamemode.Client/assets/js/chat/main.js similarity index 94% rename from ReallifeGamemode.Client/assets/chat/js/main.js rename to ReallifeGamemode.Client/assets/js/chat/main.js index fe051878..50619991 100644 --- a/ReallifeGamemode.Client/assets/chat/js/main.js +++ b/ReallifeGamemode.Client/assets/js/chat/main.js @@ -1,4 +1,4 @@ -let chat = +let chat = { size: 0, history_limit: 50, @@ -23,8 +23,7 @@ function enableChatInput(enable) { if (enable) { chat.input = $("#chat").append('
      ').children(":last"); chat.input.children("input").focus(); - } - else { + } else { chat.input.fadeOut('fast', function () { chat.input.remove(); chat.input = null; @@ -65,12 +64,14 @@ var chatAPI = var today = new Date(); if (chatElement === "
    • ") { + var time = today.toLocaleTimeString('de-DE'); + chat.container.append("
    • " + "[" + time + "] " + text + "
    • "); + if (chat.input == null || elmnt.scrollTop == elmnt.scrollHeight - elmnt.clientHeight) { - chat.container.append("
    • " + "[" + today.toLocaleTimeString('de-DE') + "] " + text + "
    • "); elmnt.scrollTop = elmnt.scrollHeight - elmnt.clientHeight; - } else { - chat.container.append("
    • " + "[" + today.toLocaleTimeString('de-DE') + "] " + text + "
    • "); } + + // if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } } else { chat.container.append(chatElement); } @@ -185,4 +186,4 @@ $(document).ready(function () { enableChatInput(false); } }); -}); \ No newline at end of file +}); diff --git a/ReallifeGamemode.Client/assets/chat/js/newMain.js b/ReallifeGamemode.Client/assets/js/chat/newMain.js similarity index 100% rename from ReallifeGamemode.Client/assets/chat/js/newMain.js rename to ReallifeGamemode.Client/assets/js/chat/newMain.js diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 89257c40..abcbd11e 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -39,7 +39,7 @@ game.events.onPlayerCommand((cmd) => { mp.game.vehicle.defaultEngineBehaviour = false; mp.gui.chat.show(false); -const chatbox = mp.browsers.new("package://assets/chat/index.html"); +const chatbox = mp.browsers.new("package://assets/html/chat/index.html"); chatbox.markAsChat(); require('./Gui/house'); @@ -276,4 +276,4 @@ interface VehicleData { export { VehicleData -} \ No newline at end of file +} From d7386d2587428189ced753e9d9f315f11bfedd10 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 13:46:50 +0000 Subject: [PATCH 004/138] =?UTF-8?q?brille=20ges=C3=A4ubert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/css/chat/main.css | 29 ++++++++++++++----- .../assets/css/chat/main.css.map | 4 +-- .../assets/css/chat/main.scss | 23 ++++++++++----- 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css b/ReallifeGamemode.Client/assets/css/chat/main.css index 4c92d73d..3b563634 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css +++ b/ReallifeGamemode.Client/assets/css/chat/main.css @@ -1,3 +1,13 @@ +html { + -webkit-box-sizing: border-box; + box-sizing: border-box; +} + +*, *:before, *:after { + -webkit-box-sizing: inherit; + box-sizing: inherit; +} + *, body, html { padding: 0; margin: 0; @@ -19,7 +29,7 @@ body, html { body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-size: calc(.7em + .4vw); + font-size: calc(.75em + .3vw); font-weight: 500; direction: ltr; } @@ -47,13 +57,14 @@ a { } #chat ul#chat_messages { - height: 17.5em; - min-width: 35vw; - max-width: 85vw; + height: 16.45em; + min-width: 50ch; + max-width: calc(60vw + 10px); -webkit-transform: rotate(0deg); transform: rotate(0deg); overflow-y: auto; overflow-x: hidden; + word-break: break-all; list-style-type: none; margin-bottom: .25em; } @@ -61,11 +72,15 @@ a { #chat ul#chat_messages > li { -webkit-transform: rotate(0deg); transform: rotate(0deg); + margin-bottom: .125em; +} + +#chat ul#chat_messages > li:last-child { margin-bottom: .25em; } #chat input#chat_msg { - width: 35vw; + width: 60vw; outline: 0; border: none; border-radius: 3px; @@ -78,12 +93,12 @@ a { } ::-webkit-scrollbar { - width: 11px; + width: 10px; } ::-webkit-scrollbar-thumb { background: rgba(255, 17, 0, 0); - border-radius: 20px; + border-radius: 3px; } ::-webkit-scrollbar-thumb:hover { diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css.map b/ReallifeGamemode.Client/assets/css/chat/main.css.map index a32a063d..df909d16 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css.map +++ b/ReallifeGamemode.Client/assets/css/chat/main.css.map @@ -1,9 +1,9 @@ { "version": 3, - "mappings": "AAAA,AAAA,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;EACZ,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CACV;CAAC;;AAED,AAAA,KAAK,EAAE,CAAC,EAAE,IAA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EAAE,mBAAmB;CAAI", "sources": [ "main.scss" ], "names": [], "file": "main.css" -} \ No newline at end of file +} diff --git a/ReallifeGamemode.Client/assets/css/chat/main.scss b/ReallifeGamemode.Client/assets/css/chat/main.scss index 0fa00fea..64ae2124 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.scss +++ b/ReallifeGamemode.Client/assets/css/chat/main.scss @@ -1,3 +1,7 @@ +html { box-sizing: border-box; } +*, *:before, *:after { box-sizing: inherit; } + + *, body, html { padding: 0; margin: 0 @@ -16,7 +20,7 @@ body, html { body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-size: calc(.7em + .4vw); + font-size: calc(.75em + .3vw); font-weight: 500; direction: ltr; } @@ -43,25 +47,28 @@ a { text-decoration: none; } margin-left: 1em; ul#chat_messages { - height: 17.5em; - min-width: 35vw; - max-width: 85vw; + height: 16.45em; + min-width: 50ch; + max-width: calc(60vw + 10px); transform: rotate(0deg); overflow-y: auto; overflow-x: hidden; + word-break: break-all; list-style-type: none; margin-bottom: .25em; &> li { transform: rotate(0deg); - margin-bottom: .25em; + margin-bottom: .125em; + + &:last-child { margin-bottom: .25em; } } } input#chat_msg { - width: 35vw; + width: 60vw; outline: 0; border: none; border-radius: 3px; @@ -78,11 +85,11 @@ a { text-decoration: none; } } ::-webkit-scrollbar { - width: 11px; + width: 10px; &-thumb { background: rgba(255, 17, 0, 0); - border-radius: 20px; + border-radius: 3px; &:hover { background: rgba(255, 17, 0, 0); } } From 6a208054af50d5cadf4d9c645e632f35d9434abd Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 14:55:37 +0000 Subject: [PATCH 005/138] hm --- ReallifeGamemode.Client/assets/js/chat/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/assets/js/chat/main.js b/ReallifeGamemode.Client/assets/js/chat/main.js index 50619991..6d570fef 100644 --- a/ReallifeGamemode.Client/assets/js/chat/main.js +++ b/ReallifeGamemode.Client/assets/js/chat/main.js @@ -71,7 +71,7 @@ var chatAPI = elmnt.scrollTop = elmnt.scrollHeight - elmnt.clientHeight; } - // if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } + if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } } else { chat.container.append(chatElement); } From d6a5793b6e86a4cee8ad0d5217082726f4dbb730 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 17:44:51 +0200 Subject: [PATCH 006/138] Revert "hm" This reverts commit 6a208054af50d5cadf4d9c645e632f35d9434abd --- ReallifeGamemode.Client/assets/js/chat/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/assets/js/chat/main.js b/ReallifeGamemode.Client/assets/js/chat/main.js index 6d570fef..50619991 100644 --- a/ReallifeGamemode.Client/assets/js/chat/main.js +++ b/ReallifeGamemode.Client/assets/js/chat/main.js @@ -71,7 +71,7 @@ var chatAPI = elmnt.scrollTop = elmnt.scrollHeight - elmnt.clientHeight; } - if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } + // if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } } else { chat.container.append(chatElement); } From 94ba5980c9774a2abbddce099afb1b80739d028f Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 17:57:47 +0200 Subject: [PATCH 007/138] Vagos Basis WT Punkt gefixt --- ReallifeGamemode.Server/Factions/BasePoints.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Factions/BasePoints.cs b/ReallifeGamemode.Server/Factions/BasePoints.cs index bff3a90d..02f9eccc 100644 --- a/ReallifeGamemode.Server/Factions/BasePoints.cs +++ b/ReallifeGamemode.Server/Factions/BasePoints.cs @@ -33,7 +33,7 @@ namespace ReallifeGamemode.Server.WeaponDeal } else if (factionID == 5) { - client.TriggerEvent("SERVER:Util_setWaypoint", 1157.56, -1518.56); // Terror + client.TriggerEvent("SERVER:Util_setWaypoint", -1082.29, -1655.07); // Terror } else if (factionID == 6) { From bc161941a9efc20892299670cb94d9e44e411047 Mon Sep 17 00:00:00 2001 From: BuildTools Date: Wed, 21 Apr 2021 18:09:20 +0200 Subject: [PATCH 008/138] reduced afk distance --- ReallifeGamemode.Client/Player/antiafk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/antiafk.ts b/ReallifeGamemode.Client/Player/antiafk.ts index 1db1251f..28960330 100644 --- a/ReallifeGamemode.Client/Player/antiafk.ts +++ b/ReallifeGamemode.Client/Player/antiafk.ts @@ -17,7 +17,7 @@ let distance = mp.game.gameplay.getDistanceBetweenCoords(lp.x, lp.y, lp.z, np.x, np.y, np.z, false); - if (distance <= 5) { + if (distance <= 3) { if (!afkStatus) { afkCounter++; } From 0d2e4ab123912c397ce9443730b7364c604c1022 Mon Sep 17 00:00:00 2001 From: Alex_qp <> Date: Wed, 21 Apr 2021 18:09:20 +0200 Subject: [PATCH 009/138] reduced afk distance --- ReallifeGamemode.Client/Player/antiafk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/antiafk.ts b/ReallifeGamemode.Client/Player/antiafk.ts index 1db1251f..28960330 100644 --- a/ReallifeGamemode.Client/Player/antiafk.ts +++ b/ReallifeGamemode.Client/Player/antiafk.ts @@ -17,7 +17,7 @@ let distance = mp.game.gameplay.getDistanceBetweenCoords(lp.x, lp.y, lp.z, np.x, np.y, np.z, false); - if (distance <= 5) { + if (distance <= 3) { if (!afkStatus) { afkCounter++; } From 21dc2545b8499a49ab76387bb4268876d21dde11 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 17:06:51 +0000 Subject: [PATCH 010/138] =?UTF-8?q?inputhelper=20sch=C3=B6ner=20gemacht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/css/inputhelper/style.css | 210 ++++++++++-------- 1 file changed, 113 insertions(+), 97 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/inputhelper/style.css b/ReallifeGamemode.Client/assets/css/inputhelper/style.css index 830931f3..5f9b84a8 100644 --- a/ReallifeGamemode.Client/assets/css/inputhelper/style.css +++ b/ReallifeGamemode.Client/assets/css/inputhelper/style.css @@ -1,122 +1,138 @@ html { - -webkit-box-sizing: border-box; - box-sizing: border-box; - user-select: none; + -webkit-box-sizing: border-box; + box-sizing: border-box; + user-select: none; } *, *::before, *::after { - -webkit-box-sizing: inherit; - box-sizing: inherit; + -webkit-box-sizing: inherit; + box-sizing: inherit; } body { - display: -webkit-box; - display: -ms-flexbox; - display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -ms-flex-direction: column; - flex-direction: column; - -webkit-box-pack: center; - -ms-flex-pack: center; - justify-content: center; - height: 100vh; - width: -webkit-fit-content; - width: -moz-fit-content; - width: fit-content; - margin: 0 auto; - padding: 1em .5em; - font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; - font-weight: 400; - color: #FFF; - + display: -webkit-box; + display: -ms-flexbox; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + -ms-flex-direction: column; + flex-direction: column; + -webkit-box-pack: center; + -ms-flex-pack: center; + justify-content: center; + height: 100vh; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; + margin: 0 auto; + padding: 1em .5em; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; + font-weight: 400; + color: #FFF; } main { - height: auto; - position: relative; - min-width: 50ch; - max-width: 35vw; - padding: 1em; - border-radius: .25em; - font-size: 1em; - line-height: 1.25; - background-color: rgba(0, 0, 0, 0.5); - + height: auto; + max-height: 60vh; + position: relative; + min-width: 45ch; + max-width: 30vw; + padding: 1em; + border-radius: .25em; + font-size: 1em; + line-height: 1.25; + background-color: rgba(0, 0, 0, 0.5); } - main a#close { - position: absolute; - right: 1em; - top: 1em; - height: 1em; - width: 1em; - opacity: 0.25; - + main a#close { + position: absolute; + right: 1em; + top: 1em; + height: 1em; + width: 1em; + opacity: 0.25; + } + + main a#close:hover { + opacity: 1; } - main a#close:hover { - opacity: 1; - } - - main a#close:before, main a#close:after { - content: ' '; - position: absolute; - left: .5em; - height: 1em; - width: 2px; - background-color: #FFF; - border-radius: 1px; - } - - main a#close:before { - -webkit-transform: rotate(45deg); - transform: rotate(45deg); - } - - main a#close:after { - -webkit-transform: rotate(-45deg); - transform: rotate(-45deg); - } - - main h1, main p { - margin: 0; + main a#close:before, main a#close:after { + content: ' '; + position: absolute; + left: .5em; + height: 1em; + width: 2px; + background-color: #FFF; + border-radius: 1px; } - main h1 { - font-size: 1.5em; - line-height: 1; - margin-bottom: .125em; - padding-right: 1em; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; + main a#close:before { + -webkit-transform: rotate(45deg); + transform: rotate(45deg); } - main p { - margin-bottom: 1em; - line-height: 1.125; + main a#close:after { + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); } - main .form { - margin-top: .25em; + main h1, main p { + margin: 0; + } + + main h1 { + font-size: 1.5em; + line-height: 1.125; + margin-bottom: .25em; + padding-right: 1em; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + main p { + margin-bottom: .5em; + line-height: 1.125; + max-height: 12em; + overflow-y: auto; + padding-right: .5em; + word-break: break-word; + } + + main p::-webkit-scrollbar { + width: 5px; + } + + main p::-webkit-scrollbar-track { + background-color: rgba(0, 0, 0, .125); + border-radius: 3px; + } + + main p::-webkit-scrollbar-thumb { + background-color: rgba(0, 0, 0, .125); + border-radius: 3px; + } + + main .form { + margin-top: .25em; + } + + main .form input { + width: 100%; + padding: .5em; + font-family: "Roboto Mono"; + font-weight: 500; + font-size: 1em; + border: none; + border-radius: 5px; + background-color: rgba(0, 0, 0, 0.125); + color: inherit; } - main .form input { - width: 100%; - padding: .5em; - font-family: "Roboto Mono"; - font-weight: 500; - font-size: 1em; - border: none; - border-radius: 5px; - background-color: rgba(0, 0, 0, 0.125); - color: inherit; - } - - main .form input:focus { - outline-width: 0; - } + main .form input:focus { + outline-width: 0; + } From fd25fc4ade01709fb2dd9f1357c2e747eaca73d7 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 17:07:41 +0000 Subject: [PATCH 011/138] nachschub --- ReallifeGamemode.Client/assets/js/inputhelper/application.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/assets/js/inputhelper/application.js b/ReallifeGamemode.Client/assets/js/inputhelper/application.js index 8513019d..e26febbc 100644 --- a/ReallifeGamemode.Client/assets/js/inputhelper/application.js +++ b/ReallifeGamemode.Client/assets/js/inputhelper/application.js @@ -1,4 +1,4 @@ -let content = document.getElementById('content'); +let content = document.getElementById('content'); let heading = document.getElementById('heading'); let description = document.getElementById('description'); @@ -6,7 +6,7 @@ let description = document.getElementById('description'); let input = document.getElementById('input'); let close = document.getElementById('close'); -fzunction setInputFieldType(value) { +function setInputFieldType(value) { if (input.type == value) return; var field = document.createElement('input'); @@ -21,7 +21,6 @@ fzunction setInputFieldType(value) { return field; } - function setText(heading, description) { setHeading(heading); setDescription(description); From d8b7c85b9a3681acf9b24e10a64cc4b35cc88876 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 17:15:15 +0000 Subject: [PATCH 012/138] im inputhelper fehlte was und jetzt ist es wieder da --- .../assets/html/inputhelper/index.html | 16 +++++++++------- .../assets/js/inputhelper/application.js | 15 ++++++--------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/ReallifeGamemode.Client/assets/html/inputhelper/index.html b/ReallifeGamemode.Client/assets/html/inputhelper/index.html index f3247c4b..a83e9194 100644 --- a/ReallifeGamemode.Client/assets/html/inputhelper/index.html +++ b/ReallifeGamemode.Client/assets/html/inputhelper/index.html @@ -1,4 +1,4 @@ - + @@ -6,17 +6,20 @@ Eingabe | Life of German - - - + + +
      -

      +

      {{ Überschrift }}

      + +

      +
      @@ -45,7 +48,6 @@ $('.input-main h1').text(title); } - - \ No newline at end of file + diff --git a/ReallifeGamemode.Client/assets/js/inputhelper/application.js b/ReallifeGamemode.Client/assets/js/inputhelper/application.js index e26febbc..8f9d69e4 100644 --- a/ReallifeGamemode.Client/assets/js/inputhelper/application.js +++ b/ReallifeGamemode.Client/assets/js/inputhelper/application.js @@ -47,14 +47,6 @@ function getInput() { return input.value.length != 0 ? input.value : null; } -close.onclick = function closeWindow() { - mp.trigger('closeinputhelper'); - console.log('Fenster geschlossen!'); -} - -setInputFieldType('text'); -setText("Überschrift", "Lorem ipsum dolor sit amet consectetur adipisicing elit. Maiores laboriosam atque ut voluptates molestiae ab autem? Est consectetur voluptatem quia, commodi sint a omnis consequuntur. Tempora dolores ullam natus in?"); - /* Enter wird im Input-Feld gedrückt */ input.onkeyup = e => { let code = e.keyCode ? e.keyCode : e.which; @@ -70,4 +62,9 @@ document.onkeyup = e => { if (code === 27) { closeWindow(); } } -close.onclick = e => { closeWindow(); } +close.onclick = e => { + mp.trigger('closeinputhelper'); + console.log('Fenster geschlossen!'); +} + +setInputFieldType('text'); From a5aba175b4e4b51933989ca6200a651547fb017b Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 21 Apr 2021 17:16:41 +0000 Subject: [PATCH 013/138] ih: fix js --- .../assets/js/inputhelper/application.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Client/assets/js/inputhelper/application.js b/ReallifeGamemode.Client/assets/js/inputhelper/application.js index 8f9d69e4..5f37fd1e 100644 --- a/ReallifeGamemode.Client/assets/js/inputhelper/application.js +++ b/ReallifeGamemode.Client/assets/js/inputhelper/application.js @@ -47,6 +47,11 @@ function getInput() { return input.value.length != 0 ? input.value : null; } +close.onclick = function closeWindow() { + mp.trigger('closeinputhelper'); + console.log('Fenster geschlossen!'); +} + /* Enter wird im Input-Feld gedrückt */ input.onkeyup = e => { let code = e.keyCode ? e.keyCode : e.which; @@ -62,9 +67,5 @@ document.onkeyup = e => { if (code === 27) { closeWindow(); } } -close.onclick = e => { - mp.trigger('closeinputhelper'); - console.log('Fenster geschlossen!'); -} - +close.onclick = e => { closeWindow(); } setInputFieldType('text'); From ee2a13fea0f29f6f442e107fe539e68c757197b3 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 21 Apr 2021 19:45:09 +0200 Subject: [PATCH 014/138] test damage stuff --- ReallifeGamemode.Client/util/weapondamage.ts | 8 ++++++++ ReallifeGamemode.Server/Events/PlayerEvent.cs | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 1907a03a..e0ded85c 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -7,6 +7,14 @@ player.setSuffersCriticalHits(false); }); + mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + mp.gui.chat.push("outdmg"); + }); + + mp.events.add('incomingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + mp.gui.chat.push("indmg"); + }); + mp.events.add("render", () => { if (blockInput) { mp.game.controls.disableControlAction(32, 142, true); diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index 886d25fe..c504344d 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -3,11 +3,17 @@ using System.Collections.Generic; using System.Text; using GTANetworkAPI; using ReallifeGamemode.Server.Extensions; +using ReallifeGamemode.Server.Services; namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { + [ServerEvent(Event.PlayerDamage)] + public void OnPlayerDamage(Player player, float healthLoss, float armorLoss) { + ChatService.Broadcast("dmg"); + } + [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From 3cbca7ec1e7dd3b5c0d2f44ba1318ef4d07de011 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 21 Apr 2021 20:03:54 +0200 Subject: [PATCH 015/138] =?UTF-8?q?fix=20chat=20scroll,=20luke=20ist=20daf?= =?UTF-8?q?=C3=BCr=20verantwortlich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/assets/js/chat/main.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Client/assets/js/chat/main.js b/ReallifeGamemode.Client/assets/js/chat/main.js index 50619991..f9ebd0aa 100644 --- a/ReallifeGamemode.Client/assets/js/chat/main.js +++ b/ReallifeGamemode.Client/assets/js/chat/main.js @@ -23,7 +23,8 @@ function enableChatInput(enable) { if (enable) { chat.input = $("#chat").append('
      ').children(":last"); chat.input.children("input").focus(); - } else { + } + else { chat.input.fadeOut('fast', function () { chat.input.remove(); chat.input = null; @@ -64,14 +65,12 @@ var chatAPI = var today = new Date(); if (chatElement === "
    • ") { - var time = today.toLocaleTimeString('de-DE'); - chat.container.append("
    • " + "[" + time + "] " + text + "
    • "); - if (chat.input == null || elmnt.scrollTop == elmnt.scrollHeight - elmnt.clientHeight) { + chat.container.append("
    • " + "[" + today.toLocaleTimeString('de-DE') + "] " + text + "
    • "); elmnt.scrollTop = elmnt.scrollHeight - elmnt.clientHeight; + } else { + chat.container.append("
    • " + "[" + today.toLocaleTimeString('de-DE') + "] " + text + "
    • "); } - - // if (!chat.enabled) { elmnt.scrollTo(0, elmnt.scrollHeight); } } else { chat.container.append(chatElement); } From fed8dc786d63f4847bcccdd0e247302c411f4b9a Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 21 Apr 2021 20:33:58 +0200 Subject: [PATCH 016/138] test ausgaben entfernt --- ReallifeGamemode.Client/util/weapondamage.ts | 8 -------- ReallifeGamemode.Server/Events/PlayerEvent.cs | 5 ----- 2 files changed, 13 deletions(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index e0ded85c..1907a03a 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -7,14 +7,6 @@ player.setSuffersCriticalHits(false); }); - mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - mp.gui.chat.push("outdmg"); - }); - - mp.events.add('incomingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - mp.gui.chat.push("indmg"); - }); - mp.events.add("render", () => { if (blockInput) { mp.game.controls.disableControlAction(32, 142, true); diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index c504344d..2aba02d8 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -9,11 +9,6 @@ namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { - [ServerEvent(Event.PlayerDamage)] - public void OnPlayerDamage(Player player, float healthLoss, float armorLoss) { - ChatService.Broadcast("dmg"); - } - [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From 4fe9365902333665af6240c55ecc19352f3b9255 Mon Sep 17 00:00:00 2001 From: kookroach Date: Wed, 21 Apr 2021 21:32:19 +0200 Subject: [PATCH 017/138] Change vehicle taxation see https://life-of-german.org/bugtracker/bug/60-neue-fahrzeugsteuern/ @hydrant update DB before merge with master. --- .../Entities/UserVehicle.cs | 3 + ...21190610_UserVehicleBusinessId.Designer.cs | 2177 +++++++++++++++++ .../20210421190610_UserVehicleBusinessId.cs | 109 + .../DatabaseContextModelSnapshot.cs | 22 +- ReallifeGamemode.Server/Finance/Economy.cs | 32 +- 5 files changed, 2331 insertions(+), 12 deletions(-) create mode 100644 ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.Designer.cs create mode 100644 ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.cs diff --git a/ReallifeGamemode.Database/Entities/UserVehicle.cs b/ReallifeGamemode.Database/Entities/UserVehicle.cs index 41000950..f7b54e6d 100644 --- a/ReallifeGamemode.Database/Entities/UserVehicle.cs +++ b/ReallifeGamemode.Database/Entities/UserVehicle.cs @@ -15,10 +15,13 @@ namespace ReallifeGamemode.Database.Entities { [ForeignKey("User")] public int UserId { get; set; } + public User User { get; set; } public int? Price { get; set; } + public int? BusinessId { get; set; } + public override string ToString() { return "Spieler Fahrzeug | Besitzer: " + GetOwner().Name; diff --git a/ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.Designer.cs b/ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.Designer.cs new file mode 100644 index 00000000..bcbecc29 --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.Designer.cs @@ -0,0 +1,2177 @@ +// +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("20210421190610_UserVehicleBusinessId")] + partial class UserVehicleBusinessId + { + 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("BusinessId") + .HasColumnName("UserVehicle_BusinessId") + .HasColumnType("int"); + + 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") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + 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") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); + }); + + modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => + { + b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") + .WithMany() + .HasForeignKey("GroupId") + .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/20210421190610_UserVehicleBusinessId.cs b/ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.cs new file mode 100644 index 00000000..41be838a --- /dev/null +++ b/ReallifeGamemode.Database/Migrations/20210421190610_UserVehicleBusinessId.cs @@ -0,0 +1,109 @@ +using Microsoft.EntityFrameworkCore.Migrations; + +namespace ReallifeGamemode.Database.Migrations +{ + public partial class UserVehicleBusinessId : Migration + { + protected override void Up(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Users_UserId", + table: "ChatLogs"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Factions_FactionId", + table: "ChatLogs"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Groups_GroupId", + table: "ChatLogs"); + + migrationBuilder.AddColumn( + name: "UserVehicle_BusinessId", + table: "ServerVehicles", + nullable: true); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "ChatLogs", + nullable: false, + oldClrType: typeof(int), + oldType: "int", + oldNullable: true); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Users_UserId", + table: "ChatLogs", + column: "UserId", + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Factions_FactionId", + table: "ChatLogs", + column: "FactionId", + principalTable: "Factions", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Groups_GroupId", + table: "ChatLogs", + column: "GroupId", + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Cascade); + } + + protected override void Down(MigrationBuilder migrationBuilder) + { + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Users_UserId", + table: "ChatLogs"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Factions_FactionId", + table: "ChatLogs"); + + migrationBuilder.DropForeignKey( + name: "FK_ChatLogs_Groups_GroupId", + table: "ChatLogs"); + + migrationBuilder.DropColumn( + name: "UserVehicle_BusinessId", + table: "ServerVehicles"); + + migrationBuilder.AlterColumn( + name: "UserId", + table: "ChatLogs", + type: "int", + nullable: true, + oldClrType: typeof(int)); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Users_UserId", + table: "ChatLogs", + column: "UserId", + principalTable: "Users", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Factions_FactionId", + table: "ChatLogs", + column: "FactionId", + principalTable: "Factions", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + + migrationBuilder.AddForeignKey( + name: "FK_ChatLogs_Groups_GroupId", + table: "ChatLogs", + column: "GroupId", + principalTable: "Groups", + principalColumn: "Id", + onDelete: ReferentialAction.Restrict); + } + } +} diff --git a/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs b/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs index a13f30e6..fcb3068f 100644 --- a/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs +++ b/ReallifeGamemode.Database/Migrations/DatabaseContextModelSnapshot.cs @@ -814,7 +814,7 @@ namespace ReallifeGamemode.Database.Migrations .ValueGeneratedOnAdd() .HasColumnType("datetime(6)"); - b.Property("UserId") + b.Property("UserId") .HasColumnType("int"); b.HasKey("Id"); @@ -1749,7 +1749,7 @@ namespace ReallifeGamemode.Database.Migrations { b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); - b.Property("FactionId") + b.Property("FactionId") .HasColumnType("int"); b.HasIndex("FactionId"); @@ -1768,7 +1768,7 @@ namespace ReallifeGamemode.Database.Migrations { b.HasBaseType("ReallifeGamemode.Database.Entities.Logs.Chat.ChatLogEntry"); - b.Property("GroupId") + b.Property("GroupId") .HasColumnType("int"); b.HasIndex("GroupId"); @@ -1891,6 +1891,10 @@ namespace ReallifeGamemode.Database.Migrations { b.HasBaseType("ReallifeGamemode.Database.Entities.ServerVehicle"); + b.Property("BusinessId") + .HasColumnName("UserVehicle_BusinessId") + .HasColumnType("int"); + b.Property("Price") .HasColumnName("UserVehicle_Price") .HasColumnType("int"); @@ -2011,7 +2015,9 @@ namespace ReallifeGamemode.Database.Migrations { b.HasOne("ReallifeGamemode.Database.Entities.User", "User") .WithMany() - .HasForeignKey("UserId"); + .HasForeignKey("UserId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.CommandLogEntry", b => @@ -2134,14 +2140,18 @@ namespace ReallifeGamemode.Database.Migrations { b.HasOne("ReallifeGamemode.Database.Entities.Faction", "Faction") .WithMany() - .HasForeignKey("FactionId"); + .HasForeignKey("FactionId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("ReallifeGamemode.Database.Entities.Logs.Chat.GroupChatLogEntry", b => { b.HasOne("ReallifeGamemode.Database.Entities.Group", "Group") .WithMany() - .HasForeignKey("GroupId"); + .HasForeignKey("GroupId") + .OnDelete(DeleteBehavior.Cascade) + .IsRequired(); }); modelBuilder.Entity("ReallifeGamemode.Database.Entities.GroupVehicle", b => diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index 391704e2..3e5cfce8 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -44,11 +44,31 @@ namespace ReallifeGamemode.Server.Finance foreach (UserVehicle uVeh in dbContext.UserVehicles.Where(u => u.UserId == user.Id)) { if (uVeh.Price == null) - { vehicleTaxation += 400; - continue; - } - vehicleTaxation += (int)(uVeh.Price * 0.005f); + else + vehicleTaxation += (int)(uVeh.Price * 0.0015f); + + int taxation = uVeh.BusinessId switch + { + 3 => 75, /// + 4 => 200, /// + 5 => 150, /// + 6 => 150, /// + 7 => 150, /// + 8 => 50, /// + 9 => 20, /// + 10 => 50, /// + 11 => 100, /// + 12 => 50, /// + 13 => 100, /// + 14 => 200, /// + _ => 0, + }; + + if (taxation is 0) + Console.WriteLine($"[FINANCE] USER: {user.Name} ({user.Id}) has no BusinessId on UserVehicle ({uVeh.Id})"); + + vehicleTaxation += taxation; } } return vehicleTaxation; @@ -189,13 +209,13 @@ namespace ReallifeGamemode.Server.Finance using var dbContext = new DatabaseContext(); foreach (var player in NAPI.Pools.GetAllPlayers().Where(p => p.IsLoggedIn())) { - if(player.IsAfk()) + if (player.IsAfk()) { continue; } User user = player.GetUser(dbContext); - if(user == null) + if (user == null) { continue; } From 3f417e668176ae7e10d1b4102233efade6299852 Mon Sep 17 00:00:00 2001 From: kookroach Date: Wed, 21 Apr 2021 21:42:34 +0200 Subject: [PATCH 018/138] Decrease range needed for coppers to get criminals binned after death. From 200 to 100. --- ReallifeGamemode.Server/Events/Death.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index e935582b..b810a62b 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -27,7 +27,6 @@ namespace ReallifeGamemode.Server.Events { private readonly Dictionary lastPlayerDeathTime = new Dictionary(); - [ServerEvent(Event.PlayerDeath)] public void OnPlayerDeath(Player player, Player killer, uint reason) { @@ -114,9 +113,9 @@ namespace ReallifeGamemode.Server.Events }; dbContext.DeathLogs.Add(dead); - bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 200 * 200); + bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 100 * 100); - if (user.Wanteds > 0) + if (user.Wanteds > 0 && player.HasData("GotInsideOfTurf") && !player.GetData("GotInsideOfTurf")) { if (copNearby) { From 5992318989750dfe0757bcea18abac9e0e660d34 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 18:34:06 +0200 Subject: [PATCH 019/138] =?UTF-8?q?Busfahrer:=20Bei=20Routenmen=C3=BC=20Sc?= =?UTF-8?q?hlie=C3=9Fen=20Job=20beenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index f9ca378f..adf56848 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -73,6 +73,7 @@ export default function busRouteList(globalData: IGlobalData) { }); routeMenu.MenuClose.on(() => { + mp.events.callRemote("CLIENT:Job_StopJob"); globalData.InMenu = false; }); } From d413c5c8cb22cadb1f8bedaa819d04bc5143dbed Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 18:34:36 +0200 Subject: [PATCH 020/138] Job: Alle Prefix zu "[JOB]" vereinheitlicht --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 12 ++++++------ ReallifeGamemode.Server/Job/JobBase.cs | 4 ++-- ReallifeGamemode.Server/Job/PilotJob.cs | 4 ++-- .../Job/RefuseCollectorJob.cs | 18 +++++++++--------- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 181b2436..75720b67 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -424,13 +424,13 @@ namespace ReallifeGamemode.Server.Job player.TriggerEvent("CLIENT:PlaySound", "jobs/busfahrer/FahrplanAbfahrt", "wav", 15); player.StartCheckPointRoute(selectedRoute, MARKER_DELAY, MARKER_ID, MARKER_SIZE, MARKER_DIST, true, MARKER_EVENT); if (index != -1) - player.SendChatMessage($"~y~[JOB]: ~w~Dir wurde ~g~ Route {index + 1}~w~ zugeteilt."); + player.SendChatMessage($"~y~[JOB] ~w~Dir wurde ~g~ Route {index + 1}~w~ zugeteilt."); } public override void LastCheckpoint(Player player) { Vehicle v = player.Vehicle; - player.SendChatMessage("~y~[JOB]: ~w~Die neue Route lädt. Bitte warten..."); + player.SendChatMessage("~y~[JOB] ~w~Die neue Route lädt. Bitte warten..."); string type = getPlayerRouteType(player); if (type == BEGINNER) @@ -634,13 +634,13 @@ namespace ReallifeGamemode.Server.Job user.BusSkill++; if (user.BusSkill == BusDriverJob.SKILL_INTERMEDIATE) { - player.SendChatMessage($"~y~[JOB]: ~w~Du hast nun die Route ~g~{BusDriverJob.INTERMEDIATE} ~w~freigeschaltet!"); - player.SendChatMessage($"~y~[JOB]: ~w~Du kannst jetzt auch mit dem Coach fahren!"); + player.SendChatMessage($"~y~[JOB] ~w~Du hast nun die Route ~g~{BusDriverJob.INTERMEDIATE} ~w~freigeschaltet!"); + player.SendChatMessage($"~y~[JOB] ~w~Du kannst jetzt auch mit dem Coach fahren!"); } if (user.BusSkill == BusDriverJob.SKILL_PROFESSIONAL) { - player.SendChatMessage($"~y~[JOB]: ~w~Du hast nun die Route ~g~{BusDriverJob.PROFESSIONAL} ~w~freigeschaltet!"); - player.SendChatMessage($"~y~[JOB]: ~w~Du kannst jetzt auch mit dem Tourbus fahren!"); + player.SendChatMessage($"~y~[JOB] ~w~Du hast nun die Route ~g~{BusDriverJob.PROFESSIONAL} ~w~freigeschaltet!"); + player.SendChatMessage($"~y~[JOB] ~w~Du kannst jetzt auch mit dem Tourbus fahren!"); } dbContext.SaveChanges(); diff --git a/ReallifeGamemode.Server/Job/JobBase.cs b/ReallifeGamemode.Server/Job/JobBase.cs index 8a0baa0b..9c760574 100644 --- a/ReallifeGamemode.Server/Job/JobBase.cs +++ b/ReallifeGamemode.Server/Job/JobBase.cs @@ -45,7 +45,7 @@ namespace ReallifeGamemode.Server.Job _inJob.Add(player); jobPlayer.Add(player); - ChatService.SendMessage(player, $"~y~[Job]~s~ Du hast deinen Job ~o~{this.Name}~s~ gestartet."); + ChatService.SendMessage(player, $"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ gestartet."); JobStart?.Invoke(player); } @@ -58,7 +58,7 @@ namespace ReallifeGamemode.Server.Job if (quit) { - ChatService.SendMessage(player, $"~y~[Job]~s~ Du hast deinen Job ~o~{this.Name}~s~ beendet."); + ChatService.SendMessage(player, $"~y~[JOB]~s~ Du hast deinen Job ~o~{this.Name}~s~ beendet."); player.SafeTeleport(JobManager.playerJobStartPosition[player]); } diff --git a/ReallifeGamemode.Server/Job/PilotJob.cs b/ReallifeGamemode.Server/Job/PilotJob.cs index 66751a43..f58fa5c4 100644 --- a/ReallifeGamemode.Server/Job/PilotJob.cs +++ b/ReallifeGamemode.Server/Job/PilotJob.cs @@ -356,8 +356,8 @@ namespace ReallifeGamemode.Server.Job user.PilotSkill++; if (user.PilotSkill == BusDriverJob.SKILL_INTERMEDIATE) { - player.SendChatMessage($"~y~[JOB]: ~w~Du hast nun die Route ~g~{BusDriverJob.INTERMEDIATE} ~w~freigeschaltet!"); - player.SendChatMessage($"~y~[JOB]: ~w~Du kannst jetzt auch mit dem Velum fliegen!"); + player.SendChatMessage($"~y~[JOB] ~w~Du hast nun die Route ~g~{BusDriverJob.INTERMEDIATE} ~w~freigeschaltet!"); + player.SendChatMessage($"~y~[JOB] ~w~Du kannst jetzt auch mit dem Velum fliegen!"); } dbContext.SaveChanges(); diff --git a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs index 7edf83be..e70a3720 100644 --- a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs +++ b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs @@ -205,7 +205,7 @@ namespace ReallifeGamemode.Server.Job player.AddAttachment("binbag", true); } - ChatService.SendMessage(data.getPartnerClient(player), $"~y~[Job] ~s~Dein Partner hat den Job beendet."); + ChatService.SendMessage(data.getPartnerClient(player), $"~y~[JOB] ~s~Dein Partner hat den Job beendet."); data.removeClientFromData(player); return; @@ -254,10 +254,10 @@ namespace ReallifeGamemode.Server.Job if (data.getTrashCount() == MAX_BAG) { - ChatService.SendMessage((Player)player, "~y~[Job] ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!"); + ChatService.SendMessage((Player)player, "~y~[JOB] ~s~Der Müllwagen ist voll. Fahre nun zurück zur Recyclinganlage!"); if (target != null) { - ChatService.SendMessage((Player)target, "~y~[Job] ~s~Der Müllwagen ist voll! Er muss entleert werden."); + ChatService.SendMessage((Player)target, "~y~[JOB] ~s~Der Müllwagen ist voll! Er muss entleert werden."); target.TriggerEvent("SERVER:MuellmannZuBase"); } player.TriggerEvent("SERVER:MuellmannZuBase"); @@ -294,8 +294,8 @@ namespace ReallifeGamemode.Server.Job if (data.getDataFromClient(player) == null) continue; Player target = data.getPartnerClient(player); - if (target != null) ChatService.SendMessage((Player)target, $"~y~[Job] ~s~Fahrzeug wurde entleert. Säcke: {data.getTrashCount()}"); - ChatService.SendMessage((Player)player, $"~y~[Job] ~s~Fahrzeug wurde entleert. Säcke: {data.getTrashCount()}"); + if (target != null) ChatService.SendMessage((Player)target, $"~y~[JOB] ~s~Fahrzeug wurde entleert. Säcke: {data.getTrashCount()}"); + ChatService.SendMessage((Player)player, $"~y~[JOB] ~s~Fahrzeug wurde entleert. Säcke: {data.getTrashCount()}"); //bonus pro sack using (var dbContext = new DatabaseContext()) { @@ -384,8 +384,8 @@ namespace ReallifeGamemode.Server.Job if (target == null) return; - ChatService.SendMessage((Player)player, $"~y~[Job] ~s~Dein Partner ist {target.Name}!"); - ChatService.SendMessage((Player)target, $"~y~[Job] ~s~Dein Partner ist {player.Name}!"); + ChatService.SendMessage((Player)player, $"~y~[JOB] ~s~Dein Partner ist {target.Name}!"); + ChatService.SendMessage((Player)target, $"~y~[JOB] ~s~Dein Partner ist {player.Name}!"); return; } } @@ -401,8 +401,8 @@ namespace ReallifeGamemode.Server.Job if (target == null) return; - ChatService.SendMessage((Player)player, $"~y~[Job] ~s~Dein Partner ist {target.Name}!"); - ChatService.SendMessage((Player)target, $"~y~[Job] ~s~Dein Partner ist {player.Name}!"); + ChatService.SendMessage((Player)player, $"~y~[JOB] ~s~Dein Partner ist {target.Name}!"); + ChatService.SendMessage((Player)target, $"~y~[JOB] ~s~Dein Partner ist {player.Name}!"); } } From 4c35539b239847ad8112bc758ca2b25586270469 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 19:37:01 +0200 Subject: [PATCH 021/138] =?UTF-8?q?Evtl.=20fix=20unerkl=C3=A4rliche=20asyn?= =?UTF-8?q?c=20client=20fehler?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/core/rage-mp/entities.ts | 12 ++++++++++-- ReallifeGamemode.Client/core/rage-mp/game.ts | 4 ++-- ReallifeGamemode.Client/game.ts | 3 ++- ReallifeGamemode.Client/util/attachmentMngr.ts | 2 +- ReallifeGamemode.Client/vehiclesync/vehiclesync.ts | 10 +++++----- 5 files changed, 20 insertions(+), 11 deletions(-) diff --git a/ReallifeGamemode.Client/core/rage-mp/entities.ts b/ReallifeGamemode.Client/core/rage-mp/entities.ts index 9073acc4..2a855054 100644 --- a/ReallifeGamemode.Client/core/rage-mp/entities.ts +++ b/ReallifeGamemode.Client/core/rage-mp/entities.ts @@ -147,7 +147,7 @@ class RageEntityAttachmentPool implements IEntityAttachmentPool { let e = new RageAttachments(entity, attachments, attachmentObjects); this.attachmentPool.push(e); - return e; + return e; } at(remoteId: any): IEntityAttachments { @@ -188,6 +188,10 @@ class RagePlayerPool implements IPlayerPool { fn(new RagePlayer(e)); }); } + + exists(entity: IPlayer): boolean { + return mp.players.exists(entity.id); + } } @@ -280,6 +284,10 @@ class RageVehiclePool implements IVehiclePool { fn(new RageVehicle(e)); }) } + + exists(entity: IVehicle): boolean { + return mp.vehicles.exists(entity.id); + } } export { @@ -290,5 +298,5 @@ export { RageEntityAttachmentPool, RageVehicle, RageVehiclePool, - + } \ No newline at end of file diff --git a/ReallifeGamemode.Client/core/rage-mp/game.ts b/ReallifeGamemode.Client/core/rage-mp/game.ts index dc4e1514..5094ba9f 100644 --- a/ReallifeGamemode.Client/core/rage-mp/game.ts +++ b/ReallifeGamemode.Client/core/rage-mp/game.ts @@ -10,8 +10,8 @@ export default class RageGame implements IGame { events: IEvents = new RageEvents; ui: IUi = new RageUi; - async wait(ms: number): Promise { - await mp.game.waitAsync(ms); + wait(ms: number): void { + mp.game.wait(ms); } disableDefaultEngineBehaviour(): void { diff --git a/ReallifeGamemode.Client/game.ts b/ReallifeGamemode.Client/game.ts index db02729b..c201e07d 100644 --- a/ReallifeGamemode.Client/game.ts +++ b/ReallifeGamemode.Client/game.ts @@ -1,5 +1,5 @@ interface IGame { - wait(ms: number): Promise; + wait(ms: number): void; events: IEvents; ui: IUi; @@ -75,6 +75,7 @@ interface IVehicle extends IEntity { interface IEntityPool { at(id: number): TEntity; forEach(fn: (entity: TEntity) => void): void; + exists(entity: TEntity): boolean; } diff --git a/ReallifeGamemode.Client/util/attachmentMngr.ts b/ReallifeGamemode.Client/util/attachmentMngr.ts index bb62ee5d..d46da114 100644 --- a/ReallifeGamemode.Client/util/attachmentMngr.ts +++ b/ReallifeGamemode.Client/util/attachmentMngr.ts @@ -15,7 +15,7 @@ export default function attachmentManager(game: IGame) { { attachments: {}, - addFor: async function (entity, id) { + addFor: function (entity, id) { if (this.attachments.hasOwnProperty(id)) { if (!entity.__attachmentObjects) { entity.__attachmentObjects = {}; diff --git a/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts b/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts index f7989e42..d30322da 100644 --- a/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts +++ b/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts @@ -10,9 +10,9 @@ game.events.add('SERVER:Vehicle:UpdateData', (vehId, dataStr) => { setVehicleData(vehicle, data); }); -game.events.onPlayerEnterVehicle(async (vehicle, seat) => { +game.events.onPlayerEnterVehicle((vehicle, seat) => { while (!game.players.local.inVehicle) { - await game.wait(0); + game.wait(0); } if (vehicle) { @@ -22,11 +22,11 @@ game.events.onPlayerEnterVehicle(async (vehicle, seat) => { } }); -game.events.onPlayerExitVehicle(async () => { +game.events.onPlayerExitVehicle(() => { var veh = game.players.local.vehicle; while (game.players.local.inVehicle) { - await game.wait(0); + game.wait(0); } if (veh) { @@ -51,7 +51,7 @@ game.events.onEntityStreamIn((entity: IEntity) => { }); function setVehicleData(veh: IVehicle, data: VehicleData): void { - if (!veh) { + if (!veh || !game.vehicles.exists(veh)) { return; } From 5cc0591e9cbb8226c55f1fe1a7cb93bf8bb5921f Mon Sep 17 00:00:00 2001 From: kookroach Date: Wed, 21 Apr 2021 22:12:25 +0200 Subject: [PATCH 022/138] Change Order of events on Death.cs --- ReallifeGamemode.Server/Events/Death.cs | 78 +++++++++---------------- 1 file changed, 27 insertions(+), 51 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index b810a62b..c2eba6d0 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -113,6 +113,33 @@ namespace ReallifeGamemode.Server.Events }; dbContext.DeathLogs.Add(dead); + player.ClearAnimation(); + player.ClearAttachments(); + List fItem = dbContext.UserItems.Where(u => u.UserId == user.Id).ToList(); + foreach (var item in fItem) + { + IItem iItem = InventoryManager.GetItemById(item.ItemId); + if (iItem is IWeaponDealItem obj) + { + int amount = item.Amount; + + Vector3 dropPosition = PlayerExtension.GetPositionFromPlayer(player, 0.6f, 0); + //new Vector3(player.Position.X, player.Position.Y, player.Position.Z - 0.8f); + Random r = new Random(); + GTANetworkAPI.Object grndObject; + Vector3 textPos = dropPosition; + + dropPosition.Z -= 1.05f; + grndObject = NAPI.Object.CreateObject(3666746839, dropPosition, new Vector3(0, 0, r.Next(0, 360)), 255, 0); + + GroundItem grndItem = new GroundItem { ItemId = iItem.Id, Amount = amount, Position = dropPosition }; + TextLabel grndTxtLbl = NAPI.TextLabel.CreateTextLabel(iItem.Name + " ~s~(~y~" + amount + "~s~)", textPos, 5, 0.5f, 4, new Color(255, 255, 255), false, 0); + GroundItem.AddGroundItem(grndItem, grndObject, grndTxtLbl); + + dbContext.Remove(item); + } + } + bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 100 * 100); if (user.Wanteds > 0 && player.HasData("GotInsideOfTurf") && !player.GetData("GotInsideOfTurf")) @@ -165,83 +192,32 @@ namespace ReallifeGamemode.Server.Events } //TODO PICTURE NOTIFICATION + SOUND für Medics - - player.ClearAttachments(); - List fItem = dbContext.UserItems.Where(u => u.UserId == user.Id).ToList(); - foreach (var item in fItem) - { - IItem iItem = InventoryManager.GetItemById(item.ItemId); - if (iItem is IWeaponDealItem obj) - { - int amount = item.Amount; - - Vector3 dropPosition = PlayerExtension.GetPositionFromPlayer(player, 0.6f, 0); - //new Vector3(player.Position.X, player.Position.Y, player.Position.Z - 0.8f); - Random r = new Random(); - GTANetworkAPI.Object grndObject; - Vector3 textPos = dropPosition; - - dropPosition.Z -= 1.05f; - grndObject = NAPI.Object.CreateObject(3666746839, dropPosition, new Vector3(0, 0, r.Next(0, 360)), 255, 0); - - GroundItem grndItem = new GroundItem { ItemId = iItem.Id, Amount = amount, Position = dropPosition }; - TextLabel grndTxtLbl = NAPI.TextLabel.CreateTextLabel(iItem.Name + " ~s~(~y~" + amount + "~s~)", textPos, 5, 0.5f, 4, new Color(255, 255, 255), false, 0); - GroundItem.AddGroundItem(grndItem, grndObject, grndTxtLbl); - - player.ClearAnimation(); - - dbContext.Remove(item); - } - } } Job.JobBase job = Managers.JobManager.GetJob(player.GetUser().JobId ?? -1); if (job != null) { - //ChatService.SendMessage(player, "Debug1"); if (job.GetUsersInJob().Contains(player)) { - //ChatService.SendMessage(player, "Debug2"); if (player.Vehicle != null) { - //ChatService.SendMessage(player, "Debug3"); - /*if (player.Vehicle.GetData("timerJobVehicleRespawn") == true) - {*/ if (player.Vehicle.GetServerVehicle() is JobVehicle vehJ) { - //ChatService.SendMessage(player, "Debug4"); player.Vehicle.ResetData("timerJobVehicleRespawn"); ServerVehicle sVeh = Managers.VehicleManager.GetServerVehicleFromVehicle(player.Vehicle); ServerVehicleExtensions.Spawn(sVeh, player.Vehicle); } - else - { - //ChatService.SendMessage(player, "Debug5"); - } - //} } if (Managers.JobManager.playerTimersJobVehicleRespawn.ContainsKey(player)) { - //ChatService.SendMessage(player, "Debug6"); Managers.JobManager.playerTimersJobVehicleRespawn[player].Stop(); } - //ChatService.SendMessage(player, "Debug7"); - player.ResetData("PilotenBase"); job.StopJob(player); ChatService.SendMessage(player, $"~y~[JOB]~s~ Du hast deinen Job ~o~{job.Name}~s~ beendet."); if (player.GetData("HatRoute") == true) { - //ChatService.SendMessage(player, "Debug8"); CheckPointHandle.DeleteCheckpoints(player); player.ResetData("HatRoute"); } - else - { - //ChatService.SendMessage(player, "Debug9"); - } - } - else - { - //ChatService.SendMessage(player, "Debug10"); } } dbContext.SaveChanges(); From 3edd6b5560e87700c258f33ff205f347e09fd758 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 21 Apr 2021 22:35:58 +0200 Subject: [PATCH 023/138] nodmzone, COMMIT NUR ZUM TESTEN --- ReallifeGamemode.Client/Gui/infobox.ts | 16 ++++++++++++++ ReallifeGamemode.Client/Player/position.ts | 22 +++++++++++++++++++ ReallifeGamemode.Client/Player/reportmenu.ts | 1 - ReallifeGamemode.Client/index.ts | 3 +++ ReallifeGamemode.Client/util/weapondamage.ts | 6 +++++ .../Commands/UserCommands.cs | 7 ++++++ ReallifeGamemode.Server/Events/PlayerEvent.cs | 5 +++++ 7 files changed, 59 insertions(+), 1 deletion(-) create mode 100644 ReallifeGamemode.Client/Player/position.ts diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index 5e53bb15..87bbf472 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -16,6 +16,7 @@ export default function (globalData: IGlobalData): void { var adutyMode = false; var adminUnshow = false; var adminTSupport = false; + var noDmZone = false; var dutyMode = false; let jailTime = 0; let att_score = 0; @@ -84,6 +85,10 @@ export default function (globalData: IGlobalData): void { blackScreenMode = toggle; }); + mp.events.add("toggleNoDmZone", (toggle) => { + noDmZone = toggle; + }); + mp.events.add("jailTime", (time) => { jailTime = JSON.parse(time); }); @@ -345,6 +350,17 @@ export default function (globalData: IGlobalData): void { }) } + if (noDmZone) { + mp.game.graphics.drawText("~r~NoDM Zone", [0.907, 0.741], + { + font: 4, + color: [255, 255, 255, 255], + scale: [0.8, 0.8], + outline: true, + centre: false + }) + } + if (countdown > 0) { var now = Date.now(); var diff = Math.trunc((now - cdTimestamp) / 1000); diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts new file mode 100644 index 00000000..f6830796 --- /dev/null +++ b/ReallifeGamemode.Client/Player/position.ts @@ -0,0 +1,22 @@ + +export function isPlayerInNoDMZone(pos) { + if (pos.x >= -540 && pos.x <= -531 + && pos.y >= -2151 && pos.y <= -2139) { + return true; + } + return false; +} + +export default function positionHandler() { + + mp.events.add("checkPosition", (targetEntity) => { + + if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { + mp.gui.chat.push("Kein DM in NODM!"); + } + }); + + setInterval(() => { + mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); + }, 200); +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/Player/reportmenu.ts b/ReallifeGamemode.Client/Player/reportmenu.ts index bee77944..8e47ac8d 100644 --- a/ReallifeGamemode.Client/Player/reportmenu.ts +++ b/ReallifeGamemode.Client/Player/reportmenu.ts @@ -39,7 +39,6 @@ export default function reportList(globalData: IGlobalData) { //Weapon Menu - mp.events.add('showReportMenu', (userTickets, TicketsArr) => { if (!globalData.InMenu) { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index abcbd11e..71a5b13b 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -186,6 +186,9 @@ ped(); import reportList from './Player/reportmenu'; reportList(globalData); +import positionHandler from './Player/position'; +positionHandler(); + import checkpointHandle from './util/checkpoint'; checkpointHandle(globalData); diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 1907a03a..830722ad 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -7,6 +7,12 @@ player.setSuffersCriticalHits(false); }); + mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + + + mp.events.call('checkPosition', targetEntity); + }); + mp.events.add("render", () => { if (blockInput) { mp.game.controls.disableControlAction(32, 142, true); diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 15d159a7..479b939a 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -17,6 +17,13 @@ namespace ReallifeGamemode.Server.Commands { internal class UserCommands : Script { + [Command("nodm", "~m~nodm")] + public void CmdUserNoDm(Player player) + { + ChatService.Broadcast("ss"); + player.TriggerEvent("toggleNoDmZone", true); + } + [Command("look", "~m~look")] public void CmdUserLook(Player player) { diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index 2aba02d8..c504344d 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -9,6 +9,11 @@ namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { + [ServerEvent(Event.PlayerDamage)] + public void OnPlayerDamage(Player player, float healthLoss, float armorLoss) { + ChatService.Broadcast("dmg"); + } + [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From 6e1aed192662c64c54cf51caed8861b34792d330 Mon Sep 17 00:00:00 2001 From: Fabian Date: Wed, 21 Apr 2021 22:41:42 +0200 Subject: [PATCH 024/138] nodmzone, COMMIT NUR ZUM TESTEN --- ReallifeGamemode.Client/Player/position.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts index f6830796..850b4d99 100644 --- a/ReallifeGamemode.Client/Player/position.ts +++ b/ReallifeGamemode.Client/Player/position.ts @@ -1,7 +1,8 @@  export function isPlayerInNoDMZone(pos) { if (pos.x >= -540 && pos.x <= -531 - && pos.y >= -2151 && pos.y <= -2139) { + && pos.y >= -2151 && pos.y <= -2139 + && pos.z >= 0 && pos.z <= 30) { return true; } return false; @@ -10,7 +11,6 @@ export function isPlayerInNoDMZone(pos) { export default function positionHandler() { mp.events.add("checkPosition", (targetEntity) => { - if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { mp.gui.chat.push("Kein DM in NODM!"); } From 6c5a73c3f7224e0c93661674f25f70ea3a28ef24 Mon Sep 17 00:00:00 2001 From: balbo <34-nahkampfaffe@users.noreply.development.life-of-german.org> Date: Wed, 21 Apr 2021 22:49:26 +0200 Subject: [PATCH 025/138] Revert "nodmzone, COMMIT NUR ZUM TESTEN" This reverts commit 6e1aed192662c64c54cf51caed8861b34792d330 --- ReallifeGamemode.Client/Player/position.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts index 850b4d99..f6830796 100644 --- a/ReallifeGamemode.Client/Player/position.ts +++ b/ReallifeGamemode.Client/Player/position.ts @@ -1,8 +1,7 @@  export function isPlayerInNoDMZone(pos) { if (pos.x >= -540 && pos.x <= -531 - && pos.y >= -2151 && pos.y <= -2139 - && pos.z >= 0 && pos.z <= 30) { + && pos.y >= -2151 && pos.y <= -2139) { return true; } return false; @@ -11,6 +10,7 @@ export function isPlayerInNoDMZone(pos) { export default function positionHandler() { mp.events.add("checkPosition", (targetEntity) => { + if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { mp.gui.chat.push("Kein DM in NODM!"); } From 8f9710688a18b56fd9ddbfedf8c049ae7236ebba Mon Sep 17 00:00:00 2001 From: kookroach Date: Wed, 21 Apr 2021 22:58:06 +0200 Subject: [PATCH 026/138] Fix BusDriver Problem needs testing --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 181b2436..b94308d6 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -440,7 +440,6 @@ namespace ReallifeGamemode.Server.Job else if (type == PROFESSIONAL) BusJobEvents.payWage(player, WAGE_PROFESSIOAL); - NAPI.Task.Run(() => { if (type == BEGINNER) @@ -451,6 +450,9 @@ namespace ReallifeGamemode.Server.Job playerRoutePair3.Remove(player.Name); playerRouteCurrent.Remove(player.Name); + if (!GetPlayerInJob().Contains(player)) + return; + BusDriverJob job = JobManager.GetJob(); StartBusRoute(player, type); }, delayTime: 10000); @@ -464,7 +466,6 @@ namespace ReallifeGamemode.Server.Job NAPI.ClientEvent.TriggerClientEventForAll("SERVER:setIndicatorStatus", veh.Handle.Value, data.Left, data.Right); } - public void BusCheckpoint(Player player) { if (!player.IsInVehicle || player.VehicleSeat != 0) return; From 9459cd9ed3a1e60cb6614d44a4ed5604c96164f6 Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 23:14:14 +0200 Subject: [PATCH 027/138] Revert "nodmzone, COMMIT NUR ZUM TESTEN" This reverts commit 3edd6b5560e87700c258f33ff205f347e09fd758 --- ReallifeGamemode.Client/Gui/infobox.ts | 16 -------------- ReallifeGamemode.Client/Player/position.ts | 22 ------------------- ReallifeGamemode.Client/Player/reportmenu.ts | 1 + ReallifeGamemode.Client/index.ts | 3 --- ReallifeGamemode.Client/util/weapondamage.ts | 6 ----- .../Commands/UserCommands.cs | 7 ------ ReallifeGamemode.Server/Events/PlayerEvent.cs | 5 ----- 7 files changed, 1 insertion(+), 59 deletions(-) delete mode 100644 ReallifeGamemode.Client/Player/position.ts diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index 87bbf472..5e53bb15 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -16,7 +16,6 @@ export default function (globalData: IGlobalData): void { var adutyMode = false; var adminUnshow = false; var adminTSupport = false; - var noDmZone = false; var dutyMode = false; let jailTime = 0; let att_score = 0; @@ -85,10 +84,6 @@ export default function (globalData: IGlobalData): void { blackScreenMode = toggle; }); - mp.events.add("toggleNoDmZone", (toggle) => { - noDmZone = toggle; - }); - mp.events.add("jailTime", (time) => { jailTime = JSON.parse(time); }); @@ -350,17 +345,6 @@ export default function (globalData: IGlobalData): void { }) } - if (noDmZone) { - mp.game.graphics.drawText("~r~NoDM Zone", [0.907, 0.741], - { - font: 4, - color: [255, 255, 255, 255], - scale: [0.8, 0.8], - outline: true, - centre: false - }) - } - if (countdown > 0) { var now = Date.now(); var diff = Math.trunc((now - cdTimestamp) / 1000); diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts deleted file mode 100644 index f6830796..00000000 --- a/ReallifeGamemode.Client/Player/position.ts +++ /dev/null @@ -1,22 +0,0 @@ - -export function isPlayerInNoDMZone(pos) { - if (pos.x >= -540 && pos.x <= -531 - && pos.y >= -2151 && pos.y <= -2139) { - return true; - } - return false; -} - -export default function positionHandler() { - - mp.events.add("checkPosition", (targetEntity) => { - - if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { - mp.gui.chat.push("Kein DM in NODM!"); - } - }); - - setInterval(() => { - mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); - }, 200); -} \ No newline at end of file diff --git a/ReallifeGamemode.Client/Player/reportmenu.ts b/ReallifeGamemode.Client/Player/reportmenu.ts index 8e47ac8d..bee77944 100644 --- a/ReallifeGamemode.Client/Player/reportmenu.ts +++ b/ReallifeGamemode.Client/Player/reportmenu.ts @@ -39,6 +39,7 @@ export default function reportList(globalData: IGlobalData) { //Weapon Menu + mp.events.add('showReportMenu', (userTickets, TicketsArr) => { if (!globalData.InMenu) { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 71a5b13b..abcbd11e 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -186,9 +186,6 @@ ped(); import reportList from './Player/reportmenu'; reportList(globalData); -import positionHandler from './Player/position'; -positionHandler(); - import checkpointHandle from './util/checkpoint'; checkpointHandle(globalData); diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 830722ad..1907a03a 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -7,12 +7,6 @@ player.setSuffersCriticalHits(false); }); - mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - - - mp.events.call('checkPosition', targetEntity); - }); - mp.events.add("render", () => { if (blockInput) { mp.game.controls.disableControlAction(32, 142, true); diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 479b939a..15d159a7 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -17,13 +17,6 @@ namespace ReallifeGamemode.Server.Commands { internal class UserCommands : Script { - [Command("nodm", "~m~nodm")] - public void CmdUserNoDm(Player player) - { - ChatService.Broadcast("ss"); - player.TriggerEvent("toggleNoDmZone", true); - } - [Command("look", "~m~look")] public void CmdUserLook(Player player) { diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index c504344d..2aba02d8 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -9,11 +9,6 @@ namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { - [ServerEvent(Event.PlayerDamage)] - public void OnPlayerDamage(Player player, float healthLoss, float armorLoss) { - ChatService.Broadcast("dmg"); - } - [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From 9208c4a4b49ab138aa5773cf1151322980c0b13c Mon Sep 17 00:00:00 2001 From: hydrant Date: Wed, 21 Apr 2021 23:34:07 +0200 Subject: [PATCH 028/138] Bus: Fix route starten --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index adf56848..492823d6 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -24,6 +24,7 @@ export default function busRouteList(globalData: IGlobalData) { var skillSelect; var routeSelect; var skill = 0; + var routeSelected = false; mp.events.add('SERVER:StartBusJob', (jobskill) => { skill = jobskill; @@ -59,6 +60,7 @@ export default function busRouteList(globalData: IGlobalData) { else { mp.events.callRemote("CLIENT:StartBusRoute", routeSelect); + routeSelected = true; routeMenu.Close(); globalData.InMenu = false; } @@ -66,14 +68,17 @@ export default function busRouteList(globalData: IGlobalData) { } else if (item.Text === "Abbrechen") { mp.events.callRemote("CLIENT:Job_StopJob"); - routeMenu.Close(); globalData.InMenu = false; } }); routeMenu.MenuClose.on(() => { - mp.events.callRemote("CLIENT:Job_StopJob"); + if (!routeSelected) { + mp.events.callRemote("CLIENT:Job_StopJob"); + } + routeSelected = false; + globalData.InMenu = false; }); } From 57e7455abf0ae7a18c6ee90c6f2cbccc39a21043 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 00:00:47 +0200 Subject: [PATCH 029/138] fix route 3 bus skill 3 --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 76f3ee56..3eca5782 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -229,15 +229,15 @@ namespace ReallifeGamemode.Server.Job new List() { //new Vector3(-601.733, -2049.285, 6.090), - new Vector3(-566.381, -2209.74, 5.88064), - new Vector3(769.912, -1983.54, 29.2573), - new Vector3(1021.58, -725.525, 57.6664), - new Vector3(244.279, -860.634, 29.5133), - new Vector3(-506.147, -282.95, 35.4909), - new Vector3(-1205.3, -130.106, 40.9405), - new Vector3(-1396.98, -773.447, 20.68), - new Vector3(-666.861, -1241.26, 10.5494), new Vector3(-599.541, -2054.42, 6.0372), + new Vector3(-666.861, -1241.26, 10.5494), + new Vector3(-1396.98, -773.447, 20.68), + new Vector3(-1205.3, -130.106, 40.9405), + new Vector3(-506.147, -282.95, 35.4909), + new Vector3(244.279, -860.634, 29.5133), + new Vector3(1021.58, -725.525, 57.6664), + new Vector3(769.912, -1983.54, 29.2573), + new Vector3(-566.381, -2209.74, 5.88064), } }, }; From 3546ba7f991b761a9eb81d0c5c323c8886dff018 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 01:15:38 +0200 Subject: [PATCH 030/138] vlt fix kfz id bug?? --- .../Commands/AdminCommands.cs | 4 +--- .../Extensions/ServerVehicleExtensions.cs | 18 ++++++++++++++++-- .../Managers/BusinessManager.cs | 12 ++++++------ .../Managers/InteractionManager.cs | 8 ++++---- .../Managers/LoadManager.cs | 8 +++++--- .../Managers/VehicleManager.cs | 19 ++++++++++--------- 6 files changed, 42 insertions(+), 27 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 4a29423d..858e40f7 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1300,13 +1300,11 @@ namespace ReallifeGamemode.Server.Commands if (serverVehicle == null) { VehicleManager.DeleteVehicle(v); - v.Trailer?.Delete(); + VehicleManager.DeleteVehicle(v.Trailer); continue; } Vehicle newVeh = serverVehicle.Spawn(v); - newVeh.Repair(); - newVeh.Rotation = new Vector3(0, 0, serverVehicle.Heading); respawnedVehicleCount++; } diff --git a/ReallifeGamemode.Server/Extensions/ServerVehicleExtensions.cs b/ReallifeGamemode.Server/Extensions/ServerVehicleExtensions.cs index 5e4c3c38..170b9681 100644 --- a/ReallifeGamemode.Server/Extensions/ServerVehicleExtensions.cs +++ b/ReallifeGamemode.Server/Extensions/ServerVehicleExtensions.cs @@ -15,19 +15,32 @@ namespace ReallifeGamemode.Server.Extensions public static Vehicle GetVehicle(this ServerVehicle veh) => VehicleManager.GetVehicleFromServerVehicle(veh); - public static Vehicle Spawn(this ServerVehicle veh, Vehicle currentVeh = null) + public static Vehicle Spawn(this ServerVehicle veh, Vehicle currentVeh) { - if (currentVeh != null) VehicleManager.DeleteVehicle(currentVeh); + if (currentVeh == null) + { + currentVeh = VehicleManager.GetVehicleFromServerVehicle(veh); + } + + if(currentVeh != null) + { + VehicleManager.DeleteVehicle(currentVeh); + } + Vector3 position = veh.Position; uint model = (uint)veh.Model; float heading = veh.Heading; int c1 = veh.PrimaryColor; int c2 = veh.SecondaryColor; + Vehicle newVeh = NAPI.Vehicle.CreateVehicle(model, position, heading, c1, c2, "", 255, false, false); + veh.Livery = veh.Livery; VehicleStreaming.SetEngineState(newVeh, false); VehicleStreaming.SetLockStatus(newVeh, veh.Locked); + VehicleManager.AddVehicle(veh, newVeh); + newVeh.Rotation = new Vector3(0, 0, heading); newVeh.SetSharedData("drivenDistance", veh.DistanceDriven); @@ -71,6 +84,7 @@ namespace ReallifeGamemode.Server.Extensions { numberplate = "NV" + numberplate; } + NAPI.Vehicle.SetVehicleNumberPlate(newVeh, numberplate); veh.NumberPlate = numberplate; diff --git a/ReallifeGamemode.Server/Managers/BusinessManager.cs b/ReallifeGamemode.Server/Managers/BusinessManager.cs index 77ad2d06..e55a250e 100644 --- a/ReallifeGamemode.Server/Managers/BusinessManager.cs +++ b/ReallifeGamemode.Server/Managers/BusinessManager.cs @@ -168,13 +168,13 @@ namespace ReallifeGamemode.Server.Managers player.TriggerEvent("SERVER:Util_setWaypoint", spawnPos.X, spawnPos.Y); - User u = player.GetUser(dbContext); + User user = player.GetUser(dbContext); ServerVehicle newVeh = null; if (target == "Spieler") { - TransactionResult result = BankManager.TransferMoney(u, business, price, "Auto gekauft", dbContext); + TransactionResult result = BankManager.TransferMoney(user, business, price, "Auto gekauft", dbContext); if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY) { player.SendNotification("~r~Du hast nicht genug Geld: " + price.ToMoneyString()); @@ -190,7 +190,7 @@ namespace ReallifeGamemode.Server.Managers PositionY = spawnPos.Y, PositionZ = spawnPos.Z, Locked = false, - UserId = player.GetUser().Id, + UserId = user.Id, Model = shopVehicle.Model, PrimaryColor = 111, SecondaryColor = 111, @@ -200,7 +200,7 @@ namespace ReallifeGamemode.Server.Managers } else if (target == "Fraktion") { - var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == u.FactionId).First(); + var faction = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == user.FactionId).First(); TransactionResult result = BankManager.TransferMoney(faction, business, (int)(price * FACTION_CAR_MULTIPLIER), "Auto gekauft", dbContext); if (result == TransactionResult.SENDER_NOT_ENOUGH_MONEY) { @@ -216,7 +216,7 @@ namespace ReallifeGamemode.Server.Managers PositionY = spawnPos.Y, PositionZ = spawnPos.Z, Locked = false, - Owners = JsonConvert.SerializeObject(new int[] { player.GetUser(dbContext).FactionId.Value }), + Owners = JsonConvert.SerializeObject(new int[] { user.FactionId.Value }), Model = shopVehicle.Model, PrimaryColor = 111, SecondaryColor = 111, @@ -243,7 +243,7 @@ namespace ReallifeGamemode.Server.Managers dbContext.ServerVehicles.Add(newVeh); dbContext.SaveChanges(); - newVeh.Spawn(); + newVeh.Spawn(null); } } diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 1cc4b1a4..75ac2599 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -491,10 +491,10 @@ namespace ReallifeGamemode.Server.Managers ChatService.SendMessage(player, $"~b~[INFO]~s~ Du hast durch den Autoverkauf ~g~{backPrice.ToMoneyString()}~s~ erhalten."); + VehicleManager.DeleteVehicle(veh); + dbContext.UserVehicles.Remove(userVehicle); dbContext.SaveChanges(); - - veh?.Delete(); } [RemoteEvent("CLIENT:InteractionMenu_FactionVehicleInteraction")] @@ -552,10 +552,10 @@ namespace ReallifeGamemode.Server.Managers ChatService.SendMessage(player, $"~b~[INFO]~s~ Die Fraktionskasse ~g~{backPrice.ToMoneyString()}~s~ erhalten."); + VehicleManager.DeleteVehicle(veh); + dbContext.FactionVehicles.Remove(factionVehicle); dbContext.SaveChanges(); - - veh?.Delete(); } } diff --git a/ReallifeGamemode.Server/Managers/LoadManager.cs b/ReallifeGamemode.Server/Managers/LoadManager.cs index a7ab3190..d898e5e4 100644 --- a/ReallifeGamemode.Server/Managers/LoadManager.cs +++ b/ReallifeGamemode.Server/Managers/LoadManager.cs @@ -29,10 +29,12 @@ namespace ReallifeGamemode.Server.Managers foreach (ServerVehicle veh in dbContext.ServerVehicles) { - if (!veh.Active) continue; + if (!veh.Active) + { + continue; + } - Vehicle current = veh.Spawn(); - TuningManager.ApplyTuningToServerVehicle(veh); + veh.Spawn(null); } } } diff --git a/ReallifeGamemode.Server/Managers/VehicleManager.cs b/ReallifeGamemode.Server/Managers/VehicleManager.cs index e4f05cae..923a6112 100644 --- a/ReallifeGamemode.Server/Managers/VehicleManager.cs +++ b/ReallifeGamemode.Server/Managers/VehicleManager.cs @@ -1,8 +1,10 @@ using GTANetworkAPI; +using Microsoft.Extensions.Logging; using Newtonsoft.Json; using ReallifeGamemode.Database.Entities; using ReallifeGamemode.Database.Models; using ReallifeGamemode.Server.Extensions; +using ReallifeGamemode.Server.Log; using ReallifeGamemode.Server.Util; using System; using System.Collections.Generic; @@ -777,6 +779,8 @@ namespace ReallifeGamemode.Server.Managers private static readonly Dictionary lastPositions = new Dictionary(); private static DateTime lastSave = DateTime.UtcNow; + private static ILogger logger = LogManager.GetLogger(); + public static void CheckEnabledMods() { foreach (var name in _enabledMods) @@ -851,11 +855,13 @@ namespace ReallifeGamemode.Server.Managers { if (_serverVehicles.ContainsKey(serverVehicle.Id)) { - return; + logger.LogCritical("Server Vehicle {Id} already has a spawned vehicle", serverVehicle.Id); + _serverVehicles[serverVehicle.Id].Entity().Delete(); } if (_serverVehicles.ContainsValue(vehicle.Handle)) { + logger.LogCritical("Vehicle handle {Handle} already belongs"); return; } @@ -870,7 +876,7 @@ namespace ReallifeGamemode.Server.Managers _serverVehicles.Remove(sVeh.Id); } - veh.Delete(); + veh?.Delete(); } public static Vehicle GetVehicleFromHandle(NetHandle handle) @@ -941,20 +947,15 @@ namespace ReallifeGamemode.Server.Managers public static void VehicleManagerVehicleDeath(Vehicle vehicle) { ServerVehicle serverVehicle = GetServerVehicleFromVehicle(vehicle); - NAPI.Util.ConsoleOutput("VehicleDeat: Debug 1"); if (serverVehicle == null) { - NAPI.Util.ConsoleOutput("VehicleDeath: Debug 2"); vehicle.Delete(); return; } InventoryManager.RemoveAllItemsfromVehicleInventory(vehicle); - - NAPI.Util.ConsoleOutput("VehicleDeath: Debug 3"); - Vehicle newVeh = serverVehicle.Spawn(vehicle); - newVeh.Repair(); - newVeh.Rotation = new Vector3(0, 0, serverVehicle.Heading); + + serverVehicle.Spawn(vehicle); } [RemoteEvent("CLIENT:setMarkerBehindVehicle")] From b608ead71de562d0fa9c6479d2bd6076399d63d2 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 01:39:20 +0200 Subject: [PATCH 031/138] FIB/LSPD: Fix Ticketpreis Verteilung --- .../Managers/InteractionManager.cs | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 75ac2599..6bff91b8 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -475,7 +475,7 @@ namespace ReallifeGamemode.Server.Managers var backPrice = (int)(vehPrice * 0.4); 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"); + 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"); } } @@ -632,7 +632,7 @@ namespace ReallifeGamemode.Server.Managers using var dbContext = new DatabaseContext(); User targetUser = target.GetUser(dbContext); - if(targetUser == null) + if (targetUser == null) { ChatService.PlayerNotFound(player); return; @@ -703,16 +703,22 @@ namespace ReallifeGamemode.Server.Managers player.SendNotification($"~y~{targetname} ~g~hat das Ticket über ~b~{ticket_amount}$ ~g~angenommen und bezahlt.", true); using (var dbContext = new DatabaseContext()) { - target.GetUser(dbContext).BankAccount.Balance -= ticket_amount; - if (player.GetUser().FactionId == 1) + User user = player.GetUser(dbContext); + User targetUser = target.GetUser(dbContext); + targetUser.BankAccount.Balance -= ticket_amount; + + FactionBankAccount lspdBankAccount = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount; + FactionBankAccount fibBankAccount = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount; + + if (user.FactionId == 1) { - dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount.Balance += (int)(ticket_amount / 100 * 70); - dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount.Balance += (int)(ticket_amount / 100 * 30); + lspdBankAccount.Balance += (int)(ticket_amount / 100 * 60); + fibBankAccount.Balance += (int)(ticket_amount / 100 * 40); } - if (player.GetUser().FactionId == 1) + else if (user.FactionId == 3) { - dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 3).First().BankAccount.Balance += (int)(ticket_amount / 100 * 70); - dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1).First().BankAccount.Balance += (int)(ticket_amount / 100 * 30); + fibBankAccount.Balance += (int)(ticket_amount / 100 * 60); + lspdBankAccount.Balance += (int)(ticket_amount / 100 * 40); } dbContext.SaveChanges(); } From b06d429c73e00183c484da34354ef65bf8e5d6a1 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 11:19:48 +0200 Subject: [PATCH 032/138] LSPD/FIB: Fix einsperren --- ReallifeGamemode.Server/Events/Death.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index c2eba6d0..460be668 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -142,7 +142,7 @@ namespace ReallifeGamemode.Server.Events bool copNearby = NAPI.Pools.GetAllPlayers().Any(u => u.IsDuty() && u.IsAlive() && u.Position.DistanceToSquared(player.Position) <= 100 * 100); - if (user.Wanteds > 0 && player.HasData("GotInsideOfTurf") && !player.GetData("GotInsideOfTurf")) + if (user.Wanteds > 0 && (!player.HasData("GotInsideOfTurf") || !player.GetData("GotInsideOfTurf"))) { if (copNearby) { From c47af1f596906a649ae33897b6e912b8c3200d17 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 13:09:28 +0200 Subject: [PATCH 033/138] Screenshot: Name der Datei angepasst --- ReallifeGamemode.Client/Player/keys.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/keys.ts b/ReallifeGamemode.Client/Player/keys.ts index 9c344a16..92ffe3e0 100644 --- a/ReallifeGamemode.Client/Player/keys.ts +++ b/ReallifeGamemode.Client/Player/keys.ts @@ -138,7 +138,7 @@ export default function keys(globalData: IGlobalData) { }); mp.keys.bind(0x7A, false, () => { - mp.gui.takeScreenshot(new Date().toLocaleDateString(), 1, 100, 80); + mp.gui.takeScreenshot(new Date().toLocaleTimeString() + ".png", 1, 100, 80); }); KeyBinder.bind("ctrl+h", () => { From a26a7991f7eae8149698ff87e5dea4e98b1c00c9 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 13:10:27 +0200 Subject: [PATCH 034/138] =?UTF-8?q?Datenbank:=20PowerShell-Skripte=20f?= =?UTF-8?q?=C3=BCr=20Datenbank-Upgrade=20und=20neue=20Migration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Database/Add-Migration.ps1 | 10 ++++++++++ ReallifeGamemode.Database/Update-Database.ps1 | 4 ++++ ReallifeGamemode.Server/ReallifeGamemode.Server.csproj | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 ReallifeGamemode.Database/Add-Migration.ps1 create mode 100644 ReallifeGamemode.Database/Update-Database.ps1 diff --git a/ReallifeGamemode.Database/Add-Migration.ps1 b/ReallifeGamemode.Database/Add-Migration.ps1 new file mode 100644 index 00000000..43d4d65d --- /dev/null +++ b/ReallifeGamemode.Database/Add-Migration.ps1 @@ -0,0 +1,10 @@ +Param +( + [Parameter(Mandatory=$true)] + [string]$MigrationName +) + +$root = $PSScriptRoot + +dotnet tool update dotnet-ef --global +dotnet ef migrations add $MigrationName --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" \ No newline at end of file diff --git a/ReallifeGamemode.Database/Update-Database.ps1 b/ReallifeGamemode.Database/Update-Database.ps1 new file mode 100644 index 00000000..0f57198a --- /dev/null +++ b/ReallifeGamemode.Database/Update-Database.ps1 @@ -0,0 +1,4 @@ +$root = $PSScriptRoot + +dotnet tool update dotnet-ef --global +dotnet ef database update --project "$root\ReallifeGamemode.Database.csproj" --startup-project "$root\..\ReallifeGamemode.Server\ReallifeGamemode.Server.csproj" --configuration "Database" \ No newline at end of file diff --git a/ReallifeGamemode.Server/ReallifeGamemode.Server.csproj b/ReallifeGamemode.Server/ReallifeGamemode.Server.csproj index ff6191e1..80049bd1 100644 --- a/ReallifeGamemode.Server/ReallifeGamemode.Server.csproj +++ b/ReallifeGamemode.Server/ReallifeGamemode.Server.csproj @@ -51,7 +51,7 @@ ..\Import\Newtonsoft.Json.dll - + \ No newline at end of file From be5dc8c8cab05cb495162b096e56594565dc837a Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 13:11:47 +0200 Subject: [PATCH 035/138] [-] "CmdAnim" -> "CmdUserHup" --- ReallifeGamemode.Server/Commands/UserCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 15d159a7..913122b0 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -133,7 +133,7 @@ namespace ReallifeGamemode.Server.Commands } [Command("hup")] - public void CmdAnim(Player player) + public void CmdUserHup(Player player) { player.ToggleSurrender(); } From e669425dd8680ce839494ff0e6e72341bcf03e0e Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 13:52:05 +0200 Subject: [PATCH 036/138] =?UTF-8?q?Handsup:=20Nur=20noch=20m=C3=B6glich,?= =?UTF-8?q?=20wenn=20man=20still=20steht?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Player/handsup.ts | 13 +++++++++++++ ReallifeGamemode.Client/index.ts | 3 +++ ReallifeGamemode.Server/Commands/UserCommands.cs | 2 +- ReallifeGamemode.Server/Events/Key.cs | 2 +- ReallifeGamemode.Server/Events/PlayerEvent.cs | 6 ++++++ .../Extensions/ClientExtension.cs | 11 ++++++++--- 6 files changed, 32 insertions(+), 5 deletions(-) create mode 100644 ReallifeGamemode.Client/Player/handsup.ts diff --git a/ReallifeGamemode.Client/Player/handsup.ts b/ReallifeGamemode.Client/Player/handsup.ts new file mode 100644 index 00000000..ca29ae5f --- /dev/null +++ b/ReallifeGamemode.Client/Player/handsup.ts @@ -0,0 +1,13 @@ +export default function handsup() { + mp.events.add("SERVER:Handsup_CheckIfPlayerCanHandsup", () => { + var player = mp.players.local; + + var isStopped = player.isStopped(); + + mp.gui.chat.push("isStopped = " + isStopped); + + if (isStopped) { + mp.events.callRemote("CLIENT:Handsup_TogglePlayerHup"); + } + }); +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index abcbd11e..1632f768 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -265,6 +265,9 @@ antiAfk(globalData); import ammunation from './Interaction/ammunation/ammunation'; ammunation(globalData); +import handsup from './Player/handsup'; +handsup(); + require('./Gui/policedepartment'); require('./Gui/helptext'); require('./admin/spectate'); diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 913122b0..7b4bc1c7 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -135,7 +135,7 @@ namespace ReallifeGamemode.Server.Commands [Command("hup")] public void CmdUserHup(Player player) { - player.ToggleSurrender(); + player.CheckToggleSurrender(); } [Command("event", "~m~Benutzung: ~s~/event [Nachricht]", GreedyArg = true)] diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 92a7af80..ed27acef 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -904,7 +904,7 @@ namespace ReallifeGamemode.Server.Events [RemoteEvent("keyPress:ControllH")] public void KeyPressControllH(Player player) { - player.ToggleSurrender(); + player.CheckToggleSurrender(); } #endregion User Key diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index 2aba02d8..cdce4ffe 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -24,5 +24,11 @@ namespace ReallifeGamemode.Server.Events player.SendNotification("Du wurdest ~b~AFK~s~ gesetzt", true); } } + + [RemoteEvent("CLIENT:Handsup_TogglePlayerHup")] + public void PlayerToggleHandsupEvent(Player player) + { + player.ToggleSurrender(); + } } } diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index 3a665dd0..25f9c0a4 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -138,7 +138,7 @@ namespace ReallifeGamemode.Server.Extensions public static bool IsAfk(this Player player) { - if(!player.HasSharedData("isAfk")) + if (!player.HasSharedData("isAfk")) { return false; } @@ -339,7 +339,7 @@ namespace ReallifeGamemode.Server.Extensions int nameTagColor = 0; Player player = user.Player; - if(player == null || !player.IsLoggedIn()) + if (player == null || !player.IsLoggedIn()) { return; } @@ -347,7 +347,7 @@ namespace ReallifeGamemode.Server.Extensions bool duty = user.GetData("duty"); bool adminUnshow = user.GetData("adminUnshow"); - if(adminUnshow) + if (adminUnshow) { blipColor = -1; nameTagColor = -3; @@ -437,6 +437,11 @@ namespace ReallifeGamemode.Server.Extensions } } + public static void CheckToggleSurrender(this Player player) + { + player.TriggerEvent("SERVER:Handsup_CheckIfPlayerCanHandsup"); + } + public static void ToggleSurrender(this Player player) { if (player.HasAnimation("hup")) From a830b3271109cf6a53feb9a1aafc3cab8c5d1251 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 13:59:38 +0200 Subject: [PATCH 037/138] Admin: /tog all @AIRMAKE --- .../Commands/AdminCommands.cs | 32 +++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index 858e40f7..bc191b5c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -178,8 +178,8 @@ namespace ReallifeGamemode.Server.Commands #region Support - [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~, ~g~Connect~s~]", GreedyArg = true)] - public void CmdTog(Player player, string typ, string option1 = null, string option2 = null) + [Command("tog", "~m~Benutzung: ~s~/tog [Typ = ~g~IP~s~, ~g~deathlogs~s~, ~g~LC~s~, ~g~Connect~s~, ~g~D~s~, ~g~GA~s~, ~g~All~s~]", GreedyArg = true)] + public void CmdAdminTog(Player player, string typ, string option1 = null, string option2 = null) { if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) { @@ -264,6 +264,34 @@ namespace ReallifeGamemode.Server.Commands player.SendNotification("~g~[Info]~w~ GA-Chat wird nun angezeigt."); } break; + case "all": + if(!player.HasData("togall")) + { + player.SetData("togip", true); + player.SetData("togdeath", true); + player.SetData("togdeathlogs", true); + player.SetData("toglc", true); + player.SetData("togconnect", true); + player.SetData("togd", true); + player.SetData("togga", true); + player.SetData("togall", true); + + player.SendNotification("~g~[Info]~s~ Alle Logs wurden eingeschaltet"); + } + else + { + player.ResetData("togip"); + player.ResetData("togdeath"); + player.ResetData("togdeathlogs"); + player.ResetData("toglc"); + player.ResetData("togconnect"); + player.ResetData("togd"); + player.ResetData("togga"); + player.ResetData("togall"); + + player.SendNotification("~g~[Info]~s~ Alle Logs wurden ausgeschaltet"); + } + break; } } From 2483e0e726e9a62590bd2b5e799e25205a9b68cb Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 14:06:30 +0200 Subject: [PATCH 038/138] /tog lc fix --- ReallifeGamemode.Server/Commands/FactionCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index d9dd2668..580353ca 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -154,7 +154,7 @@ namespace ReallifeGamemode.Server.Commands User user = player.GetUser(dbContext); Faction f = user?.Faction; - if ((f == null || !f.StateOwned) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("todg"))) + if ((f == null || !f.StateOwned) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("togd"))) { ChatService.NotAuthorized(player); return; @@ -280,7 +280,7 @@ namespace ReallifeGamemode.Server.Commands using var dbContext = new DatabaseContext(); User user = player.GetUser(dbContext); - if ((user?.FactionId == null || user.FactionLeader == false) && !user.IsAdmin(AdminLevel.ADMIN)) + if ((user?.FactionId == null || user.FactionLeader == false) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("toglc")) { ChatService.NotAuthorized(player); return; From a71fd4d55de1eaac4ff5d702db269823fe7cc9fe Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 14:12:09 +0200 Subject: [PATCH 039/138] fix lc --- ReallifeGamemode.Server/Commands/FactionCommands.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 580353ca..bf5b46ae 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -280,7 +280,7 @@ namespace ReallifeGamemode.Server.Commands using var dbContext = new DatabaseContext(); User user = player.GetUser(dbContext); - if ((user?.FactionId == null || user.FactionLeader == false) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("toglc")) + if ((user?.FactionId == null || user.FactionLeader == false) && (!user.IsAdmin(AdminLevel.ADMIN) || !player.HasData("toglc"))) { ChatService.NotAuthorized(player); return; From b1337881a88454e8f3bed8394c6c7caf04fa6209 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 14:36:48 +0200 Subject: [PATCH 040/138] JS: Alle Dateien mit UTF8-BOM abgespeichert --- .editorconfig | 2 ++ ReallifeGamemode.Client/Business/cardealer.ts | 4 ++-- ReallifeGamemode.Client/CharCreator/data.ts | 2 +- ReallifeGamemode.Client/CharCreator/main.ts | 2 +- ReallifeGamemode.Client/Gui/Inventory/inventory.ts | 2 +- ReallifeGamemode.Client/Gui/Inventory/inventory_old.ts | 2 +- ReallifeGamemode.Client/Gui/playerlist.ts | 2 +- ReallifeGamemode.Client/Gui/taximeter.ts | 2 +- ReallifeGamemode.Client/Speedometer/index.ts | 2 +- ReallifeGamemode.Client/Tuning/colors.ts | 4 ++-- ReallifeGamemode.Client/Voice/main.ts | 2 +- ReallifeGamemode.Client/coloredhlights/index.ts | 2 +- ReallifeGamemode.Client/core/rage-mp/game.ts | 2 +- ReallifeGamemode.Client/core/rage-mp/ui.ts | 2 +- ReallifeGamemode.Client/index.ts | 2 +- ReallifeGamemode.Client/vehiclesync/smoothtrottle.ts | 2 +- ReallifeGamemode.Client/vehiclesync/vehiclesync.ts | 2 +- 17 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.editorconfig b/.editorconfig index b42c8ea4..0fadfff1 100644 --- a/.editorconfig +++ b/.editorconfig @@ -122,3 +122,5 @@ csharp_preserve_single_line_blocks = true [*.vb] # Modifier preferences visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async:suggestion +[*.js] +encoding=utf-8-bom \ No newline at end of file diff --git a/ReallifeGamemode.Client/Business/cardealer.ts b/ReallifeGamemode.Client/Business/cardealer.ts index b6667a31..ac1444c5 100644 --- a/ReallifeGamemode.Client/Business/cardealer.ts +++ b/ReallifeGamemode.Client/Business/cardealer.ts @@ -1,4 +1,4 @@ -import * as NativeUI from '../libs/NativeUI'; +import * as NativeUI from '../libs/NativeUI'; const Menu = NativeUI.Menu; const UIMenuItem = NativeUI.UIMenuItem; const UIMenuListItem = NativeUI.UIMenuListItem; @@ -62,7 +62,7 @@ export default function carDealer(globalData: IGlobalData) { shopMenu.AddItem(priceItem); var targetsCollection = new ItemsCollection(availableOptions); - var targetItem = new UIMenuListItem("Kaufen für", "Wähle den Besitzer aus", targetsCollection); + var targetItem = new UIMenuListItem("Kaufen für", "Wähle den Besitzer aus", targetsCollection); shopMenu.AddItem(targetItem); shopMenu.ListChange.on((item, index) => { diff --git a/ReallifeGamemode.Client/CharCreator/data.ts b/ReallifeGamemode.Client/CharCreator/data.ts index bb827216..83801bab 100644 --- a/ReallifeGamemode.Client/CharCreator/data.ts +++ b/ReallifeGamemode.Client/CharCreator/data.ts @@ -1,4 +1,4 @@ -const fathers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 42, 43, 44]; +const fathers = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 42, 43, 44]; const mothers = [21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 45]; const fatherNames = ["Benjamin", "Daniel", "Joshua", "Noah", "Andrew", "Juan", "Alex", "Isaac", "Evan", "Ethan", "Vincent", "Angel", "Diego", "Adrian", "Gabriel", "Michael", "Santiago", "Kevin", "Louis", "Samuel", "Anthony", "Claude", "Niko", "John"]; const motherNames = ["Hannah", "Aubrey", "Jasmine", "Gisele", "Amelia", "Isabella", "Zoe", "Ava", "Camila", "Violet", "Sophia", "Evelyn", "Nicole", "Ashley", "Gracie", "Brianna", "Natalie", "Olivia", "Elizabeth", "Charlotte", "Emma", "Misty"]; diff --git a/ReallifeGamemode.Client/CharCreator/main.ts b/ReallifeGamemode.Client/CharCreator/main.ts index 1c79dc30..daee8540 100644 --- a/ReallifeGamemode.Client/CharCreator/main.ts +++ b/ReallifeGamemode.Client/CharCreator/main.ts @@ -1,4 +1,4 @@ -// shitcode will be better in the future +// shitcode will be better in the future // , \u00dc, \u00fc // , \u00c4, \u00e4 // , \u00d6, \u00f6 diff --git a/ReallifeGamemode.Client/Gui/Inventory/inventory.ts b/ReallifeGamemode.Client/Gui/Inventory/inventory.ts index afb9e735..22b3c8f2 100644 --- a/ReallifeGamemode.Client/Gui/Inventory/inventory.ts +++ b/ReallifeGamemode.Client/Gui/Inventory/inventory.ts @@ -1,4 +1,4 @@ -import InputHelper from '../../inputhelper'; +import InputHelper from '../../inputhelper'; export default function inventory(globalData: IGlobalData) { diff --git a/ReallifeGamemode.Client/Gui/Inventory/inventory_old.ts b/ReallifeGamemode.Client/Gui/Inventory/inventory_old.ts index 2f6deb02..97698e92 100644 --- a/ReallifeGamemode.Client/Gui/Inventory/inventory_old.ts +++ b/ReallifeGamemode.Client/Gui/Inventory/inventory_old.ts @@ -1,4 +1,4 @@ -import InputHelper from '../../inputhelper'; +import InputHelper from '../../inputhelper'; export default function inventory(globalData: IGlobalData) { var q; diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index 4fadec66..1d176cba 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 diff --git a/ReallifeGamemode.Client/Gui/taximeter.ts b/ReallifeGamemode.Client/Gui/taximeter.ts index fe934bef..b807a298 100644 --- a/ReallifeGamemode.Client/Gui/taximeter.ts +++ b/ReallifeGamemode.Client/Gui/taximeter.ts @@ -1,4 +1,4 @@ -import InputHelper from '../inputhelper'; +import InputHelper from '../inputhelper'; let browser: BrowserMp; let price: Number; diff --git a/ReallifeGamemode.Client/Speedometer/index.ts b/ReallifeGamemode.Client/Speedometer/index.ts index a3926f4a..d6bad213 100644 --- a/ReallifeGamemode.Client/Speedometer/index.ts +++ b/ReallifeGamemode.Client/Speedometer/index.ts @@ -1,4 +1,4 @@ -let player = mp.players.local; +let player = mp.players.local; export default function speedometer(globalData: IGlobalData) { var dictLoaded = false; diff --git a/ReallifeGamemode.Client/Tuning/colors.ts b/ReallifeGamemode.Client/Tuning/colors.ts index 4b8ccefc..2f5533d6 100644 --- a/ReallifeGamemode.Client/Tuning/colors.ts +++ b/ReallifeGamemode.Client/Tuning/colors.ts @@ -1,4 +1,4 @@ -const vehicleColors = { +const vehicleColors = { "Klassisch (Util)": { "Schwarz": 15, "Silber": 18, @@ -126,7 +126,7 @@ const vehicleColors = { "Lila": 148, "Dunkellila": 149, "W\u00fcstenbraun": 153, - "W\u00fcstenbräune": 154 + "W\u00fcstenbr�une": 154 }, "Spezial": { "Geb\u00fcrsteter Stahl": 117, diff --git a/ReallifeGamemode.Client/Voice/main.ts b/ReallifeGamemode.Client/Voice/main.ts index eccf7c9d..8405046e 100644 --- a/ReallifeGamemode.Client/Voice/main.ts +++ b/ReallifeGamemode.Client/Voice/main.ts @@ -1,4 +1,4 @@ -/** +/** * @overview Life of German Reallife - Voice Main main.ts * @author Zeuto * @copyright (c) 2008 - 2019 Life of German diff --git a/ReallifeGamemode.Client/coloredhlights/index.ts b/ReallifeGamemode.Client/coloredhlights/index.ts index bfafcab5..97f95dc1 100644 --- a/ReallifeGamemode.Client/coloredhlights/index.ts +++ b/ReallifeGamemode.Client/coloredhlights/index.ts @@ -1,4 +1,4 @@ -export default function coloredHeadLights() { +export default function coloredHeadLights() { function setHeadlightsColor(vehicle, color) { if (typeof color !== "number" || isNaN(color) || color < 0 || color === 255) { // Disable diff --git a/ReallifeGamemode.Client/core/rage-mp/game.ts b/ReallifeGamemode.Client/core/rage-mp/game.ts index 5094ba9f..3afd421f 100644 --- a/ReallifeGamemode.Client/core/rage-mp/game.ts +++ b/ReallifeGamemode.Client/core/rage-mp/game.ts @@ -1,4 +1,4 @@ -import { IGame, IUi, IEvents, IPlayerPool, IVehiclePool, IEntityAttachmentPool } from "../../game"; +import { IGame, IUi, IEvents, IPlayerPool, IVehiclePool, IEntityAttachmentPool } from "../../game"; import RageEvents from "./events"; import RageUi from "./ui"; import { RagePlayerPool, RageVehiclePool, RageEntityAttachmentPool } from "./entities"; diff --git a/ReallifeGamemode.Client/core/rage-mp/ui.ts b/ReallifeGamemode.Client/core/rage-mp/ui.ts index 369e620d..bfe6a788 100644 --- a/ReallifeGamemode.Client/core/rage-mp/ui.ts +++ b/ReallifeGamemode.Client/core/rage-mp/ui.ts @@ -1,4 +1,4 @@ -import { IUi, IBrowser } from "../../game"; +import { IUi, IBrowser } from "../../game"; import { Menu } from "../../libs/NativeUI/index"; import { GlobalData } from "../.."; diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 1632f768..64ab04de 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -1,4 +1,4 @@ -/** +/** * @overview Life of German Reallife - Login index.js * @author VegaZ, hydrant * @copyright (c) 2008 - 2018 Life of German diff --git a/ReallifeGamemode.Client/vehiclesync/smoothtrottle.ts b/ReallifeGamemode.Client/vehiclesync/smoothtrottle.ts index 884c1faa..9d5dc874 100644 --- a/ReallifeGamemode.Client/vehiclesync/smoothtrottle.ts +++ b/ReallifeGamemode.Client/vehiclesync/smoothtrottle.ts @@ -1,4 +1,4 @@ -//This script will make vehicles have smoother acceleration. +//This script will make vehicles have smoother acceleration. //To disable the script call an event and set "GlobalDisable" to true. //To disable individual sections, set "DisableAntiReverse" or "DisableSmoothThrottle" to true. diff --git a/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts b/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts index d30322da..461ea0fd 100644 --- a/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts +++ b/ReallifeGamemode.Client/vehiclesync/vehiclesync.ts @@ -1,4 +1,4 @@ -import game from '../index'; +import game from '../index'; import { IVehicle, EntityType, IEntity, VehicleSeat, DoorState } from '../game'; import { parseJson } from '../util'; import { VehicleData } from '../game'; From 1495cc0c87dd6d99131e890ef0152d68837c99bd Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 14:49:12 +0200 Subject: [PATCH 041/138] Wanted: Bei Einsperren 6$ pro Wanted je an PD/FIB Kasse --- ReallifeGamemode.Server/Events/Death.cs | 2 +- ReallifeGamemode.Server/Extensions/ClientExtension.cs | 9 ++++++++- ReallifeGamemode.Server/Wanted/Jail.cs | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 460be668..90e92c2e 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -146,7 +146,7 @@ namespace ReallifeGamemode.Server.Events { if (copNearby) { - user.SetJailTime(true); + user.SetJailTime(true, dbContext); Jail.Check_PutBehindBars(user); ChatService.HQMessage(user.Name + " wurde ins Gefängnis eingeliefert."); } diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index 25f9c0a4..18342f10 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -88,7 +88,7 @@ namespace ReallifeGamemode.Server.Extensions player.Armor = armor; } - public static void SetJailTime(this User user, bool killed) + public static void SetJailTime(this User user, bool killed, DatabaseContext dbContext) { if (user == null) { @@ -101,6 +101,13 @@ namespace ReallifeGamemode.Server.Extensions time *= 2; } + int factionMoney = user.Wanteds * 6; + var executiveFactions = dbContext.Factions.Where(f => f.Id == 1 || f.Id == 3); + foreach(var faction in executiveFactions) + { + faction.BankAccount.Balance += factionMoney; + } + user.Wanteds = 0; user.JailTime = time; } diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index bee57db4..745a12e1 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -94,7 +94,7 @@ namespace ReallifeGamemode.Server.Wanted { if (player.Position.DistanceTo(copPlayer.Position) < 5) { - user.SetJailTime(false); + user.SetJailTime(false, dbContext); user.SetBlipAndNametagColor(); user.AnnouncePlayerJailedIn(); dbContext.SaveChanges(); From 3930e005cc4a8531831b0f461d409223e317c4b4 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 14:52:43 +0200 Subject: [PATCH 042/138] Shopvehicles: Test floating --- ReallifeGamemode.Client/Business/cardealer.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReallifeGamemode.Client/Business/cardealer.ts b/ReallifeGamemode.Client/Business/cardealer.ts index ac1444c5..8462d4f4 100644 --- a/ReallifeGamemode.Client/Business/cardealer.ts +++ b/ReallifeGamemode.Client/Business/cardealer.ts @@ -38,6 +38,8 @@ export default function carDealer(globalData: IGlobalData) { label.text = text; entity.freezePosition(true); + entity.setOnGroundProperly(); + entity.setExplodesOnHighExplosionDamage(false); } From 4dc7ecd824a0f4e776e62db6788830886b6d313d Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 16:39:18 +0200 Subject: [PATCH 043/138] merge conflict --- ReallifeGamemode.Client/util/weapondamage.ts | 5 +++++ ReallifeGamemode.Server/Events/PlayerEvent.cs | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 1907a03a..013b0dd5 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -7,6 +7,11 @@ player.setSuffersCriticalHits(false); }); + mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + mp.events.call('checkPosition', targetEntity); + return true; + }); + mp.events.add("render", () => { if (blockInput) { mp.game.controls.disableControlAction(32, 142, true); diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index cdce4ffe..be41924c 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -9,6 +9,13 @@ namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { +<<<<<<< HEAD +======= + [ServerEvent(Event.PlayerDamage)] + public void OnPlayerDamage(Player player, float healthLoss, float armorLoss){ + } + +>>>>>>> 294e2537... NODMZONE ZUM TESTEN [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From dab527aa5eef482910f169ce73cf034279fb7118 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 16:44:32 +0200 Subject: [PATCH 044/138] fick die merge conflikte --- ReallifeGamemode.Server/Events/PlayerEvent.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/ReallifeGamemode.Server/Events/PlayerEvent.cs b/ReallifeGamemode.Server/Events/PlayerEvent.cs index be41924c..06ab2550 100644 --- a/ReallifeGamemode.Server/Events/PlayerEvent.cs +++ b/ReallifeGamemode.Server/Events/PlayerEvent.cs @@ -9,13 +9,10 @@ namespace ReallifeGamemode.Server.Events { internal class PlayerEvent : Script { -<<<<<<< HEAD -======= [ServerEvent(Event.PlayerDamage)] public void OnPlayerDamage(Player player, float healthLoss, float armorLoss){ } ->>>>>>> 294e2537... NODMZONE ZUM TESTEN [RemoteEvent("CLIENT:SET_InFrontOfPos")] public void SetFrontOfPos(Player player, Vector3 pos) { From 8c3778a729b2046c34372db0229466ed1b5c6026 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 16:49:03 +0200 Subject: [PATCH 045/138] hydrant (dumm)kopfentwickler --- ReallifeGamemode.Client/Gui/infobox.ts | 26 +++++++++++++++++----- ReallifeGamemode.Client/Player/position.ts | 22 ++++++++++++++++++ ReallifeGamemode.Client/index.ts | 6 ++--- 3 files changed, 46 insertions(+), 8 deletions(-) create mode 100644 ReallifeGamemode.Client/Player/position.ts diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index 5e53bb15..e3e26fff 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -1,8 +1,8 @@ /** - * @overview Life of German Reallife - Gui Infobox infobox.js - * @author VegaZ - * @copyright (c) 2008 - 2018 Life of German - */ +* @overview Life of German Reallife - Gui Infobox infobox.js +* @author VegaZ +* @copyright (c) 2008 - 2018 Life of German +*/ import moneyFormat from "../moneyformat"; @@ -16,6 +16,7 @@ export default function (globalData: IGlobalData): void { var adutyMode = false; var adminUnshow = false; var adminTSupport = false; + var noDmZone = false; var dutyMode = false; let jailTime = 0; let att_score = 0; @@ -84,6 +85,10 @@ export default function (globalData: IGlobalData): void { blackScreenMode = toggle; }); + mp.events.add("toggleNoDmZone", (toggle) => { + noDmZone = toggle; + }); + mp.events.add("jailTime", (time) => { jailTime = JSON.parse(time); }); @@ -345,6 +350,17 @@ export default function (globalData: IGlobalData): void { }) } + if (noDmZone) { + mp.game.graphics.drawText("~r~NoDM Zone", [0.907, 0.741], + { + font: 4, + color: [255, 255, 255, 255], + scale: [0.8, 0.8], + outline: true, + centre: false + }) + } + if (countdown > 0) { var now = Date.now(); var diff = Math.trunc((now - cdTimestamp) / 1000); @@ -367,4 +383,4 @@ export default function (globalData: IGlobalData): void { mp.game.graphics.drawRect(0, 0, 10000, 100000, 0, 0, 0, 255); } }); -} \ No newline at end of file +} diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts new file mode 100644 index 00000000..d6343ddb --- /dev/null +++ b/ReallifeGamemode.Client/Player/position.ts @@ -0,0 +1,22 @@ + +export function isPlayerInNoDMZone(pos) { + if (pos.x >= -540 && pos.x <= -531 + && pos.y >= -2151 && pos.y <= -2139) { + return true; + } + return false; +} + +export default function positionHandler() { + + mp.events.add("checkPosition", (targetEntity) => { + + if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { + mp.gui.chat.push("Kein DM in NODM!"); + } + }); + + setInterval(() => { + mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); + }, 200); +} diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 64ab04de..724e857f 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -186,6 +186,9 @@ ped(); import reportList from './Player/reportmenu'; reportList(globalData); +import positionHandler from './Player/position'; +positionHandler(); + import checkpointHandle from './util/checkpoint'; checkpointHandle(globalData); @@ -265,9 +268,6 @@ antiAfk(globalData); import ammunation from './Interaction/ammunation/ammunation'; ammunation(globalData); -import handsup from './Player/handsup'; -handsup(); - require('./Gui/policedepartment'); require('./Gui/helptext'); require('./admin/spectate'); From 44609e0ee6c0c147c3f54adb568d401d3457116d Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 16:52:06 +0200 Subject: [PATCH 046/138] test nodm zone kein schaden --- ReallifeGamemode.Client/Player/position.ts | 8 -------- ReallifeGamemode.Client/util/weapondamage.ts | 10 +++++++--- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts index d6343ddb..8c8cf4a3 100644 --- a/ReallifeGamemode.Client/Player/position.ts +++ b/ReallifeGamemode.Client/Player/position.ts @@ -8,14 +8,6 @@ export function isPlayerInNoDMZone(pos) { } export default function positionHandler() { - - mp.events.add("checkPosition", (targetEntity) => { - - if (isPlayerInNoDMZone(mp.players.local.position) || isPlayerInNoDMZone(targetEntity.position)) { - mp.gui.chat.push("Kein DM in NODM!"); - } - }); - setInterval(() => { mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); }, 200); diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 013b0dd5..f1704e9a 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,4 +1,6 @@ -export default function weapondamageUtil() { +import { isPlayerInNoDMZone } from "../Player/position"; + +export default function weapondamageUtil() { let blockInput = false; mp.players.local.setSuffersCriticalHits(false); @@ -8,8 +10,10 @@ }); mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - mp.events.call('checkPosition', targetEntity); - return true; + if (isPlayerInNoDMZone(targetEntity.position) || isPlayerInNoDMZone(sourceEntity.position)) { + mp.gui.chat.push("Kein DM in NODM!"); + return true; + } }); mp.events.add("render", () => { From 093563ea877a4fd59ef7cfdeb7e820b20afa31a9 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 17:12:52 +0200 Subject: [PATCH 047/138] added library for polygons --- ReallifeGamemode.Client/Player/position.ts | 9 ++++ ReallifeGamemode.Client/index.ts | 1 + ReallifeGamemode.Client/polygons/events.js | 20 ++++++++ ReallifeGamemode.Client/polygons/helpers.js | 53 +++++++++++++++++++++ ReallifeGamemode.Client/polygons/render.js | 27 +++++++++++ 5 files changed, 110 insertions(+) create mode 100644 ReallifeGamemode.Client/polygons/events.js create mode 100644 ReallifeGamemode.Client/polygons/helpers.js create mode 100644 ReallifeGamemode.Client/polygons/render.js diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/position.ts index 8c8cf4a3..3e2d802d 100644 --- a/ReallifeGamemode.Client/Player/position.ts +++ b/ReallifeGamemode.Client/Player/position.ts @@ -8,6 +8,15 @@ export function isPlayerInNoDMZone(pos) { } export default function positionHandler() { + + mp.events.add('playerEnterPolygon', (polygon) => { + mp.gui.chat.push("entered"); + }); + + mp.events.add('playerLeavePolygon', (polygon) => { + mp.gui.chat.push("entered"); + }); + setInterval(() => { mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); }, 200); diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 724e857f..d8e3350f 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -271,6 +271,7 @@ ammunation(globalData); require('./Gui/policedepartment'); require('./Gui/helptext'); require('./admin/spectate'); +require('./polygons/index'); interface VehicleData { EngineState: boolean; diff --git a/ReallifeGamemode.Client/polygons/events.js b/ReallifeGamemode.Client/polygons/events.js new file mode 100644 index 00000000..9f5f7584 --- /dev/null +++ b/ReallifeGamemode.Client/polygons/events.js @@ -0,0 +1,20 @@ +setInterval(() => { + const { position, dimension } = mp.players.local; + + mp.polygons.pool.map((polygon) => { + + if (polygon.colliding) { + if (!mp.polygons.isPositionWithinPolygon(position, polygon, dimension)) { + polygon.colliding = false; + mp.events.call('playerLeavePolygon', polygon); + } + } + else { + if (mp.polygons.isPositionWithinPolygon(position, polygon, dimension)) { + polygon.colliding = true; + mp.events.call('playerEnterPolygon', polygon); + } + } + }); + +}, 100); \ No newline at end of file diff --git a/ReallifeGamemode.Client/polygons/helpers.js b/ReallifeGamemode.Client/polygons/helpers.js new file mode 100644 index 00000000..6de4afb8 --- /dev/null +++ b/ReallifeGamemode.Client/polygons/helpers.js @@ -0,0 +1,53 @@ +const isPointInArea2D = (point, area) => { + let x = point[0], y = point[1]; + + let inside = false; + + for (let i = 0, j = area.length - 1; i < area.length; j = i++) { + let xi = area[i][0], yi = area[i][1]; + let xj = area[j][0], yj = area[j][1]; + + let intersect = ((yi > y) != (yj > y)) + && (x < (xj - xi) * (y - yi) / (yj - yi) + xi); + + if (intersect) + inside = !inside; + } + + return inside; +}; + +const TWOPI = 6.283185307179586476925287; +const EPSILON = 0.0000001; + +const modulus = (p) => Math.sqrt((p.x * p.x) + (p.y * p.y) + (p.z *p.z)); + +const getAngleSumBetweenPositionAndVertices = (position, vertices) => { + let i; + let m1, m2; + let anglesum=0, costheta; + + for (i = 0; i < vertices.length; i++) { + + const p1 = new mp.Vector3(vertices[i].x - position.x, vertices[i].y - position.y, vertices[i].z - position.z); + const p2 = new mp.Vector3(vertices[(i+1)%vertices.length].x - position.x, vertices[(i+1)%vertices.length].y - position.y, vertices[(i+1)%vertices.length].z - position.z); + + m1 = modulus(p1); + m2 = modulus(p2); + + if (m1*m2 <= EPSILON) + return(TWOPI); + else + costheta = (p1.x*p2.x + p1.y*p2.y + p1.z*p2.z) / (m1*m2); + + anglesum += Math.acos(costheta); + } + return(anglesum); +} + +const generateUniquePolygonId = () => { + const timestamp = Date.now(); + return mp.polygons.pool.some(p => p.id === timestamp) ? generateUniquePolygonId() : timestamp; +}; + +export { isPointInArea2D, generateUniquePolygonId, getAngleSumBetweenPositionAndVertices }; \ No newline at end of file diff --git a/ReallifeGamemode.Client/polygons/render.js b/ReallifeGamemode.Client/polygons/render.js new file mode 100644 index 00000000..7e9288f1 --- /dev/null +++ b/ReallifeGamemode.Client/polygons/render.js @@ -0,0 +1,27 @@ +mp.events.add('render', () => { + + mp.polygons.pool?.forEach(polygon => { + if (!polygon.visible) return; + + const { vertices, height, lineColorRGBA } = polygon; + + vertices.forEach((vertex, index) => { + + const nextVertex = index === (vertices.length - 1) ? vertices[0] : vertices[index + 1]; + + // Deepness lower line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, nextVertex.x, nextVertex.y, nextVertex.z, ...lineColorRGBA); + + // Current vertex height line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, vertex.x, vertex.y, vertex.z + height, ...lineColorRGBA); + + // Next vertex height line + mp.game.graphics.drawLine(nextVertex.x, nextVertex.y, nextVertex.z, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); + + // Deepness higher line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z + height, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); + }); + + }); + +}); \ No newline at end of file From d4320488d58f5ad48aa04fb6c2c817691ecdee56 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 17:13:18 +0200 Subject: [PATCH 048/138] =?UTF-8?q?Busfahrer:=20Kein=20TP-Hack=20kehr=20m?= =?UTF-8?q?=C3=B6glich?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index 492823d6..7ef6fb35 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -30,6 +30,8 @@ export default function busRouteList(globalData: IGlobalData) { skill = jobskill; if (!globalData.InMenu) { globalData.InMenu = true; + + mp.gui.cursor.show(true, true); skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"]; routeMenu = new Menu("Bus Job", "", new Point(0, screenRes.y / 3), null, null); @@ -78,6 +80,7 @@ export default function busRouteList(globalData: IGlobalData) { mp.events.callRemote("CLIENT:Job_StopJob"); } routeSelected = false; + mp.gui.cursor.show(true, true); globalData.InMenu = false; }); From d792741d284cfc9706849a32215b648dfa995a23 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 17:13:37 +0200 Subject: [PATCH 049/138] Autohaus: Floating vehicles vlt fix --- ReallifeGamemode.Client/Business/cardealer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Business/cardealer.ts b/ReallifeGamemode.Client/Business/cardealer.ts index 8462d4f4..3a7c4d8e 100644 --- a/ReallifeGamemode.Client/Business/cardealer.ts +++ b/ReallifeGamemode.Client/Business/cardealer.ts @@ -37,9 +37,9 @@ export default function carDealer(globalData: IGlobalData) { var text = label.text.replace("SHOPVEHICLE", realName); label.text = text; - entity.freezePosition(true); entity.setOnGroundProperly(); entity.setExplodesOnHighExplosionDamage(false); + entity.freezePosition(true); } From ba7241201995ed493a63e069ec5c89a0445a7637 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 17:15:05 +0200 Subject: [PATCH 050/138] Nur index.js im client-root ignorieren --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 4743a2ce..7dd68243 100644 --- a/.gitignore +++ b/.gitignore @@ -336,7 +336,7 @@ ASALocalRun/ launchSettings.json tmp/ -index.js +ReallifeGamemode.Client/index.js # post build config postbuild.config.xml From ce7791a693da0684fba9bce3d4f6c5bd71dd86b7 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 17:21:39 +0200 Subject: [PATCH 051/138] LSPD/FIB: Fix Geld bei einknasten --- ReallifeGamemode.Server/Extensions/ClientExtension.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Extensions/ClientExtension.cs b/ReallifeGamemode.Server/Extensions/ClientExtension.cs index 18342f10..56f0d4f7 100644 --- a/ReallifeGamemode.Server/Extensions/ClientExtension.cs +++ b/ReallifeGamemode.Server/Extensions/ClientExtension.cs @@ -102,7 +102,7 @@ namespace ReallifeGamemode.Server.Extensions } int factionMoney = user.Wanteds * 6; - var executiveFactions = dbContext.Factions.Where(f => f.Id == 1 || f.Id == 3); + var executiveFactions = dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 1 || f.Id == 3); foreach(var faction in executiveFactions) { faction.BankAccount.Balance += factionMoney; From 17c2392a6422eab93139701ffe75f2c7e43b08be Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 17:24:22 +0200 Subject: [PATCH 052/138] =?UTF-8?q?index.js=20vom=20polygon=20hinzugef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Player/{position.ts => nodm.ts} | 4 +- ReallifeGamemode.Client/index.ts | 4 +- ReallifeGamemode.Client/polygons/index.js | 48 +++++++++++++++++++ ReallifeGamemode.Client/util/weapondamage.ts | 3 +- 4 files changed, 53 insertions(+), 6 deletions(-) rename ReallifeGamemode.Client/Player/{position.ts => nodm.ts} (85%) create mode 100644 ReallifeGamemode.Client/polygons/index.js diff --git a/ReallifeGamemode.Client/Player/position.ts b/ReallifeGamemode.Client/Player/nodm.ts similarity index 85% rename from ReallifeGamemode.Client/Player/position.ts rename to ReallifeGamemode.Client/Player/nodm.ts index 3e2d802d..89946fac 100644 --- a/ReallifeGamemode.Client/Player/position.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -7,14 +7,14 @@ export function isPlayerInNoDMZone(pos) { return false; } -export default function positionHandler() { +export default function nodmHandler() { mp.events.add('playerEnterPolygon', (polygon) => { mp.gui.chat.push("entered"); }); mp.events.add('playerLeavePolygon', (polygon) => { - mp.gui.chat.push("entered"); + mp.gui.chat.push("leaved"); }); setInterval(() => { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index d8e3350f..598922bf 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -186,8 +186,8 @@ ped(); import reportList from './Player/reportmenu'; reportList(globalData); -import positionHandler from './Player/position'; -positionHandler(); +import nodmHandler from './Player/nodm'; +nodmHandler(); import checkpointHandle from './util/checkpoint'; checkpointHandle(globalData); diff --git a/ReallifeGamemode.Client/polygons/index.js b/ReallifeGamemode.Client/polygons/index.js new file mode 100644 index 00000000..5393a075 --- /dev/null +++ b/ReallifeGamemode.Client/polygons/index.js @@ -0,0 +1,48 @@ +const { generateUniquePolygonId, getAngleSumBetweenPositionAndVertices, isPointInArea2D } = require('polygons/helpers'); +require('polygons/render'); +require('polygons/events'); + +mp.polygons = { + pool: [], + add: (vertices, height, options = { visible: false, lineColorRGBA: [255,255,255,255], dimension: 0 }) => { + + const polygon = { + id: generateUniquePolygonId(), + vertices, + height, + ...options, + colliding: false + } + + mp.polygons.pool.push(polygon); + + return polygon; + }, + remove: (polygon) => { + const index = mp.polygons.pool.findIndex(p => p.id === polygon.id); + + if (index !== -1) + mp.polygons.pool.splice(index, 1); + }, + exists: (polygon) => { + return mp.polygons.pool.some(p => p.id === polygon.id) + }, + isPositionWithinPolygon: (position, polygon, dimension) => { + if (dimension && polygon.dimension !== dimension && polygon.dimension !== -1) + return false; + + const { vertices } = polygon; + + const polygonPoints2D = []; + + for (let i in vertices) { + if (position.z >= vertices[i].z && position.z <= (vertices[i].z + polygon.height) || getAngleSumBetweenPositionAndVertices(position, vertices) >= 5.8) + polygonPoints2D.push([vertices[i].x, vertices[i].y]); + else + return false; + } + + return isPointInArea2D([position.x, position.y], polygonPoints2D); + } +} + diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index f1704e9a..4c16d9f8 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,4 +1,4 @@ -import { isPlayerInNoDMZone } from "../Player/position"; +import { isPlayerInNoDMZone } from "../Player/nodm"; export default function weapondamageUtil() { let blockInput = false; @@ -11,7 +11,6 @@ export default function weapondamageUtil() { mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { if (isPlayerInNoDMZone(targetEntity.position) || isPlayerInNoDMZone(sourceEntity.position)) { - mp.gui.chat.push("Kein DM in NODM!"); return true; } }); From c276b879779662be61dbcda864f8e5d4ba93a12b Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 17:52:39 +0200 Subject: [PATCH 053/138] Fix polygon api --- .../polygons/{events.js => events.ts} | 8 ++- .../polygons/{helpers.js => helpers.ts} | 16 +++-- ReallifeGamemode.Client/polygons/index.js | 48 ------------- ReallifeGamemode.Client/polygons/index.ts | 71 +++++++++++++++++++ ReallifeGamemode.Client/polygons/render.js | 27 ------- ReallifeGamemode.Client/polygons/render.ts | 29 ++++++++ 6 files changed, 114 insertions(+), 85 deletions(-) rename ReallifeGamemode.Client/polygons/{events.js => events.ts} (61%) rename ReallifeGamemode.Client/polygons/{helpers.js => helpers.ts} (76%) delete mode 100644 ReallifeGamemode.Client/polygons/index.js create mode 100644 ReallifeGamemode.Client/polygons/index.ts delete mode 100644 ReallifeGamemode.Client/polygons/render.js create mode 100644 ReallifeGamemode.Client/polygons/render.ts diff --git a/ReallifeGamemode.Client/polygons/events.js b/ReallifeGamemode.Client/polygons/events.ts similarity index 61% rename from ReallifeGamemode.Client/polygons/events.js rename to ReallifeGamemode.Client/polygons/events.ts index 9f5f7584..5df30b37 100644 --- a/ReallifeGamemode.Client/polygons/events.js +++ b/ReallifeGamemode.Client/polygons/events.ts @@ -1,16 +1,18 @@ +import polygons from "."; + setInterval(() => { const { position, dimension } = mp.players.local; - mp.polygons.pool.map((polygon) => { + polygons.pool.map((polygon) => { if (polygon.colliding) { - if (!mp.polygons.isPositionWithinPolygon(position, polygon, dimension)) { + if (!polygons.isPositionWithinPolygon(position, polygon, dimension)) { polygon.colliding = false; mp.events.call('playerLeavePolygon', polygon); } } else { - if (mp.polygons.isPositionWithinPolygon(position, polygon, dimension)) { + if (polygons.isPositionWithinPolygon(position, polygon, dimension)) { polygon.colliding = true; mp.events.call('playerEnterPolygon', polygon); } diff --git a/ReallifeGamemode.Client/polygons/helpers.js b/ReallifeGamemode.Client/polygons/helpers.ts similarity index 76% rename from ReallifeGamemode.Client/polygons/helpers.js rename to ReallifeGamemode.Client/polygons/helpers.ts index 6de4afb8..283ddf4a 100644 --- a/ReallifeGamemode.Client/polygons/helpers.js +++ b/ReallifeGamemode.Client/polygons/helpers.ts @@ -1,4 +1,6 @@ -const isPointInArea2D = (point, area) => { +import polygons from "."; + +const isPointInArea2D = (point, area): boolean => { let x = point[0], y = point[1]; let inside = false; @@ -20,9 +22,9 @@ const isPointInArea2D = (point, area) => { const TWOPI = 6.283185307179586476925287; const EPSILON = 0.0000001; -const modulus = (p) => Math.sqrt((p.x * p.x) + (p.y * p.y) + (p.z *p.z)); +const modulus = (p): number => Math.sqrt((p.x * p.x) + (p.y * p.y) + (p.z *p.z)); -const getAngleSumBetweenPositionAndVertices = (position, vertices) => { +const getAngleSumBetweenPositionAndVertices = (position, vertices): number => { let i; let m1, m2; let anglesum=0, costheta; @@ -42,12 +44,12 @@ const getAngleSumBetweenPositionAndVertices = (position, vertices) => { anglesum += Math.acos(costheta); } - return(anglesum); + return (anglesum); } -const generateUniquePolygonId = () => { - const timestamp = Date.now(); - return mp.polygons.pool.some(p => p.id === timestamp) ? generateUniquePolygonId() : timestamp; +const generateUniquePolygonId = (): number => { + const timestamp = Date.now(); + return polygons.pool.some(p => p.id === timestamp) ? generateUniquePolygonId() : timestamp; }; export { isPointInArea2D, generateUniquePolygonId, getAngleSumBetweenPositionAndVertices }; \ No newline at end of file diff --git a/ReallifeGamemode.Client/polygons/index.js b/ReallifeGamemode.Client/polygons/index.js deleted file mode 100644 index 5393a075..00000000 --- a/ReallifeGamemode.Client/polygons/index.js +++ /dev/null @@ -1,48 +0,0 @@ -const { generateUniquePolygonId, getAngleSumBetweenPositionAndVertices, isPointInArea2D } = require('polygons/helpers'); -require('polygons/render'); -require('polygons/events'); - -mp.polygons = { - pool: [], - add: (vertices, height, options = { visible: false, lineColorRGBA: [255,255,255,255], dimension: 0 }) => { - - const polygon = { - id: generateUniquePolygonId(), - vertices, - height, - ...options, - colliding: false - } - - mp.polygons.pool.push(polygon); - - return polygon; - }, - remove: (polygon) => { - const index = mp.polygons.pool.findIndex(p => p.id === polygon.id); - - if (index !== -1) - mp.polygons.pool.splice(index, 1); - }, - exists: (polygon) => { - return mp.polygons.pool.some(p => p.id === polygon.id) - }, - isPositionWithinPolygon: (position, polygon, dimension) => { - if (dimension && polygon.dimension !== dimension && polygon.dimension !== -1) - return false; - - const { vertices } = polygon; - - const polygonPoints2D = []; - - for (let i in vertices) { - if (position.z >= vertices[i].z && position.z <= (vertices[i].z + polygon.height) || getAngleSumBetweenPositionAndVertices(position, vertices) >= 5.8) - polygonPoints2D.push([vertices[i].x, vertices[i].y]); - else - return false; - } - - return isPointInArea2D([position.x, position.y], polygonPoints2D); - } -} - diff --git a/ReallifeGamemode.Client/polygons/index.ts b/ReallifeGamemode.Client/polygons/index.ts new file mode 100644 index 00000000..5417de65 --- /dev/null +++ b/ReallifeGamemode.Client/polygons/index.ts @@ -0,0 +1,71 @@ +const { generateUniquePolygonId, getAngleSumBetweenPositionAndVertices, isPointInArea2D } = require('./helpers'); + +require('./render'); +require('./events'); + +class PolygonManager { + pool: Polygon[] = new Array(); + + add(vertices: Vector3Mp[], height: number, visible: boolean, lineColorRGBA: [number, number, number, number], dimension: number = 0) { + + const polygon: Polygon = { + id: generateUniquePolygonId(), + vertices, + height, + colliding: false, + lineColorRGBA: lineColorRGBA, + dimension: dimension, + visible: visible + } + + this.pool.push(polygon); + + return polygon; + } + + remove(polygon: Polygon) { + const index = this.pool.findIndex(p => p.id === polygon.id); + + if (index !== -1) + this.pool.splice(index, 1); + } + + exists(polygon: Polygon) { + return this.pool.some(p => p.id === polygon.id) + } + + isPositionWithinPolygon(position: Vector3Mp, polygon: Polygon, dimension: number) { + if (dimension && polygon.dimension !== dimension && polygon.dimension !== -1) + return false; + + const { vertices } = polygon; + + const polygonPoints2D = []; + + for (let i in vertices) { + if (position.z >= vertices[i].z && position.z <= (vertices[i].z + polygon.height) || getAngleSumBetweenPositionAndVertices(position, vertices) >= 5.8) + polygonPoints2D.push([vertices[i].x, vertices[i].y]); + else + return false; + } + + return isPointInArea2D([position.x, position.y], polygonPoints2D); + } +} + +type Polygon = { + id: number; + vertices: Vector3Mp[]; + height: number; + visible: boolean; + colliding: boolean; + dimension: number; + lineColorRGBA: [number, number, number, number]; +}; + +const polygons = new PolygonManager(); + +export default polygons; +export { Polygon }; + + diff --git a/ReallifeGamemode.Client/polygons/render.js b/ReallifeGamemode.Client/polygons/render.js deleted file mode 100644 index 7e9288f1..00000000 --- a/ReallifeGamemode.Client/polygons/render.js +++ /dev/null @@ -1,27 +0,0 @@ -mp.events.add('render', () => { - - mp.polygons.pool?.forEach(polygon => { - if (!polygon.visible) return; - - const { vertices, height, lineColorRGBA } = polygon; - - vertices.forEach((vertex, index) => { - - const nextVertex = index === (vertices.length - 1) ? vertices[0] : vertices[index + 1]; - - // Deepness lower line - mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, nextVertex.x, nextVertex.y, nextVertex.z, ...lineColorRGBA); - - // Current vertex height line - mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, vertex.x, vertex.y, vertex.z + height, ...lineColorRGBA); - - // Next vertex height line - mp.game.graphics.drawLine(nextVertex.x, nextVertex.y, nextVertex.z, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); - - // Deepness higher line - mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z + height, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); - }); - - }); - -}); \ No newline at end of file diff --git a/ReallifeGamemode.Client/polygons/render.ts b/ReallifeGamemode.Client/polygons/render.ts new file mode 100644 index 00000000..26edc02f --- /dev/null +++ b/ReallifeGamemode.Client/polygons/render.ts @@ -0,0 +1,29 @@ +import polygons from "."; + +mp.events.add('render', () => { + + polygons.pool.forEach(polygon => { + if (!polygon.visible) return; + + const { vertices, height, lineColorRGBA } = polygon; + + vertices.forEach((vertex, index) => { + + const nextVertex = index === (vertices.length - 1) ? vertices[0] : vertices[index + 1]; + + // Deepness lower line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, nextVertex.x, nextVertex.y, nextVertex.z, ...lineColorRGBA); + + // Current vertex height line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z, vertex.x, vertex.y, vertex.z + height, ...lineColorRGBA); + + // Next vertex height line + mp.game.graphics.drawLine(nextVertex.x, nextVertex.y, nextVertex.z, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); + + // Deepness higher line + mp.game.graphics.drawLine(vertex.x, vertex.y, vertex.z + height, nextVertex.x, nextVertex.y, nextVertex.z + height, ...lineColorRGBA); + }); + + }); + +}); \ No newline at end of file From fd5299ffa44df5d14d72e13d55d7d68950374207 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 18:15:57 +0200 Subject: [PATCH 054/138] test: nodm zone mit polygons --- ReallifeGamemode.Client/Player/nodm.ts | 39 ++++++++++++++------ ReallifeGamemode.Client/util/weapondamage.ts | 6 ++- 2 files changed, 31 insertions(+), 14 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 89946fac..838bb6a8 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -1,23 +1,38 @@ - -export function isPlayerInNoDMZone(pos) { - if (pos.x >= -540 && pos.x <= -531 - && pos.y >= -2151 && pos.y <= -2139) { - return true; - } +import polygons from "../polygons"; + +let vec1 = new mp.Vector3(-515.60626, -2165.5671, 7.5437155); +let vec2 = new mp.Vector3(-527.26056, -2179.1477, 6.2923); +let vec3 = new mp.Vector3(-519.55426, -2186.5708, 6.4070964); +let vec4 = new mp.Vector3(-506.00034, -2186.9153, 6.705781); +let vec5 = new mp.Vector3(-500.05966, -2178.3372, 3.6730707); + +const polygon = polygons.add([vec1, vec2, vec3, vec4, vec5], 6, true, [255, 255, 255, 255], 0); + +export function isTargetInPolygon(pos) { + polygons.pool.forEach(zone => { + if (polygons.isPositionWithinPolygon(pos, zone, zone.dimension)) { + return true; + } + }); return false; } +export let isInAnyPolygon; + export default function nodmHandler() { + polygon.visible = true; + polygon.height = 100; + polygon.lineColorRGBA = [255, 155, 0, 255]; + + mp.events.add('playerEnterPolygon', (polygon) => { - mp.gui.chat.push("entered"); + mp.events.call('toggleNoDmZone', true); + isInAnyPolygon = true; }); mp.events.add('playerLeavePolygon', (polygon) => { - mp.gui.chat.push("leaved"); + mp.events.call('toggleNoDmZone', false); + isInAnyPolygon = false; }); - - setInterval(() => { - mp.events.call('toggleNoDmZone', isPlayerInNoDMZone(mp.players.local.position)); - }, 200); } diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 4c16d9f8..6dde5bb3 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,4 +1,5 @@ -import { isPlayerInNoDMZone } from "../Player/nodm"; +import { isInAnyPolygon, isTargetInPolygon } from "../Player/nodm"; +import polygons from "../polygons"; export default function weapondamageUtil() { let blockInput = false; @@ -10,7 +11,8 @@ export default function weapondamageUtil() { }); mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isPlayerInNoDMZone(targetEntity.position) || isPlayerInNoDMZone(sourceEntity.position)) { + if (isInAnyPolygon || isTargetInPolygon(targetEntity.position)) { + mp.gui.chat.push("Kein DM in NODM"); return true; } }); From 1ea6ef8da525f6dda700e5667226eb137119d0fa Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 18:32:43 +0200 Subject: [PATCH 055/138] test: target in nodm --- ReallifeGamemode.Client/util/weapondamage.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 6dde5bb3..732038be 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -11,8 +11,12 @@ export default function weapondamageUtil() { }); mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isInAnyPolygon || isTargetInPolygon(targetEntity.position)) { - mp.gui.chat.push("Kein DM in NODM"); + if (isInAnyPolygon) { + mp.gui.chat.push("source in nodm"); + return true; + } + if (isTargetInPolygon(targetEntity.position)) { + mp.gui.chat.push("target in nodm"); return true; } }); From ae9fbb13a1b85d257af902aa6c53f16f85765e5a Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 18:46:44 +0200 Subject: [PATCH 056/138] test: target in nodm2 --- ReallifeGamemode.Client/Player/nodm.ts | 9 ------- ReallifeGamemode.Client/util/weapondamage.ts | 25 ++++++++++++++------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 838bb6a8..6606e4e7 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -8,15 +8,6 @@ let vec5 = new mp.Vector3(-500.05966, -2178.3372, 3.6730707); const polygon = polygons.add([vec1, vec2, vec3, vec4, vec5], 6, true, [255, 255, 255, 255], 0); -export function isTargetInPolygon(pos) { - polygons.pool.forEach(zone => { - if (polygons.isPositionWithinPolygon(pos, zone, zone.dimension)) { - return true; - } - }); - return false; -} - export let isInAnyPolygon; export default function nodmHandler() { diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 732038be..45e744f5 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,6 +1,20 @@ -import { isInAnyPolygon, isTargetInPolygon } from "../Player/nodm"; +import { isInAnyPolygon } from "../Player/nodm"; import polygons from "../polygons"; + +function isTargetInPolygon(pos): boolean { + let found = false; + polygons.pool.forEach(zone => { + if (polygons.isPositionWithinPolygon(pos, zone, zone.dimension)) { + found = true; + return; + } + }); + if (found) return true; + + return false; +} + export default function weapondamageUtil() { let blockInput = false; @@ -11,12 +25,9 @@ export default function weapondamageUtil() { }); mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isInAnyPolygon) { - mp.gui.chat.push("source in nodm"); - return true; - } - if (isTargetInPolygon(targetEntity.position)) { - mp.gui.chat.push("target in nodm"); + + if (isTargetInPolygon(targetEntity.position) || isInAnyPolygon) { + mp.gui.chat.push("nodm"); return true; } }); From 4dcb4396cb05626521179f99259127b7615578db Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:05:14 +0200 Subject: [PATCH 057/138] stadthalle und busbase nodmzone --- ReallifeGamemode.Client/Gui/infobox.ts | 6 +++--- ReallifeGamemode.Client/Player/nodm.ts | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index e3e26fff..fd2723ce 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -351,11 +351,11 @@ export default function (globalData: IGlobalData): void { } if (noDmZone) { - mp.game.graphics.drawText("~r~NoDM Zone", [0.907, 0.741], + mp.game.graphics.drawText("~r~No-DM Zone", [0.92, 0.7], { - font: 4, + font: 2, color: [255, 255, 255, 255], - scale: [0.8, 0.8], + scale: [0.7, 0.7], outline: true, centre: false }) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 6606e4e7..fd81bc3c 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -1,22 +1,22 @@ import polygons from "../polygons"; -let vec1 = new mp.Vector3(-515.60626, -2165.5671, 7.5437155); -let vec2 = new mp.Vector3(-527.26056, -2179.1477, 6.2923); -let vec3 = new mp.Vector3(-519.55426, -2186.5708, 6.4070964); -let vec4 = new mp.Vector3(-506.00034, -2186.9153, 6.705781); -let vec5 = new mp.Vector3(-500.05966, -2178.3372, 3.6730707); +let busbaseVector1 = new mp.Vector3(-522.4485, -2138.7021, 7.7564063); +let busbaseVector2 = new mp.Vector3(-584.9822, -2072.467, 5.9921026); +let busbaseVector3 = new mp.Vector3(-669.1689, -2172.7917, 6.009973); +let busbaseVector4 = new mp.Vector3(-600.4804, -2230.3953, 6.213662); -const polygon = polygons.add([vec1, vec2, vec3, vec4, vec5], 6, true, [255, 255, 255, 255], 0); +let stadthalleVector1 = new mp.Vector3(-464.26273, -242.73814, 35.946384); +let stadthalleVector2 = new mp.Vector3(-505.32938, -170.14832, 37.859695); +let stadthalleVector3 = new mp.Vector3(-589.5164, -224.41574, 36.648193); +let stadthalleVector4 = new mp.Vector3(-556.6909, -280.71564, 35.163292); + +const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, true, [255, 155, 0, 255], 0); +const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, true, [255, 155, 0, 255], 0); export let isInAnyPolygon; export default function nodmHandler() { - polygon.visible = true; - polygon.height = 100; - polygon.lineColorRGBA = [255, 155, 0, 255]; - - mp.events.add('playerEnterPolygon', (polygon) => { mp.events.call('toggleNoDmZone', true); isInAnyPolygon = true; From 3d88940262bfb6ad136993490a90a5505f6b827e Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:14:13 +0200 Subject: [PATCH 058/138] =?UTF-8?q?fahrschule=20als=20nodm=20zone=20eingef?= =?UTF-8?q?=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Gui/infobox.ts | 2 +- ReallifeGamemode.Client/Player/nodm.ts | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index fd2723ce..b837d579 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -351,7 +351,7 @@ export default function (globalData: IGlobalData): void { } if (noDmZone) { - mp.game.graphics.drawText("~r~No-DM Zone", [0.92, 0.7], + mp.game.graphics.drawText("~r~NoDM Zone", [0.92, 0.7], { font: 2, color: [255, 255, 255, 255], diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index fd81bc3c..bb4a5f4e 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -10,8 +10,16 @@ let stadthalleVector2 = new mp.Vector3(-505.32938, -170.14832, 37.859695); let stadthalleVector3 = new mp.Vector3(-589.5164, -224.41574, 36.648193); let stadthalleVector4 = new mp.Vector3(-556.6909, -280.71564, 35.163292); +let fahrschuleVector1 = new mp.Vector3(-812.13043, -1406.9983, 4.9805145); +let fahrschuleVector2 = new mp.Vector3(-727.035, -1305.2482, 5.084054); +let fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); +let fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); +let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); + + const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, true, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, true, [255, 155, 0, 255], 0); +const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, true, [255, 155, 0, 255], 0); export let isInAnyPolygon; From c77c0781413c48e281920e823ffddb44f43547c8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:25:20 +0200 Subject: [PATCH 059/138] liste of nodm zones --- ReallifeGamemode.Client/Player/nodm.ts | 8 ++++---- ReallifeGamemode.Client/util/weapondamage.ts | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index bb4a5f4e..70481b6e 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -16,22 +16,22 @@ let fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); let fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); - const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, true, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, true, [255, 155, 0, 255], 0); const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, true, [255, 155, 0, 255], 0); -export let isInAnyPolygon; +export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule]; +export let isInAnyNoDMPolygon; export default function nodmHandler() { mp.events.add('playerEnterPolygon', (polygon) => { mp.events.call('toggleNoDmZone', true); - isInAnyPolygon = true; + isInAnyNoDMPolygon = true; }); mp.events.add('playerLeavePolygon', (polygon) => { mp.events.call('toggleNoDmZone', false); - isInAnyPolygon = false; + isInAnyNoDMPolygon = false; }); } diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 45e744f5..c706d07c 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,10 +1,11 @@ -import { isInAnyPolygon } from "../Player/nodm"; +import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/nodm"; import polygons from "../polygons"; function isTargetInPolygon(pos): boolean { let found = false; - polygons.pool.forEach(zone => { + + listNoDMZones.forEach(zone => { if (polygons.isPositionWithinPolygon(pos, zone, zone.dimension)) { found = true; return; @@ -26,7 +27,7 @@ export default function weapondamageUtil() { mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isTargetInPolygon(targetEntity.position) || isInAnyPolygon) { + if (isTargetInPolygon(targetEntity.position) || isInAnyNoDMPolygon) { mp.gui.chat.push("nodm"); return true; } From 57c2933168fc549b88f8754bd877ad185ca85421 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:42:27 +0200 Subject: [PATCH 060/138] nodmzonen bei pilotjobs --- ReallifeGamemode.Client/Player/nodm.ts | 34 ++++++++++++++++++++------ 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 70481b6e..aa8333de 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -16,22 +16,40 @@ let fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); let fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); -const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, true, [255, 155, 0, 255], 0); -const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, true, [255, 155, 0, 255], 0); -const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, true, [255, 155, 0, 255], 0); +let pilotAnfaengerVector1 = new mp.Vector3(1763.263, 3292.4204, 41.159176); +let pilotAnfaengerVector2 = new mp.Vector3(1785.29944, 3230.2786, 42.553444); +let pilotAnfaengerVector3 = new mp.Vector3(1655.139, 3198.6257, 42.723602); +let pilotAnfaengerVector4 = new mp.Vector3(1639.2759, 3256.5574, 40.966084); -export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule]; +let pilotProfiVector1 = new mp.Vector3(-1595.5433, -3130.2798, 13.944942); +let pilotProfiVector2 = new mp.Vector3(-1679.6715, -3082.12, 13.948778); +let pilotProfiVector3 = new mp.Vector3(-1728.0858, -3164.9736, 14.055883); +let pilotProfiVector4 = new mp.Vector3(-1640.4034, -3213.0503, 13.8741665); + +const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, false, [255, 155, 0, 255], 0); +const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, false, [255, 155, 0, 255], 0); +const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, false, [255, 155, 0, 255], 0); +const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, false, [255, 155, 0, 255], 0); +const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); + +export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi]; export let isInAnyNoDMPolygon; export default function nodmHandler() { mp.events.add('playerEnterPolygon', (polygon) => { - mp.events.call('toggleNoDmZone', true); - isInAnyNoDMPolygon = true; + + if (listNoDMZones.indexOf(polygon) != -1){ + mp.events.call('toggleNoDmZone', true); + isInAnyNoDMPolygon = true; + } }); mp.events.add('playerLeavePolygon', (polygon) => { - mp.events.call('toggleNoDmZone', false); - isInAnyNoDMPolygon = false; + + if (listNoDMZones.indexOf(polygon) != -1) { + mp.events.call('toggleNoDmZone', false); + isInAnyNoDMPolygon = false; + } }); } From 2e6f315309a21fed632515b39670dccd6d09ea22 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:43:49 +0200 Subject: [PATCH 061/138] debug meldung entfernt --- ReallifeGamemode.Client/util/weapondamage.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index c706d07c..d187e703 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -26,9 +26,7 @@ export default function weapondamageUtil() { }); mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isTargetInPolygon(targetEntity.position) || isInAnyNoDMPolygon) { - mp.gui.chat.push("nodm"); return true; } }); From 9eb42b09ed7bd0521eef460962ae977eb4ddf399 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 19:49:27 +0200 Subject: [PATCH 062/138] Busfahrer fix ANDERES AUTO BITTE FUNKTIONIER --- .../Managers/JobManager.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/JobManager.cs b/ReallifeGamemode.Server/Managers/JobManager.cs index 63abaff8..af5de97d 100644 --- a/ReallifeGamemode.Server/Managers/JobManager.cs +++ b/ReallifeGamemode.Server/Managers/JobManager.cs @@ -202,13 +202,22 @@ namespace ReallifeGamemode.Server.Managers { JobBase job = GetJob(player.GetUser().JobId ?? -1); - if (job != null && job.GetUsersInJob().Contains(player) && job.CheckVehicle(player, veh) && seat == 0) + if (job != null && job.GetUsersInJob().Contains(player) && seat == 0) { - if (!playerTimersJobVehicleRespawn.ContainsKey(player)) - return; + if(job.CheckVehicle(player, veh)) + { + if (!playerTimersJobVehicleRespawn.ContainsKey(player)) + return; - playerTimersJobVehicleRespawn[player].Stop(); - playerTimersJobVehicleRespawn.Remove(player); + playerTimersJobVehicleRespawn[player].Stop(); + playerTimersJobVehicleRespawn.Remove(player); + } + else + { + player.StopAnimation(); + player.WarpOutOfVehicle(); + player.Position = player.Position.Add(new Vector3(0, 0, 2.0f)); + } } } From 4060ffb7fb110747487a02f5d686045056b68806 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 19:49:47 +0200 Subject: [PATCH 063/138] Userfahrzeug kaufen: Business Id setzen --- ReallifeGamemode.Server/Managers/BusinessManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Managers/BusinessManager.cs b/ReallifeGamemode.Server/Managers/BusinessManager.cs index e55a250e..6507ea0b 100644 --- a/ReallifeGamemode.Server/Managers/BusinessManager.cs +++ b/ReallifeGamemode.Server/Managers/BusinessManager.cs @@ -196,6 +196,7 @@ namespace ReallifeGamemode.Server.Managers SecondaryColor = 111, Active = true, Price = price, + BusinessId = business.Id }; } else if (target == "Fraktion") From 3b04a0776e2b41bc8bdd3fa2be10f973e3e8fc30 Mon Sep 17 00:00:00 2001 From: kookroach Date: Thu, 22 Apr 2021 19:51:52 +0200 Subject: [PATCH 064/138] Removed Timers for Cooldowns for Items. --- .../Inventory/Items/ConsumableItem.cs | 36 ++++++++++--------- .../Managers/InventoryManager.cs | 2 +- ReallifeGamemode.Server/Util/PlayerTimer.cs | 15 -------- 3 files changed, 20 insertions(+), 33 deletions(-) diff --git a/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs b/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs index 26248d69..076b28cd 100644 --- a/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs +++ b/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs @@ -28,33 +28,35 @@ namespace ReallifeGamemode.Server.Inventory.Items if (user.Player == null || !user.Player.IsLoggedIn()) return false; - if (InventoryManager.itemCooldown.ContainsKey(user.Player)) + if (!HasCooldownElapsed(user)) { - PlayerTimer timer = InventoryManager.itemCooldown[user.Player]; - int timeToNextUse = (int)(timer.startTime - DateTime.Now).TotalSeconds; - uItem.GetUser().Player.TriggerEvent("Error", $"Versuche es nach {timeToNextUse} Sekunden erneut."); + DateTime time = InventoryManager.itemCooldown[user]; + int timeUntillNextUse = (int)(time - DateTime.Now).TotalSeconds; + uItem.GetUser().Player.TriggerEvent("Error", $"Versuche es nach {timeUntillNextUse} Sekunden erneut."); return false; } - PlayerTimer playerTimer = new PlayerTimer(user.Player, this, Cooldown); - playerTimer.Elapsed += _CooldownElapse; - InventoryManager.itemCooldown.Add(user.Player, playerTimer); + + DateTime cooldown = DateTime.Now.AddMilliseconds(Cooldown); + InventoryManager.itemCooldown.Add(user, cooldown); + Consume(uItem); return true; } - private void _CooldownElapse(Player player, dynamic usableItem) + private bool HasCooldownElapsed(User user) { - NAPI.Task.Run(() => - { - if (player == null || !player.IsLoggedIn()) - return; + if (user.Player == null || !user.Player.IsLoggedIn()) + return false; - if (!InventoryManager.itemCooldown.ContainsKey(player)) - return; + if (!InventoryManager.itemCooldown.ContainsKey(user)) + return true; - InventoryManager.itemCooldown[player].Stop(); - InventoryManager.itemCooldown.Remove(player); - }); + int timeRemaining = (int)(InventoryManager.itemCooldown[user] - DateTime.Now).TotalSeconds; + + if (timeRemaining <= 0) + InventoryManager.itemCooldown.Remove(user); + + return timeRemaining <= 0; } } } diff --git a/ReallifeGamemode.Server/Managers/InventoryManager.cs b/ReallifeGamemode.Server/Managers/InventoryManager.cs index d25d977a..42953d00 100644 --- a/ReallifeGamemode.Server/Managers/InventoryManager.cs +++ b/ReallifeGamemode.Server/Managers/InventoryManager.cs @@ -34,7 +34,7 @@ namespace ReallifeGamemode.Server.Managers public static Dictionary> backpackItems { get; set; } = new Dictionary>(); public static Dictionary> vehicleItems { get; set; } = new Dictionary>(); - public static Dictionary itemCooldown = new Dictionary(); + public static Dictionary itemCooldown = new Dictionary(); public class InventoryItem { diff --git a/ReallifeGamemode.Server/Util/PlayerTimer.cs b/ReallifeGamemode.Server/Util/PlayerTimer.cs index 3059cfee..f93a1227 100644 --- a/ReallifeGamemode.Server/Util/PlayerTimer.cs +++ b/ReallifeGamemode.Server/Util/PlayerTimer.cs @@ -11,9 +11,7 @@ namespace ReallifeGamemode.Server.Util { private readonly Player player; private readonly Vehicle veh; - private readonly IUsableItem usableItem; private readonly Timer timer; - public readonly DateTime startTime; public delegate void PlayerTimerElapsed(Player player, dynamic dynamic); @@ -29,23 +27,10 @@ namespace ReallifeGamemode.Server.Util this.timer.Start(); } - public PlayerTimer(Player player, IUsableItem usableItem, float milliseconds = 1000) - { - this.player = player; - this.usableItem = usableItem; - this.startTime = DateTime.Now.AddMilliseconds(milliseconds); - - this.timer = new Timer(milliseconds); - this.timer.Elapsed += Timer_Elapsed; - this.timer.Start(); - } - private void Timer_Elapsed(object sender, ElapsedEventArgs e) { if (veh != null) Elapsed?.Invoke(player, veh); - else - Elapsed?.Invoke(player, usableItem); } public void Stop() From 1d74fb697b2f4ba8b77b432c4855d36b0d194d8c Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 19:52:33 +0200 Subject: [PATCH 065/138] pilot nodm zone erweitert --- ReallifeGamemode.Client/Player/nodm.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index aa8333de..53a38c70 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -16,10 +16,10 @@ let fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); let fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); -let pilotAnfaengerVector1 = new mp.Vector3(1763.263, 3292.4204, 41.159176); +let pilotAnfaengerVector1 = new mp.Vector3(1759.6045, 3305.2988, 41.1526); let pilotAnfaengerVector2 = new mp.Vector3(1785.29944, 3230.2786, 42.553444); let pilotAnfaengerVector3 = new mp.Vector3(1655.139, 3198.6257, 42.723602); -let pilotAnfaengerVector4 = new mp.Vector3(1639.2759, 3256.5574, 40.966084); +let pilotAnfaengerVector4 = new mp.Vector3(-1637.7106, 3265.2083, 40.898083); let pilotProfiVector1 = new mp.Vector3(-1595.5433, -3130.2798, 13.944942); let pilotProfiVector2 = new mp.Vector3(-1679.6715, -3082.12, 13.948778); @@ -29,7 +29,7 @@ let pilotProfiVector4 = new mp.Vector3(-1640.4034, -3213.0503, 13.8741665); const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, false, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, false, [255, 155, 0, 255], 0); const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, false, [255, 155, 0, 255], 0); -const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, false, [255, 155, 0, 255], 0); +const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, true, [255, 155, 0, 255], 0); const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi]; From 3510e2c15347ff91c4eea169784d04b21e98b975 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 20:02:18 +0200 Subject: [PATCH 066/138] nodmzone sichtbar --- ReallifeGamemode.Client/Player/nodm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 53a38c70..647b48da 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -19,7 +19,7 @@ let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); let pilotAnfaengerVector1 = new mp.Vector3(1759.6045, 3305.2988, 41.1526); let pilotAnfaengerVector2 = new mp.Vector3(1785.29944, 3230.2786, 42.553444); let pilotAnfaengerVector3 = new mp.Vector3(1655.139, 3198.6257, 42.723602); -let pilotAnfaengerVector4 = new mp.Vector3(-1637.7106, 3265.2083, 40.898083); +let pilotAnfaengerVector4 = new mp.Vector3(1624.4799, 3294.2612, 39.53612); let pilotProfiVector1 = new mp.Vector3(-1595.5433, -3130.2798, 13.944942); let pilotProfiVector2 = new mp.Vector3(-1679.6715, -3082.12, 13.948778); From f628c07721dc347a9314708f74ba79da6975547e Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 20:04:56 +0200 Subject: [PATCH 067/138] nodmzone unsichtbar --- ReallifeGamemode.Client/Player/nodm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 647b48da..5a84bad0 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -29,7 +29,7 @@ let pilotProfiVector4 = new mp.Vector3(-1640.4034, -3213.0503, 13.8741665); const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, false, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, false, [255, 155, 0, 255], 0); const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, false, [255, 155, 0, 255], 0); -const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, true, [255, 155, 0, 255], 0); +const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, false, [255, 155, 0, 255], 0); const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi]; From 7ca3802096bf21f9aac8c1d9193bab25be138f62 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 20:10:05 +0200 Subject: [PATCH 068/138] muellbase nodmzone --- ReallifeGamemode.Client/Player/nodm.ts | 49 ++++++++++++++------------ 1 file changed, 27 insertions(+), 22 deletions(-) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/nodm.ts index 5a84bad0..bffea4fc 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/nodm.ts @@ -1,38 +1,43 @@ import polygons from "../polygons"; -let busbaseVector1 = new mp.Vector3(-522.4485, -2138.7021, 7.7564063); -let busbaseVector2 = new mp.Vector3(-584.9822, -2072.467, 5.9921026); -let busbaseVector3 = new mp.Vector3(-669.1689, -2172.7917, 6.009973); -let busbaseVector4 = new mp.Vector3(-600.4804, -2230.3953, 6.213662); +const busbaseVector1 = new mp.Vector3(-522.4485, -2138.7021, 7.7564063); +const busbaseVector2 = new mp.Vector3(-584.9822, -2072.467, 5.9921026); +const busbaseVector3 = new mp.Vector3(-669.1689, -2172.7917, 6.009973); +const busbaseVector4 = new mp.Vector3(-600.4804, -2230.3953, 6.213662); -let stadthalleVector1 = new mp.Vector3(-464.26273, -242.73814, 35.946384); -let stadthalleVector2 = new mp.Vector3(-505.32938, -170.14832, 37.859695); -let stadthalleVector3 = new mp.Vector3(-589.5164, -224.41574, 36.648193); -let stadthalleVector4 = new mp.Vector3(-556.6909, -280.71564, 35.163292); +const stadthalleVector1 = new mp.Vector3(-464.26273, -242.73814, 35.946384); +const stadthalleVector2 = new mp.Vector3(-505.32938, -170.14832, 37.859695); +const stadthalleVector3 = new mp.Vector3(-589.5164, -224.41574, 36.648193); +const stadthalleVector4 = new mp.Vector3(-556.6909, -280.71564, 35.163292); -let fahrschuleVector1 = new mp.Vector3(-812.13043, -1406.9983, 4.9805145); -let fahrschuleVector2 = new mp.Vector3(-727.035, -1305.2482, 5.084054); -let fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); -let fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); -let fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); +const fahrschuleVector1 = new mp.Vector3(-812.13043, -1406.9983, 4.9805145); +const fahrschuleVector2 = new mp.Vector3(-727.035, -1305.2482, 5.084054); +const fahrschuleVector3 = new mp.Vector3(-757.4177, -1279.31, 5.1093183); +const fahrschuleVector4 = new mp.Vector3(-832.14087, -1268.561, 4.9827914); +const fahrschuleVector5 = new mp.Vector3(-856.8085, -1286.7786, 6.474576); -let pilotAnfaengerVector1 = new mp.Vector3(1759.6045, 3305.2988, 41.1526); -let pilotAnfaengerVector2 = new mp.Vector3(1785.29944, 3230.2786, 42.553444); -let pilotAnfaengerVector3 = new mp.Vector3(1655.139, 3198.6257, 42.723602); -let pilotAnfaengerVector4 = new mp.Vector3(1624.4799, 3294.2612, 39.53612); +const pilotAnfaengerVector1 = new mp.Vector3(1759.6045, 3305.2988, 41.1526); +const pilotAnfaengerVector2 = new mp.Vector3(1785.29944, 3230.2786, 42.553444); +const pilotAnfaengerVector3 = new mp.Vector3(1655.139, 3198.6257, 42.723602); +const pilotAnfaengerVector4 = new mp.Vector3(1624.4799, 3294.2612, 39.53612); -let pilotProfiVector1 = new mp.Vector3(-1595.5433, -3130.2798, 13.944942); -let pilotProfiVector2 = new mp.Vector3(-1679.6715, -3082.12, 13.948778); -let pilotProfiVector3 = new mp.Vector3(-1728.0858, -3164.9736, 14.055883); -let pilotProfiVector4 = new mp.Vector3(-1640.4034, -3213.0503, 13.8741665); +const pilotProfiVector1 = new mp.Vector3(-1595.5433, -3130.2798, 13.944942); +const pilotProfiVector2 = new mp.Vector3(-1679.6715, -3082.12, 13.948778); +const pilotProfiVector3 = new mp.Vector3(-1728.0858, -3164.9736, 14.055883); +const pilotProfiVector4 = new mp.Vector3(-1640.4034, -3213.0503, 13.8741665); + +const muellbaseVector1 = new mp.Vector3(521.6251, -2194.5068, 5.985945); +const muellbaseVector2 = new mp.Vector3(454.88348, -2158.1938, 5.9788494); +const muellbaseVector3 = new mp.Vector3(529.06635, -2088.4097, 8.303088); const polygon_busbase = polygons.add([busbaseVector1, busbaseVector2, busbaseVector3, busbaseVector4], 15, false, [255, 155, 0, 255], 0); const polygon_stadthalle = polygons.add([stadthalleVector1, stadthalleVector2, stadthalleVector3, stadthalleVector4], 15, false, [255, 155, 0, 255], 0); const polygon_fahrschule = polygons.add([fahrschuleVector1, fahrschuleVector2, fahrschuleVector3, fahrschuleVector4, fahrschuleVector5], 15, false, [255, 155, 0, 255], 0); const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaengerVector2, pilotAnfaengerVector3, pilotAnfaengerVector4], 15, false, [255, 155, 0, 255], 0); const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); +const polygon_muellbase = polygons.add([muellbaseVector1, muellbaseVector2, muellbaseVector3], 15, false, [255, 155, 0, 255], 0); -export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi]; +export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase]; export let isInAnyNoDMPolygon; export default function nodmHandler() { From 798a84813cb160c3132f683530aadf429629eff1 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 20:11:52 +0200 Subject: [PATCH 069/138] =?UTF-8?q?NoDM:=20Nicht=20f=C3=BCr=20Leude=20mit?= =?UTF-8?q?=20Wanteds?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Gui/wanteds.ts | 10 +++++++++- ReallifeGamemode.Client/util/weapondamage.ts | 5 +++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/wanteds.ts b/ReallifeGamemode.Client/Gui/wanteds.ts index 2b04bbfc..9e8c75d0 100644 --- a/ReallifeGamemode.Client/Gui/wanteds.ts +++ b/ReallifeGamemode.Client/Gui/wanteds.ts @@ -1,11 +1,19 @@ -export default function wanteds(globalData: IGlobalData) { +let wantedCount = 0; + +export default function wanteds(globalData: IGlobalData) { var browser = mp.browsers.new("package://assets/html/wanteds/index.html"); mp.events.add("SERVER:SetWanteds", (count: number) => { browser.execute(`setWanteds(${count});`); + wantedCount = count; }); + mp.events.add("SERVER:SetWantedFlash", (flash) => { browser.execute(`setFlashing(${flash});`); }); +} + +export function getWantedCount(): number { + return wantedCount; } \ No newline at end of file diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index d187e703..369289c1 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,5 +1,6 @@ import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/nodm"; import polygons from "../polygons"; +import { getWantedCount } from "../Gui/wanteds"; function isTargetInPolygon(pos): boolean { @@ -25,8 +26,8 @@ export default function weapondamageUtil() { player.setSuffersCriticalHits(false); }); - mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { - if (isTargetInPolygon(targetEntity.position) || isInAnyNoDMPolygon) { + mp.events.add(RageEnums.EventKey.INCOMING_DAMAGE, (sourceEntity: EntityMp, sourcePlayer: PlayerMp, targetEntity: EntityMp, weapon: number, boneIndex: number, damage: number) => { + if ((isTargetInPolygon(sourceEntity.position) || isInAnyNoDMPolygon) && getWantedCount() === 0) { return true; } }); From 9e6df00f24bc4923f980e50f7b05fecdf8c65138 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 21:03:13 +0200 Subject: [PATCH 070/138] =?UTF-8?q?spawnschutz=20eingef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Gui/infobox.ts | 16 ++++++++++++++++ ReallifeGamemode.Client/Login/main.ts | 2 ++ ReallifeGamemode.Client/Player/spawnschutz.ts | 9 +++++++++ ReallifeGamemode.Client/index.ts | 4 ++++ ReallifeGamemode.Client/util/weapondamage.ts | 5 +++++ 5 files changed, 36 insertions(+) create mode 100644 ReallifeGamemode.Client/Player/spawnschutz.ts diff --git a/ReallifeGamemode.Client/Gui/infobox.ts b/ReallifeGamemode.Client/Gui/infobox.ts index b837d579..cf1ba033 100644 --- a/ReallifeGamemode.Client/Gui/infobox.ts +++ b/ReallifeGamemode.Client/Gui/infobox.ts @@ -28,6 +28,7 @@ export default function (globalData: IGlobalData): void { var cdTimestamp; var countdownText; var blackScreenMode = false; + let spawnschutz = false; let posX = 0.92; let posY = 0.45; @@ -89,6 +90,10 @@ export default function (globalData: IGlobalData): void { noDmZone = toggle; }); + mp.events.add("toggleSpawnschutz", (toggle) => { + spawnschutz = toggle; + }); + mp.events.add("jailTime", (time) => { jailTime = JSON.parse(time); }); @@ -361,6 +366,17 @@ export default function (globalData: IGlobalData): void { }) } + if (spawnschutz) { + mp.game.graphics.drawText("~r~Spawnschutz", [0.92, 0.75], + { + font: 2, + color: [255, 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/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index 3fe6e020..e1ab88b7 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -69,5 +69,7 @@ export default function (globalData: IGlobalData): void { globalData.InMenu = false; loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); + + mp.events.call("toggleSpawnschutz", true); }); } \ No newline at end of file diff --git a/ReallifeGamemode.Client/Player/spawnschutz.ts b/ReallifeGamemode.Client/Player/spawnschutz.ts new file mode 100644 index 00000000..8a6bf9bc --- /dev/null +++ b/ReallifeGamemode.Client/Player/spawnschutz.ts @@ -0,0 +1,9 @@ +export let spawnschutzEnabled = true; + +export default function spawnschutz() { + + setInterval(() => { + mp.events.call("toggleSpawnschutz", false); + spawnschutzEnabled = false; + }, 60000); +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 598922bf..c2b161ab 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -268,6 +268,10 @@ antiAfk(globalData); import ammunation from './Interaction/ammunation/ammunation'; ammunation(globalData); +import spawnschutz from './Player/spawnschutz'; +spawnschutz(); + + require('./Gui/policedepartment'); require('./Gui/helptext'); require('./admin/spectate'); diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 369289c1..18983512 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,6 +1,7 @@ import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/nodm"; import polygons from "../polygons"; import { getWantedCount } from "../Gui/wanteds"; +import { spawnschutzEnabled } from "../Player/spawnschutz"; function isTargetInPolygon(pos): boolean { @@ -30,6 +31,10 @@ export default function weapondamageUtil() { if ((isTargetInPolygon(sourceEntity.position) || isInAnyNoDMPolygon) && getWantedCount() === 0) { return true; } + + if (spawnschutzEnabled) { + return true; + } }); mp.events.add("render", () => { From 253d982883f606c858a579268bbc3b2a161a451c Mon Sep 17 00:00:00 2001 From: kookroach Date: Thu, 22 Apr 2021 21:13:15 +0200 Subject: [PATCH 071/138] Change Wages on Pilot, Bus and RefuseCollector --- ReallifeGamemode.Server/Job/BusDriverJob.cs | 9 ++++++++- ReallifeGamemode.Server/Job/PilotJob.cs | 4 ++-- ReallifeGamemode.Server/Job/RefuseCollectorJob.cs | 10 ++++++---- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Server/Job/BusDriverJob.cs b/ReallifeGamemode.Server/Job/BusDriverJob.cs index 3eca5782..e6261780 100644 --- a/ReallifeGamemode.Server/Job/BusDriverJob.cs +++ b/ReallifeGamemode.Server/Job/BusDriverJob.cs @@ -35,7 +35,7 @@ namespace ReallifeGamemode.Server.Job public const int WAGE_BEGINNER = 400; public const int WAGE_INTERMEDIATE = 600; - public const int WAGE_PROFESSIOAL = 900; + public const int WAGE_PROFESSIOAL = 650; public const string BEGINNER = "Anfänger"; public const string INTERMEDIATE = "Fortgeschrittener"; @@ -617,11 +617,18 @@ namespace ReallifeGamemode.Server.Job return; if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_BEGINNER) + { payWage(player, BusDriverJob.WAGE_BEGINNER / BusDriverJob.playerRouteCurrent[player.Name].Count); + } else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_INTERMEDIATE) + { payWage(player, BusDriverJob.WAGE_INTERMEDIATE / BusDriverJob.playerRouteCurrent[player.Name].Count); + payWage(player, 0); + } else if (BusDriverJob.playerVehiclePair[player].Model is BusDriverJob.VEHICLE_PROFESSIONAL) + { payWage(player, BusDriverJob.WAGE_PROFESSIOAL / BusDriverJob.playerRouteCurrent[player.Name].Count); + } } public static void payWage(Player player, int wage) diff --git a/ReallifeGamemode.Server/Job/PilotJob.cs b/ReallifeGamemode.Server/Job/PilotJob.cs index f58fa5c4..98b5a729 100644 --- a/ReallifeGamemode.Server/Job/PilotJob.cs +++ b/ReallifeGamemode.Server/Job/PilotJob.cs @@ -25,7 +25,7 @@ namespace ReallifeGamemode.Server.Job public const string PROFESSIONAL = "Profi"; public const int WAGE_BEGINNER = 300; - public const int WAGE_INTERMEDIATE = 750; + public const int WAGE_INTERMEDIATE = 900; public const uint VEHICLE_BEGINNER = (uint)VehicleHash.Cuban800; public const uint VEHICLE_INTERMEDIATE = (uint)VehicleHash.Velum2; @@ -345,7 +345,7 @@ namespace ReallifeGamemode.Server.Job payWage(player, PilotJob.WAGE_INTERMEDIATE / PilotJob.playerRouteCurrent[player.Name].Count); } - private void payWage(Player player, int wage) + public void payWage(Player player, int wage) { using var dbContext = new DatabaseContext(); User user = player.GetUser(dbContext); diff --git a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs index e70a3720..651fe8e1 100644 --- a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs +++ b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs @@ -21,6 +21,8 @@ namespace ReallifeGamemode.Server.Job public override bool NeedVehicleToStart => false; private const int MAX_BAG = 40; + private const int WAGE = 80; + private const int BONUS = 10; public RefuseCollectorJob() { @@ -271,12 +273,12 @@ namespace ReallifeGamemode.Server.Job { if (target != null) { - user1.Wage += 25; - user2.Wage += 25; + user1.Wage += WAGE / 2; + user2.Wage += WAGE / 2; } else { - user1.Wage += 50; + user1.Wage += WAGE; } dbContext.SaveChanges(); } @@ -302,7 +304,7 @@ namespace ReallifeGamemode.Server.Job User user1 = player.GetUser(dbContext); User user2 = target.GetUser(dbContext); - int bonus = 5 * data.getTrashCount(); + int bonus = BONUS * data.getTrashCount(); if (target != null) { From 2b46b940cc2326d8d2c365ffc89e223c3dbf85c9 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 21:35:26 +0200 Subject: [PATCH 072/138] spawnschutz bei login, revive und spawn nach kh --- ReallifeGamemode.Client/Login/main.ts | 1 + ReallifeGamemode.Client/Player/spawnschutz.ts | 12 +++++++----- ReallifeGamemode.Client/util/weapondamage.ts | 8 +++++++- ReallifeGamemode.Server/Commands/FactionCommands.cs | 3 +++ ReallifeGamemode.Server/Events/Death.cs | 3 +++ 5 files changed, 21 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index e1ab88b7..5e0775dd 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -71,5 +71,6 @@ export default function (globalData: IGlobalData): void { mp.game.cam.renderScriptCams(false, false, 0, true, false); mp.events.call("toggleSpawnschutz", true); + mp.events.call("triggerSpawnschutzTimer"); }); } \ No newline at end of file diff --git a/ReallifeGamemode.Client/Player/spawnschutz.ts b/ReallifeGamemode.Client/Player/spawnschutz.ts index 8a6bf9bc..1639fc61 100644 --- a/ReallifeGamemode.Client/Player/spawnschutz.ts +++ b/ReallifeGamemode.Client/Player/spawnschutz.ts @@ -2,8 +2,10 @@ export default function spawnschutz() { - setInterval(() => { - mp.events.call("toggleSpawnschutz", false); - spawnschutzEnabled = false; - }, 60000); -} \ No newline at end of file + mp.events.add("triggerSpawnschutzTimer", () => { + var spawnschutzTimer = setTimeout(() => { + mp.events.call("toggleSpawnschutz", false); + spawnschutzEnabled = false; + }, 60000); + }); +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 18983512..555d4292 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -32,7 +32,13 @@ export default function weapondamageUtil() { return true; } - if (spawnschutzEnabled) { + if (spawnschutzEnabled && getWantedCount() === 0) { + return true; + } + }); + + mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + if (spawnschutzEnabled && getWantedCount() === 0) { return true; } }); diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index bf5b46ae..4abae4e5 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -426,6 +426,9 @@ namespace ReallifeGamemode.Server.Commands deadPlayer.SetData("isDead", false); deadPlayer.SetData("reviveSperre", 5); + deadPlayer.TriggerEvent("toggleSpawnschutz", true); + deadPlayer.TriggerEvent("triggerSpawnschutzTimer"); + dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome; User u; diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 90e92c2e..d260ea63 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -244,6 +244,9 @@ namespace ReallifeGamemode.Server.Events } player.SafeTeleport(new Vector3(-495.45, -336.33, 34.5), 0, true); + + player.TriggerEvent("toggleSpawnschutz", true); + player.TriggerEvent("triggerSpawnschutzTimer"); } } } From 4d40b3734c0843f9ee25adb84e9e9c9da566da50 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 21:45:41 +0200 Subject: [PATCH 073/138] spawnschutz fix --- ReallifeGamemode.Client/Login/main.ts | 3 +-- ReallifeGamemode.Client/Player/spawnschutz.ts | 7 +++++++ ReallifeGamemode.Server/Commands/FactionCommands.cs | 3 +-- ReallifeGamemode.Server/Events/Death.cs | 5 ++--- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index 5e0775dd..faf75835 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -70,7 +70,6 @@ export default function (globalData: IGlobalData): void { loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); - mp.events.call("toggleSpawnschutz", true); - mp.events.call("triggerSpawnschutzTimer"); + mp.events.call("enableSpawnschutz"); }); } \ No newline at end of file diff --git a/ReallifeGamemode.Client/Player/spawnschutz.ts b/ReallifeGamemode.Client/Player/spawnschutz.ts index 1639fc61..8fd01d34 100644 --- a/ReallifeGamemode.Client/Player/spawnschutz.ts +++ b/ReallifeGamemode.Client/Player/spawnschutz.ts @@ -2,6 +2,13 @@ export default function spawnschutz() { + mp.events.add("enableSpawnschutz", () => { + spawnschutzEnabled = true; + mp.events.call("toggleSpawnschutz", true); + mp.events.call("triggerSpawnschutzTimer"); + + }); + mp.events.add("triggerSpawnschutzTimer", () => { var spawnschutzTimer = setTimeout(() => { mp.events.call("toggleSpawnschutz", false); diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index 4abae4e5..f6ad5d2a 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -426,8 +426,7 @@ namespace ReallifeGamemode.Server.Commands deadPlayer.SetData("isDead", false); deadPlayer.SetData("reviveSperre", 5); - deadPlayer.TriggerEvent("toggleSpawnschutz", true); - deadPlayer.TriggerEvent("triggerSpawnschutzTimer"); + deadPlayer.TriggerEvent("enableSpawnschutz"); dbContext.Factions.Include(f => f.BankAccount).Where(f => f.Id == 2).First().BankAccount.Balance += Medic.ReviveIncome; diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index d260ea63..22b4a9c2 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -244,9 +244,8 @@ namespace ReallifeGamemode.Server.Events } player.SafeTeleport(new Vector3(-495.45, -336.33, 34.5), 0, true); - - player.TriggerEvent("toggleSpawnschutz", true); - player.TriggerEvent("triggerSpawnschutzTimer"); + + player.TriggerEvent("enableSpawnschutz"); } } } From 3e500f4caa30b392dbb711077352feb9efd2b6d5 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 21:49:50 +0200 Subject: [PATCH 074/138] spawnschutz nicht mit wanteds beim login --- ReallifeGamemode.Client/Login/main.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index faf75835..484033e5 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -1,8 +1,9 @@ /** * @overview Life of German Reallife - Login Main main.js - * @author VegaZ, hydrant + * @author VegaZ, hydrant, balbo * @copyright (c) 2008 - 2018 Life of German */ +import { getWantedCount } from "../Gui/wanteds"; export default function (globalData: IGlobalData): void { var loginBrowser: BrowserMp; @@ -70,6 +71,8 @@ export default function (globalData: IGlobalData): void { loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); - mp.events.call("enableSpawnschutz"); + if (getWantedCount() === 0) { + mp.events.call("enableSpawnschutz"); + } }); } \ No newline at end of file From 85c599b24ac8a5b003be3934ebd753536059d370 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 21:57:01 +0200 Subject: [PATCH 075/138] spawnschutz bei duty weg --- ReallifeGamemode.Client/Player/spawnschutz.ts | 8 +++++++- ReallifeGamemode.Server/Events/Key.cs | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/spawnschutz.ts b/ReallifeGamemode.Client/Player/spawnschutz.ts index 8fd01d34..848d7c93 100644 --- a/ReallifeGamemode.Client/Player/spawnschutz.ts +++ b/ReallifeGamemode.Client/Player/spawnschutz.ts @@ -1,4 +1,5 @@ export let spawnschutzEnabled = true; +var spawnschutzTimer; export default function spawnschutz() { @@ -6,11 +7,16 @@ export default function spawnschutz() { spawnschutzEnabled = true; mp.events.call("toggleSpawnschutz", true); mp.events.call("triggerSpawnschutzTimer"); + }); + mp.events.add("abortSpawnschutz", () => { + spawnschutzEnabled = false; + mp.events.call("toggleSpawnschutz", false); + clearInterval(spawnschutzTimer); }); mp.events.add("triggerSpawnschutzTimer", () => { - var spawnschutzTimer = setTimeout(() => { + spawnschutzTimer = setTimeout(() => { mp.events.call("toggleSpawnschutz", false); spawnschutzEnabled = false; }, 60000); diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index ed27acef..581db2c8 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -308,6 +308,7 @@ namespace ReallifeGamemode.Server.Events user.SetData("duty", true); player.SendNotification("Du bist nun ~g~im Dienst."); player.TriggerEvent("toggleDutyMode", true); + player.TriggerEvent("abortSpawnschutz"); if (player.GetUser().FactionId == 2) //Fire Department { Medic.UpdateDutyMedics(); From cfd7b61d5567d8fc48d461c6972951c71b296ac6 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 22:04:50 +0200 Subject: [PATCH 076/138] spawnschutz fix mit wanteds --- ReallifeGamemode.Client/Login/main.ts | 4 ---- ReallifeGamemode.Server/Events/Login.cs | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ReallifeGamemode.Client/Login/main.ts b/ReallifeGamemode.Client/Login/main.ts index 484033e5..739d77f9 100644 --- a/ReallifeGamemode.Client/Login/main.ts +++ b/ReallifeGamemode.Client/Login/main.ts @@ -70,9 +70,5 @@ export default function (globalData: IGlobalData): void { globalData.InMenu = false; loginCam.setActive(false); mp.game.cam.renderScriptCams(false, false, 0, true, false); - - if (getWantedCount() === 0) { - mp.events.call("enableSpawnschutz"); - } }); } \ No newline at end of file diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 197ccbdc..62d21e39 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -103,6 +103,11 @@ namespace ReallifeGamemode.Server.Events ChatService.HQMessage("Der Straftäter" + user.Name + " hat sich mit " + user.Wanteds + " Wanteds eingeloggt."); } + if (user.Wanteds == 0) + { + player.TriggerEvent("enableSpawnschutz"); + } + if (user.Group != null) { string msg = $"{player.Name} ist wieder online."; From 2ab112795ac6f708edb8b1df0a9bc5a8d369e0d8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 22 Apr 2021 22:09:26 +0200 Subject: [PATCH 077/138] spawnschutz weg wenn tot --- ReallifeGamemode.Server/Events/Death.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 22b4a9c2..cb2cf4a2 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -48,6 +48,7 @@ namespace ReallifeGamemode.Server.Events User user = player.GetUser(dbContext); PositionManager.cuffPoints.Remove(player); + player.TriggerEvent("abortSpawnschutz"); //TODO: Zum Full Release entfernen if (player.HasData("togdeath")) From be45a571c63a5504f566983e0667d698cb91df99 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 23:06:00 +0200 Subject: [PATCH 078/138] AC: Raus mit No-Reload --- ReallifeGamemode.Client/admin/anticheat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index 44807c32..f482802f 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -62,7 +62,7 @@ mp.events.callRemote("CLIENT:CheatDetection", "Unallowed Weapon", Behaviour.weapon) } if (Behaviour.reloadingWeapon) { - mp.events.callRemote("CLIENT:CheatDetection", "No Reload") + //mp.events.callRemote("CLIENT:CheatDetection", "No Reload") Behaviour.resetWeapon() } Behaviour.updateMagSize() From 9619723d43914aa2248afcb90a8997613bcc485f Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 23:06:21 +0200 Subject: [PATCH 079/138] fix busfahrer --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index 7ef6fb35..91e9456f 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -31,7 +31,6 @@ export default function busRouteList(globalData: IGlobalData) { if (!globalData.InMenu) { globalData.InMenu = true; - mp.gui.cursor.show(true, true); skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"]; routeMenu = new Menu("Bus Job", "", new Point(0, screenRes.y / 3), null, null); @@ -80,7 +79,6 @@ export default function busRouteList(globalData: IGlobalData) { mp.events.callRemote("CLIENT:Job_StopJob"); } routeSelected = false; - mp.gui.cursor.show(true, true); globalData.InMenu = false; }); From 4e4498e2e9156e24021546007979e5440b2cc7af Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 23:06:30 +0200 Subject: [PATCH 080/138] fix handsup --- ReallifeGamemode.Client/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index c2b161ab..0ec8ef2d 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -268,6 +268,9 @@ antiAfk(globalData); import ammunation from './Interaction/ammunation/ammunation'; ammunation(globalData); +import handsup from './Player/handsup'; +handsup(); + import spawnschutz from './Player/spawnschutz'; spawnschutz(); From a59e494753b6ce6e23a0fee392436b1f40753bf6 Mon Sep 17 00:00:00 2001 From: hydrant Date: Thu, 22 Apr 2021 23:22:07 +0200 Subject: [PATCH 081/138] =?UTF-8?q?/POSITION=20F=C3=9CR=20ALLE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index bc191b5c..abed1c22 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -165,12 +165,6 @@ namespace ReallifeGamemode.Server.Commands [Command("position", "~m~Benutzung: ~s~/position")] public void CmdAdminPosition(Player player) { - if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - ChatService.SendMessage(player, "Position: X Y Z: " + player.Position + " Richtung: " + player.Heading); } From d2486c78159d2e7ed0162742beecf7cbd567e952 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Thu, 22 Apr 2021 23:31:07 +0200 Subject: [PATCH 082/138] =?UTF-8?q?Fraktionsfahrzeugverkaufsbest=C3=A4tigu?= =?UTF-8?q?ng=20eingebaut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Events/Key.cs | 5 +- .../Managers/InteractionManager.cs | 49 ++++++++++++------- 2 files changed, 34 insertions(+), 20 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Key.cs b/ReallifeGamemode.Server/Events/Key.cs index 581db2c8..f15ad483 100644 --- a/ReallifeGamemode.Server/Events/Key.cs +++ b/ReallifeGamemode.Server/Events/Key.cs @@ -628,10 +628,9 @@ namespace ReallifeGamemode.Server.Events if(player.GetData("SellVehicleDecision") == true && player.HasData("VehicleToSell")) { - InteractionManager.SellPlayerVehicle(player, player.GetData("VehicleToSell")); + InteractionManager.SellServerVehicle(player, player.GetData("VehicleToSell")); player.ResetData("SellVehicleDecision"); - player.ResetData("VehicleToSell"); - player.SendNotification("~g~Du hast dein Fahrzeug verkauft"); + player.ResetData("VehicleToSell"); return; } diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 6bff91b8..8edca1f7 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -479,21 +479,39 @@ namespace ReallifeGamemode.Server.Managers } } - public static void SellPlayerVehicle(Player player, int id) + public static void SellServerVehicle(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; + ServerVehicle serverVehicle = dbContext.ServerVehicles.FirstOrDefault(v => v.Id == id); + + if(serverVehicle is UserVehicle) + { + UserVehicle 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."); + ChatService.SendMessage(player, $"~b~[INFO]~s~ Du hast durch den Autoverkauf ~g~{backPrice.ToMoneyString()}~s~ erhalten."); - VehicleManager.DeleteVehicle(veh); + VehicleManager.DeleteVehicle(veh); + dbContext.UserVehicles.Remove(userVehicle); + player.SendNotification("~g~Du hast dein Fahrzeug verkauft"); + } + else if(serverVehicle is FactionVehicle) + { + FactionVehicle factionVehicle = dbContext.FactionVehicles.FirstOrDefault(v => v.Id == id); + var backPrice = (int)(factionVehicle.BuyPrice * 1.5 * 0.4); + user.Faction.BankAccount.Balance += backPrice; - dbContext.UserVehicles.Remove(userVehicle); + ChatService.SendMessage(player, $"~b~[INFO]~s~ Die Fraktionskasse hat ~g~{backPrice.ToMoneyString()}~s~ erhalten."); + + VehicleManager.DeleteVehicle(VehicleManager.GetVehicleFromServerVehicle(factionVehicle)); + + dbContext.FactionVehicles.Remove(factionVehicle); + player.SendNotification("~g~Du hast dein Fraktionsfahrzeug verkauft"); + } dbContext.SaveChanges(); } @@ -546,16 +564,13 @@ namespace ReallifeGamemode.Server.Managers ChatService.ErrorMessage(player, "Das Fahrzeug konnte nicht verkauft werden. Bitte melde dich bei der Leaderverwaltung"); return; } + + var backPrice = (int)(price.Price * 1.5 * 0.4); - user.Faction.BankAccount.Balance += backPrice; - - ChatService.SendMessage(player, $"~b~[INFO]~s~ Die Fraktionskasse ~g~{backPrice.ToMoneyString()}~s~ erhalten."); - - VehicleManager.DeleteVehicle(veh); - - dbContext.FactionVehicles.Remove(factionVehicle); - dbContext.SaveChanges(); + 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"); } } From ad69424fc6e8fa28a49c2a0c3d37bacd4b3a45d3 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Thu, 22 Apr 2021 23:44:59 +0200 Subject: [PATCH 083/138] =?UTF-8?q?Fraktionsfahrzeugverkauf=20Abfrage=20wi?= =?UTF-8?q?rd=20jetzt=20richtig=20gez=C3=A4hlt=20<=3D6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Managers/InteractionManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 8edca1f7..4c1114e3 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -551,7 +551,7 @@ namespace ReallifeGamemode.Server.Managers return; } - var factionVehicleCount = dbContext.FactionVehicles.ToList().Where(v => v.Id == id && v.GetOwners().Contains(user.FactionId.Value)).Count(); + var factionVehicleCount = dbContext.FactionVehicles.ToList().Where(v => v.GetOwners().Contains(user.FactionId.Value)).Count(); if (factionVehicleCount <= 6) { ChatService.ErrorMessage(player, "Die Fraktion braucht mindestens 6 Fahrzeuge"); From eba9833ecd293056367bc95bcf3f5a87b742cb3a Mon Sep 17 00:00:00 2001 From: VegaZ Date: Fri, 23 Apr 2021 00:01:42 +0200 Subject: [PATCH 084/138] Delete Heal-Tasks older than 10 minutes --- ReallifeGamemode.Server/Factions/Medic/Medic.cs | 15 +++++++++++++++ ReallifeGamemode.Server/Util/ThreadTimers.cs | 1 + 2 files changed, 16 insertions(+) diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index 50ef6941..115f5ef8 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -195,6 +195,21 @@ namespace ReallifeGamemode.Server.Factions.Medic } } + public static void RemoveOldHealTask() + { + if (HealTasks.Count != 0) + { + foreach (var task in HealTasks) + { + var taskActive = Math.Abs((int)(((DateTimeOffset)new DateTime()).ToUnixTimeSeconds() - ((DateTimeOffset)task.Time).ToUnixTimeSeconds())); + if (taskActive > 60000) + { + delHealTask(PlayerService.GetPlayerByNameOrId(task.Victim)); + } + } + } + } + [RemoteEvent("loadMedicTasks")] public void LoadMedicTasks(Player player, int type) { diff --git a/ReallifeGamemode.Server/Util/ThreadTimers.cs b/ReallifeGamemode.Server/Util/ThreadTimers.cs index f0b2a057..7b5db17b 100644 --- a/ReallifeGamemode.Server/Util/ThreadTimers.cs +++ b/ReallifeGamemode.Server/Util/ThreadTimers.cs @@ -74,6 +74,7 @@ namespace ReallifeGamemode.Server.Util Economy.Timer_Elapsed(); WeaponDealManager.Timer_Elapsed(); Medic.UpdateReviveSperre(); + Medic.RemoveOldHealTask(); }); } From 7c6217e63fa95c14fce95aae4a7a1e291d3130b0 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Fri, 23 Apr 2021 20:18:57 +0200 Subject: [PATCH 085/138] Fix Medic Task Timing --- ReallifeGamemode.Server/Factions/Medic/Medic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index 115f5ef8..91fe3eb9 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -202,7 +202,7 @@ namespace ReallifeGamemode.Server.Factions.Medic foreach (var task in HealTasks) { var taskActive = Math.Abs((int)(((DateTimeOffset)new DateTime()).ToUnixTimeSeconds() - ((DateTimeOffset)task.Time).ToUnixTimeSeconds())); - if (taskActive > 60000) + if (taskActive > 600) { delHealTask(PlayerService.GetPlayerByNameOrId(task.Victim)); } From 236f5db9ea9ae17245341faa2faf744ab4ea837c Mon Sep 17 00:00:00 2001 From: hydrant Date: Fri, 23 Apr 2021 23:23:14 +0200 Subject: [PATCH 086/138] Try: fix medic task? --- ReallifeGamemode.Server/Factions/Medic/Medic.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index 91fe3eb9..470850f2 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -201,8 +201,8 @@ namespace ReallifeGamemode.Server.Factions.Medic { foreach (var task in HealTasks) { - var taskActive = Math.Abs((int)(((DateTimeOffset)new DateTime()).ToUnixTimeSeconds() - ((DateTimeOffset)task.Time).ToUnixTimeSeconds())); - if (taskActive > 600) + var taskActive = DateTime.Now - task.Time; + if (taskActive > TimeSpan.FromMinutes(-10) && task.MedicName == "none") { delHealTask(PlayerService.GetPlayerByNameOrId(task.Victim)); } From 143ba81717ebb0854ce21f8b24e6adaa72ac52c9 Mon Sep 17 00:00:00 2001 From: hydrant Date: Fri, 23 Apr 2021 23:25:37 +0200 Subject: [PATCH 087/138] Handsup check: remove debug msg --- ReallifeGamemode.Client/Player/handsup.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/ReallifeGamemode.Client/Player/handsup.ts b/ReallifeGamemode.Client/Player/handsup.ts index ca29ae5f..812689e5 100644 --- a/ReallifeGamemode.Client/Player/handsup.ts +++ b/ReallifeGamemode.Client/Player/handsup.ts @@ -4,8 +4,6 @@ var isStopped = player.isStopped(); - mp.gui.chat.push("isStopped = " + isStopped); - if (isStopped) { mp.events.callRemote("CLIENT:Handsup_TogglePlayerHup"); } From e4d54e2c2350908ff90bdc23b7e2a1eab9c73877 Mon Sep 17 00:00:00 2001 From: hydrant Date: Fri, 23 Apr 2021 23:29:36 +0200 Subject: [PATCH 088/138] Medic: Fix delete old task --- ReallifeGamemode.Server/Factions/Medic/Medic.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Factions/Medic/Medic.cs b/ReallifeGamemode.Server/Factions/Medic/Medic.cs index 470850f2..1bc98dcd 100644 --- a/ReallifeGamemode.Server/Factions/Medic/Medic.cs +++ b/ReallifeGamemode.Server/Factions/Medic/Medic.cs @@ -199,10 +199,10 @@ namespace ReallifeGamemode.Server.Factions.Medic { if (HealTasks.Count != 0) { - foreach (var task in HealTasks) + foreach (var task in HealTasks.ToList()) { var taskActive = DateTime.Now - task.Time; - if (taskActive > TimeSpan.FromMinutes(-10) && task.MedicName == "none") + if (taskActive > TimeSpan.FromMinutes(10) && task.MedicName == "none") { delHealTask(PlayerService.GetPlayerByNameOrId(task.Victim)); } From 9028cd974813cc335269d2183da11215277b95ce Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 00:36:36 +0200 Subject: [PATCH 089/138] /help: skill entfernt, report rein --- ReallifeGamemode.Server/Commands/UserCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 7b4bc1c7..1afc483c 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -120,7 +120,7 @@ namespace ReallifeGamemode.Server.Commands } [Command("help", "~m~Benutzung: ~s~/help")] - public void CmdHelp(Player player) + public void CmdUserHelp(Player player) { player.SendChatMessage("E - Interagieren (ATM, Türen, Shops, Friseur etc."); player.SendChatMessage("M - Interaktionsmenü öffnen und schließen"); @@ -129,7 +129,7 @@ namespace ReallifeGamemode.Server.Commands player.SendChatMessage("O - Onlineliste öffnen / schließen"); player.SendChatMessage("I - Inventar öffnen / schließen"); player.SendChatMessage("F4 - Mikrofon an/aus schalten"); - player.SendChatMessage("/skill - Skillpunkte anzeigen"); + player.SendChatMessage("/report - Support-Anfrage"); } [Command("hup")] From fc9ad0a095cb5859491b3749056e66dbc6ad5c84 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 23 Apr 2021 22:45:29 +0000 Subject: [PATCH 090/138] =?UTF-8?q?Leerzeichen=20bei=20Medic-String=20im?= =?UTF-8?q?=20DeathScreen=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Gui/deathscreen.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/deathscreen.ts b/ReallifeGamemode.Client/Gui/deathscreen.ts index 8374bd18..32826cce 100644 --- a/ReallifeGamemode.Client/Gui/deathscreen.ts +++ b/ReallifeGamemode.Client/Gui/deathscreen.ts @@ -1,4 +1,4 @@ -/** +/** * @overview Life of German Reallife - Gui Infobox infobox.js * @author VegaZ * @copyright (c) 2008 - 2018 Life of German @@ -68,7 +68,7 @@ export default function deathScreen() { var medicString; if (dutyMedics > 0) { - medicString = "Das L.S.E.D. wurde benachrichtigt\nDerzeit"; + medicString = "Das L.S.E.D. wurde benachrichtigt\nDerzeit "; if (dutyMedics === 1) { medicString += "befindet sich ~g~" + dutyMedics + " Mitglied"; } else { @@ -108,4 +108,4 @@ export default function deathScreen() { } } }); -} \ No newline at end of file +} From a1f4ffeee3404d3bd00b1097f08b5198cfa68a2f Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 00:49:52 +0200 Subject: [PATCH 091/138] AFK Range 1.5 --- ReallifeGamemode.Client/Player/antiafk.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/antiafk.ts b/ReallifeGamemode.Client/Player/antiafk.ts index 28960330..229cd705 100644 --- a/ReallifeGamemode.Client/Player/antiafk.ts +++ b/ReallifeGamemode.Client/Player/antiafk.ts @@ -17,7 +17,7 @@ let distance = mp.game.gameplay.getDistanceBetweenCoords(lp.x, lp.y, lp.z, np.x, np.y, np.z, false); - if (distance <= 3) { + if (distance <= 1.5) { if (!afkStatus) { afkCounter++; } From aa041a2bb725d350c700171517165da7a03f7c88 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 01:05:06 +0200 Subject: [PATCH 092/138] controller aimbot --- ReallifeGamemode.Client/admin/anticheat.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index f482802f..c9e8a8f2 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -182,9 +182,24 @@ var Behaviour = new PlayerBehaviour() var loop = Behaviour.secs() + function isUsingController() { + return !mp.game.controls.isInputDisabled(0); + } + mp.events.add("render", () => { mp.game.player.setHealthRechargeMultiplier(0); + if (isUsingController()) { + mp.game.controls.disableControlAction(32, 24, true); + mp.game.controls.disableControlAction(32, 25, true); + + mp.game.controls.disableControlAction(32, 91, true); + mp.game.controls.disableControlAction(32, 92, true); + + mp.game.controls.disableControlAction(32, 69, true); + mp.game.controls.disableControlAction(32, 70, true); + } + Behaviour.health = Number(mp.players.local.getHealth()) + Number(mp.players.local.getArmour()) if (loop < Behaviour.secs()) { if (Behaviour.active) { From 0d3ea45f3e60bda64d663c59858fd850369f0bfb Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 01:16:31 +0200 Subject: [PATCH 093/138] =?UTF-8?q?Bank:=20Fix=20mehrfach=20=C3=BCberweise?= =?UTF-8?q?n=20pro=20payday?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Bank/bank.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs index 1781103e..6b2788d8 100644 --- a/ReallifeGamemode.Server/Bank/bank.cs +++ b/ReallifeGamemode.Server/Bank/bank.cs @@ -151,7 +151,7 @@ namespace ReallifeGamemode.Server.Bank { player.SendNotification($"~w~Du hast {target.Name} $~g~{amount} ~w~Überwiesen."); player.GetUser(dbContext).BankAccount.Balance -= (int)(amount * 1.05); - target.GetUser(dbContext).otheramount = amount; + target.GetUser(dbContext).otheramount += amount; dbContext.SaveChanges(); } } @@ -203,7 +203,7 @@ namespace ReallifeGamemode.Server.Bank { player.SendNotification($"~w~Du hast {target.Name} $~g~{amount} ~w~Überwiesen."); player.GetUser(dbContext).Faction.BankAccount.Balance -= (int)(amount * 1.05); - target.GetUser(dbContext).otheramount = amount; + target.GetUser(dbContext).otheramount += amount; dbContext.SaveChanges(); } } From 3687f88a5dba8c08e1e8916577ac37a5c2afb20b Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 01:20:55 +0200 Subject: [PATCH 094/138] temp disable anti controller aimbot --- ReallifeGamemode.Client/admin/anticheat.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index c9e8a8f2..e62c9d4d 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -189,16 +189,16 @@ mp.events.add("render", () => { mp.game.player.setHealthRechargeMultiplier(0); - if (isUsingController()) { - mp.game.controls.disableControlAction(32, 24, true); - mp.game.controls.disableControlAction(32, 25, true); + //if (isUsingController()) { + // mp.game.controls.disableControlAction(32, 24, true); + // mp.game.controls.disableControlAction(32, 25, true); - mp.game.controls.disableControlAction(32, 91, true); - mp.game.controls.disableControlAction(32, 92, true); + // mp.game.controls.disableControlAction(32, 91, true); + // mp.game.controls.disableControlAction(32, 92, true); - mp.game.controls.disableControlAction(32, 69, true); - mp.game.controls.disableControlAction(32, 70, true); - } + // mp.game.controls.disableControlAction(32, 69, true); + // mp.game.controls.disableControlAction(32, 70, true); + //} Behaviour.health = Number(mp.players.local.getHealth()) + Number(mp.players.local.getArmour()) if (loop < Behaviour.secs()) { From 01b30837479f132984bdc61df5f46d76802754b8 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 01:22:05 +0200 Subject: [PATCH 095/138] busfahrer dont allow move when in route selection --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 5 +++-- ReallifeGamemode.Client/global.d.ts | 1 + ReallifeGamemode.Client/index.ts | 8 ++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index 91e9456f..db3ebbe9 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -30,6 +30,7 @@ export default function busRouteList(globalData: IGlobalData) { skill = jobskill; if (!globalData.InMenu) { globalData.InMenu = true; + globalData.BlockMovement = true; skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"]; @@ -70,7 +71,6 @@ export default function busRouteList(globalData: IGlobalData) { } else if (item.Text === "Abbrechen") { mp.events.callRemote("CLIENT:Job_StopJob"); routeMenu.Close(); - globalData.InMenu = false; } }); @@ -79,7 +79,8 @@ export default function busRouteList(globalData: IGlobalData) { mp.events.callRemote("CLIENT:Job_StopJob"); } routeSelected = false; - + + globalData.BlockMovement = false; globalData.InMenu = false; }); } diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index dfd560c5..482cae5c 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -5,6 +5,7 @@ InChat: boolean, LoggedIn: boolean, IsAfk: boolean, + BlockMovement: boolean; } declare type AccountData = { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 0ec8ef2d..87a703a7 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -15,6 +15,7 @@ let globalData: IGlobalData = { InChat: false, LoggedIn: false, IsAfk: false, + BlockMovement: false, get InMenu(): boolean { return inMenu; @@ -26,6 +27,13 @@ let globalData: IGlobalData = { } }; +mp.events.add(RageEnums.EventKey.RENDER, (nametags) => { + if (globalData.BlockMovement) { + mp.game.controls.disableAllControlActions(0); + mp.game.controls.disableAllControlActions(27); + } +}); + const game: IGame = new RageGame(); export default game; export { From 198de036cf29aeb4d39521a5ec7bde1cbc6466f3 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 01:26:17 +0200 Subject: [PATCH 096/138] Anti controller aimbot funktioniert --- ReallifeGamemode.Client/admin/anticheat.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index e62c9d4d..c9e8a8f2 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -189,16 +189,16 @@ mp.events.add("render", () => { mp.game.player.setHealthRechargeMultiplier(0); - //if (isUsingController()) { - // mp.game.controls.disableControlAction(32, 24, true); - // mp.game.controls.disableControlAction(32, 25, true); + if (isUsingController()) { + mp.game.controls.disableControlAction(32, 24, true); + mp.game.controls.disableControlAction(32, 25, true); - // mp.game.controls.disableControlAction(32, 91, true); - // mp.game.controls.disableControlAction(32, 92, true); + mp.game.controls.disableControlAction(32, 91, true); + mp.game.controls.disableControlAction(32, 92, true); - // mp.game.controls.disableControlAction(32, 69, true); - // mp.game.controls.disableControlAction(32, 70, true); - //} + mp.game.controls.disableControlAction(32, 69, true); + mp.game.controls.disableControlAction(32, 70, true); + } Behaviour.health = Number(mp.players.local.getHealth()) + Number(mp.players.local.getArmour()) if (loop < Behaviour.secs()) { From c9b255ee977f0ff17be88de58c3e2d820c28fc7e Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 02:07:29 +0200 Subject: [PATCH 097/138] temp disable anticheat --- ReallifeGamemode.Client/admin/anticheat.ts | 2 +- ReallifeGamemode.Client/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index c9e8a8f2..aa299629 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -32,7 +32,7 @@ }); mp.events.add("client:checkInvincible", () => { - if (mp.players.local.dimension == 0) return + //if (mp.players.local.dimension == 0) return if (!Behaviour.active) return var healthBefore = Behaviour.health mp.players.local.applyDamageTo(1, true); diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 87a703a7..df86eaee 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -268,7 +268,7 @@ import animationSync from './util/animationSync'; animationSync(); import antiCheat from './admin/anticheat'; -antiCheat(globalData); +//antiCheat(globalData); import antiAfk from './Player/antiafk'; antiAfk(globalData); From d3575c6c5ce8097c603ab092e6e9c14ddeb1dc14 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 02:20:07 +0200 Subject: [PATCH 098/138] reenable anticheat --- ReallifeGamemode.Client/index.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index df86eaee..91a6c584 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -29,8 +29,13 @@ let globalData: IGlobalData = { mp.events.add(RageEnums.EventKey.RENDER, (nametags) => { if (globalData.BlockMovement) { - mp.game.controls.disableAllControlActions(0); - mp.game.controls.disableAllControlActions(27); + mp.game.controls.disableControlAction(32, 23, true); + mp.game.controls.disableControlAction(32, 75, true); + + mp.game.controls.disableControlAction(32, 32, true); + mp.game.controls.disableControlAction(32, 33, true); + mp.game.controls.disableControlAction(32, 34, true); + mp.game.controls.disableControlAction(32, 35, true); } }); @@ -268,7 +273,7 @@ import animationSync from './util/animationSync'; animationSync(); import antiCheat from './admin/anticheat'; -//antiCheat(globalData); +antiCheat(globalData); import antiAfk from './Player/antiafk'; antiAfk(globalData); From bc2975b49029f766092892fb1910d4d89e6d40a7 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 02:43:14 +0200 Subject: [PATCH 099/138] BusDriver: Fix tp hack --- ReallifeGamemode.Client/Jobs/BusRouteSelect.ts | 15 +++++++++++---- ReallifeGamemode.Client/admin/anticheat.ts | 6 +++--- ReallifeGamemode.Client/global.d.ts | 1 - ReallifeGamemode.Client/index.ts | 13 ------------- 4 files changed, 14 insertions(+), 21 deletions(-) diff --git a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts index db3ebbe9..c5c33244 100644 --- a/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts +++ b/ReallifeGamemode.Client/Jobs/BusRouteSelect.ts @@ -19,18 +19,27 @@ let cancelItem = new UIMenuItem("Abbrechen", ""); cancelItem.BackColor = new Color(213, 0, 0); cancelItem.HighlightedBackColor = new Color(229, 57, 53); +var routeMenu: NativeUI.Menu; +var busRouteSelectColShape = mp.colshapes.newCircle(-535, -2144, 2.5); + export default function busRouteList(globalData: IGlobalData) { - var routeMenu: NativeUI.Menu; var skillSelect; var routeSelect; var skill = 0; var routeSelected = false; + mp.events.add(RageEnums.EventKey.PLAYER_EXIT_COLSHAPE, (colshape) => { + if (colshape == busRouteSelectColShape) { + if (routeMenu && routeMenu.Visible) { + routeMenu.Close(); + } + } + }); + mp.events.add('SERVER:StartBusJob', (jobskill) => { skill = jobskill; if (!globalData.InMenu) { globalData.InMenu = true; - globalData.BlockMovement = true; skillSelect = ["Anfänger", "Fortgeschrittener", "Profi"]; @@ -69,7 +78,6 @@ export default function busRouteList(globalData: IGlobalData) { } else if (item.Text === "Abbrechen") { - mp.events.callRemote("CLIENT:Job_StopJob"); routeMenu.Close(); } }); @@ -80,7 +88,6 @@ export default function busRouteList(globalData: IGlobalData) { } routeSelected = false; - globalData.BlockMovement = false; globalData.InMenu = false; }); } diff --git a/ReallifeGamemode.Client/admin/anticheat.ts b/ReallifeGamemode.Client/admin/anticheat.ts index aa299629..b7d0a03f 100644 --- a/ReallifeGamemode.Client/admin/anticheat.ts +++ b/ReallifeGamemode.Client/admin/anticheat.ts @@ -49,9 +49,9 @@ }, 500); }) - setInterval(() => { - mp.events.call("client:checkInvincible") - }, 30000); + //setInterval(() => { + // mp.events.call("client:checkInvincible") + //}, 30000); mp.events.add('SERVER:AntiCheat:weaponSwap', () => { Behaviour.resetWeapon() diff --git a/ReallifeGamemode.Client/global.d.ts b/ReallifeGamemode.Client/global.d.ts index 482cae5c..dfd560c5 100644 --- a/ReallifeGamemode.Client/global.d.ts +++ b/ReallifeGamemode.Client/global.d.ts @@ -5,7 +5,6 @@ InChat: boolean, LoggedIn: boolean, IsAfk: boolean, - BlockMovement: boolean; } declare type AccountData = { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 91a6c584..0ec8ef2d 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -15,7 +15,6 @@ let globalData: IGlobalData = { InChat: false, LoggedIn: false, IsAfk: false, - BlockMovement: false, get InMenu(): boolean { return inMenu; @@ -27,18 +26,6 @@ let globalData: IGlobalData = { } }; -mp.events.add(RageEnums.EventKey.RENDER, (nametags) => { - if (globalData.BlockMovement) { - mp.game.controls.disableControlAction(32, 23, true); - mp.game.controls.disableControlAction(32, 75, true); - - mp.game.controls.disableControlAction(32, 32, true); - mp.game.controls.disableControlAction(32, 33, true); - mp.game.controls.disableControlAction(32, 34, true); - mp.game.controls.disableControlAction(32, 35, true); - } -}); - const game: IGame = new RageGame(); export default game; export { From d10695fc22af22b60f753ff157e3cbfeb45fb65d Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 02:49:32 +0200 Subject: [PATCH 100/138] Fix inventar cooldown --- .../Inventory/Items/ConsumableItem.cs | 10 +++++----- ReallifeGamemode.Server/Managers/InventoryManager.cs | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs b/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs index 076b28cd..d5a96232 100644 --- a/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs +++ b/ReallifeGamemode.Server/Inventory/Items/ConsumableItem.cs @@ -30,14 +30,14 @@ namespace ReallifeGamemode.Server.Inventory.Items if (!HasCooldownElapsed(user)) { - DateTime time = InventoryManager.itemCooldown[user]; + DateTime time = InventoryManager.itemCooldown[user.Id]; int timeUntillNextUse = (int)(time - DateTime.Now).TotalSeconds; uItem.GetUser().Player.TriggerEvent("Error", $"Versuche es nach {timeUntillNextUse} Sekunden erneut."); return false; } DateTime cooldown = DateTime.Now.AddMilliseconds(Cooldown); - InventoryManager.itemCooldown.Add(user, cooldown); + InventoryManager.itemCooldown.Add(user.Id, cooldown); Consume(uItem); return true; @@ -48,13 +48,13 @@ namespace ReallifeGamemode.Server.Inventory.Items if (user.Player == null || !user.Player.IsLoggedIn()) return false; - if (!InventoryManager.itemCooldown.ContainsKey(user)) + if (!InventoryManager.itemCooldown.ContainsKey(user.Id)) return true; - int timeRemaining = (int)(InventoryManager.itemCooldown[user] - DateTime.Now).TotalSeconds; + int timeRemaining = (int)(InventoryManager.itemCooldown[user.Id] - DateTime.Now).TotalSeconds; if (timeRemaining <= 0) - InventoryManager.itemCooldown.Remove(user); + InventoryManager.itemCooldown.Remove(user.Id); return timeRemaining <= 0; } diff --git a/ReallifeGamemode.Server/Managers/InventoryManager.cs b/ReallifeGamemode.Server/Managers/InventoryManager.cs index 42953d00..d20a69b8 100644 --- a/ReallifeGamemode.Server/Managers/InventoryManager.cs +++ b/ReallifeGamemode.Server/Managers/InventoryManager.cs @@ -34,7 +34,7 @@ namespace ReallifeGamemode.Server.Managers public static Dictionary> backpackItems { get; set; } = new Dictionary>(); public static Dictionary> vehicleItems { get; set; } = new Dictionary>(); - public static Dictionary itemCooldown = new Dictionary(); + public static Dictionary itemCooldown = new Dictionary(); public class InventoryItem { From 819e2f389d2c2d7c7d7ae5e057c98a9abc65f0cd Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 11:09:33 +0000 Subject: [PATCH 101/138] =?UTF-8?q?Anpassungen=20an=20Online-Liste=20(Stat?= =?UTF-8?q?istik=20nach=20oben,=20Tabelle=20h=C3=B6her=20und=20Sortierung?= =?UTF-8?q?=20hinzugef=C3=BCgt)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../assets/css/onlinelist/style.css | 34 ++++++++-------- .../assets/css/onlinelist/style.css.map | 4 +- .../assets/css/onlinelist/style.scss | 27 +++++++------ .../assets/html/onlinelist/index.html | 39 +++++++++---------- .../assets/js/onlinelist/script.js | 36 +++++++++++++++-- 5 files changed, 84 insertions(+), 56 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css b/ReallifeGamemode.Client/assets/css/onlinelist/style.css index 28dd56ed..668595aa 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css @@ -19,8 +19,8 @@ html, body { } body { - margin: 15vh auto 0; - width: 32vw; + margin: 10vh auto 0; + width: 35vw; color: white; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; font-size: 1em; @@ -49,13 +49,23 @@ h2 { -webkit-box-align: start; -ms-flex-align: start; align-items: flex-start; - margin-bottom: 1.5em; + margin-bottom: 1em; padding: 1em 1em 0; } +.factions { + position: -webkit-sticky; + position: sticky; + top: 0; + z-index: 3; + padding: 1em 0; + background-color: #404040; + font-size: .9em; +} + .wrapper { - min-height: 50vh; - max-height: 70vh; + min-height: 60vh; + max-height: 80vh; overflow-y: scroll; border-radius: .25em; background-color: rgba(0, 0, 0, 0.75); @@ -74,7 +84,7 @@ table { table th { position: -webkit-sticky; position: sticky; - top: 0; + top: 3em; text-align: left; z-index: 2; background-color: black; @@ -203,18 +213,6 @@ ol.inline.stats { 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; } diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map index 74b823b9..948e65a4 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map @@ -1,9 +1,9 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EACH,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,WAAW;EACvB,WAAW,EAAE,IAAI;CAClB;;AAED,AAAA,IAAI,EAAE,IAAI,CAAC;EAAE,MAAM,EAAE,KAAK;CAAI;;AAC9B,AAAA,CAAC,EAAE,CAAC,AAAA,OAAO,EAAE,CAAC,AAAA,MAAM,CAAC;EAAE,UAAU,EAAE,OAAO;CAAI;;AAE9C,AAAA,IAAI,CAAC;EACH,MAAM,EAAE,WAAW;EAEnB,KAAK,EAAE,IAAI;EACX,KAAK,EAAE,KAAK;EAEZ,WAAW,EAAE,oIAAoI;EACjJ,SAAS,EAAE,GAAG;CACf;;AAED,AAAA,EAAE,EAAE,EAAE,CAAC;EACL,MAAM,EAAE,KAAK;EACb,WAAW,EAAE,CAAC;CACf;;AAED,AAAA,EAAE,CAAC;EAAE,SAAS,EAAE,MAAM;CAAI;;AAC1B,AAAA,EAAE,CAAC;EAAE,SAAS,EAAE,OAAO;CAAI;;AAE3B,AAAA,QAAQ,CAAC;EACP,OAAO,EAAE,IAAI;EACb,eAAe,EAAE,aAAa;EAC9B,WAAW,EAAE,UAAU;EACvB,aAAa,EAAE,KAAK;EACpB,OAAO,EAAE,SAAS;CACnB;;AAED,AAAA,QAAQ,CAAC;EACP,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM;EAElB,aAAa,EAAE,KAAK;EACpB,gBAAgB,EAAE,mBAAkB;CAGrC;;AATD,AAQE,QARM,AAQL,mBAAmB,CAAC;EAAE,OAAO,EAAE,IAAI;CAAI;;AAG1C,AAAA,KAAK,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;EACd,eAAe,EAAE,MAAM;CAGxB;;AAJD,AAGE,EAHA,AAAA,OAAO,AAAA,MAAM,CAGb,IAAI,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI", "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 index 6486aa77..a97d1792 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss @@ -9,9 +9,9 @@ html, body { margin: unset; } *, *:before, *:after { box-sizing: inherit; } body { - margin: 15vh auto 0; + margin: 10vh auto 0; - width: 32vw; + width: 35vw; color: white; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; @@ -30,13 +30,22 @@ h2 { font-size: 1.125em; } display: flex; justify-content: space-between; align-items: flex-start; - margin-bottom: 1.5em; + margin-bottom: 1em; padding: 1em 1em 0; } +.factions { + position: sticky; + top: 0; + z-index: 3; + padding: 1em 0; + background-color: #404040; + font-size: .9em; +} + .wrapper { - min-height: 50vh; - max-height: 70vh; + min-height: 60vh; + max-height: 80vh; overflow-y: scroll; border-radius: .25em; @@ -52,7 +61,7 @@ table { th { position: sticky; - top: 0; + top: 3em; text-align: left; z-index: 2; @@ -129,10 +138,6 @@ ol.inline { 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; } -} +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/html/onlinelist/index.html b/ReallifeGamemode.Client/assets/html/onlinelist/index.html index ed0290f9..5e54c6d3 100644 --- a/ReallifeGamemode.Client/assets/html/onlinelist/index.html +++ b/ReallifeGamemode.Client/assets/html/onlinelist/index.html @@ -5,7 +5,7 @@ Spielerliste - +
      @@ -14,6 +14,21 @@

      Spieler: 0

      +
      +
        +
      1. LSPD: 0
      2. +
      3. FIB: 0
      4. +
      5. LSED: 0
      6. + +
      7. GSF: 0
      8. +
      9. FYB: 0
      10. +
      11. LSV: 0
      12. + +
      13. WZN: 0
      14. +
      15. ZIVI: 0
      16. +
      +
      + @@ -27,26 +42,8 @@
      - -
        -
      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/js/onlinelist/script.js b/ReallifeGamemode.Client/assets/js/onlinelist/script.js index e6a5154c..a662711b 100644 --- a/ReallifeGamemode.Client/assets/js/onlinelist/script.js +++ b/ReallifeGamemode.Client/assets/js/onlinelist/script.js @@ -1,12 +1,9 @@ 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; + addTableSorting(); } else if (factionId >= 0 && factionId <= 9) { document.getElementById(factionId).innerHTML = value; } @@ -30,3 +27,34 @@ function addPlayerEntry(userId, userName, factionId, userPing) { var factionName = getFactionNameByFactionId(factionId); document.getElementById('players').innerHTML += `${userId} ${userName} ${factionName} ${userPing}`; } + +// https://www.jstips.co/en/javascript/detect-document-ready-in-pure-js/ +document.onreadystatechange = () => { + if (document.readyState === 'complete') { mp.trigger('CEF:PlayerList_Loaded'); } +}; + +// Sortierung von https://codepen.io/selbekk/pen/LNOZKL +function addTableSorting() { + const headers = Array.from(document.querySelectorAll('th')); + const rows = Array.from(document.querySelectorAll('tbody tr')); + + function sort(e) { + const index = headers.indexOf(e.target); + const sortVal = e.target.classList.contains('is-asc') ? 1 : -1; + rows.sort((a, b) => { + const aValue = a.children[index].innerHTML; + const bValue = b.children[index].innerHTML; + if(aValue > bValue) { return sortVal; } + if(aValue < bValue) { return -sortVal; } + return 0; + }) + + e.target.classList.add('is-sorted'); + e.target.classList.toggle('is-asc'); + const body = document.querySelector('tbody'); + body.innerHTML = ''; + rows.forEach(row => body.appendChild(row)); + } + + headers.forEach(header => header.addEventListener('click', sort)); +} From 34caafaac42b45df0de1eb91d9032e047f2ba242 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 11:23:30 +0000 Subject: [PATCH 102/138] Farben in der Online-Liste angepasst --- ReallifeGamemode.Client/assets/css/onlinelist/style.css | 6 +++--- .../assets/css/onlinelist/style.css.map | 4 ++-- ReallifeGamemode.Client/assets/css/onlinelist/style.scss | 8 +++++--- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css b/ReallifeGamemode.Client/assets/css/onlinelist/style.css index 668595aa..a60e49cf 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css @@ -58,9 +58,9 @@ h2 { position: sticky; top: 0; z-index: 3; - padding: 1em 0; - background-color: #404040; font-size: .9em; + background-color: black; + padding: 1em 0; } .wrapper { @@ -216,4 +216,4 @@ ol.inline.stats { ol.inline.stats abbr { text-decoration: none; } -/*# sourceMappingURL=style.css.map */ \ No newline at end of file +/*# sourceMappingURL=style.css.map */ diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map index 948e65a4..3f63b940 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map @@ -1,9 +1,9 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EACH,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,WAAW;EACvB,WAAW,EAA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I;;AAClD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAc;CAAI;;AAClD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,KAAkB;CAAI;;AACtD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAa;CAAI;;AACjD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AAGvD,AAAA,EAAE,AAAA,OAAO,CAAC;EACR,OAAO,EAAE,IAAI;EAEb,UAAU,EAAE,KAAK;EACjB,eAAe,EAAE,IAAI;EACrB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,KAAK;CAGf;;AATD,AAQE,EARA,AAAA,OAAO,CAQP,EAAE,AAAA,IAAK,CAAA,WAAW,EAAE;EAAE,YAAY,EAAE,GAAG;CAAI;;AAG7C,AAAA,EAAE,AAAA,OAAO,AAAA,MAAM,CAAC;EACd,eAAe,EAAE,MAAM;CAGxB;;AAJD,AAGE,EAHA,AAAA,OAAO,AAAA,MAAM,CAGb,IAAI,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI", "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 index a97d1792..305684ad 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss @@ -38,9 +38,11 @@ h2 { font-size: 1.125em; } position: sticky; top: 0; z-index: 3; - padding: 1em 0; - background-color: #404040; + font-size: .9em; + background-color: black; + + padding: 1em 0; } .wrapper { @@ -49,7 +51,7 @@ h2 { font-size: 1.125em; } overflow-y: scroll; border-radius: .25em; - background-color: rgba(0, 0, 0, .75); + background-color: rgba(black, .75); &::-webkit-scrollbar { display: none; } } From 50208e4ebde1ff5aa985253eb94141f0c48176e1 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 11:39:30 +0000 Subject: [PATCH 103/138] Text im Flugschulen-Checkpoint angepasst --- ReallifeGamemode.Client/util/planeschool.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ReallifeGamemode.Client/util/planeschool.ts b/ReallifeGamemode.Client/util/planeschool.ts index 992b871e..d4dcd187 100644 --- a/ReallifeGamemode.Client/util/planeschool.ts +++ b/ReallifeGamemode.Client/util/planeschool.ts @@ -1,4 +1,4 @@ -import * as NativeUI from '../libs/NativeUI'; +import * as NativeUI from '../libs/NativeUI'; const Menu = NativeUI.Menu; const UIMenuItem = NativeUI.UIMenuItem; const UIMenuListItem = NativeUI.UIMenuListItem; @@ -25,9 +25,7 @@ export default function planeSchoolHandle(globalData: IGlobalData) { var waitFinished = false; mp.events.add('planeSchoolMenu', () => { - mp.game.ui.setTextComponentFormat('STRING'); - mp.game.ui.addTextComponentSubstringPlayerName('Drücke ~INPUT_CONTEXT~, um das Flugschulmenü zu öffnen'); - mp.game.ui.displayHelpTextFromStringLabel(0, true, true, -1); + mp.events.call("renderHelpTextOnScreen", "~s~Drücke ~g~E~s~, um die ~b~Flugprüfung ~s~zu beginnen"); mp.keys.bind(0x45, false, keyPressHandler); keyBound = true; }); @@ -67,4 +65,4 @@ export default function planeSchoolHandle(globalData: IGlobalData) { mp.events.call('removeplaneSchoolMenu', false); mp.events.callRemote('startplaneSchool'); } -} \ No newline at end of file +} From 6ef61b78cf3b58bcd568699cd404a03e2696196b Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 11:41:13 +0000 Subject: [PATCH 104/138] An dieser Stelle fehlte ein Komma. Das wurde behoben. --- ReallifeGamemode.Client/Gui/interiors.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Client/Gui/interiors.ts b/ReallifeGamemode.Client/Gui/interiors.ts index d4736eb0..a26195bf 100644 --- a/ReallifeGamemode.Client/Gui/interiors.ts +++ b/ReallifeGamemode.Client/Gui/interiors.ts @@ -1,4 +1,4 @@ -import game from ".."; +import game from ".."; import { Key } from "../game"; var interiorId = -1; @@ -14,7 +14,7 @@ game.events.add('SERVER:InteriorManager_ClearHelpText', () => { game.events.add('SERVER:InteriorManager_ShowHelpText', (interior, intId, entEx) => { //game.ui.setHelpText('Drücke ~INPUT_CONTEXT~, um ~b~' + interior + ' ~s~zu ' + (entEx === 0 ? 'betreten' : 'verlassen')); - helpText = "~s~Drücke ~g~E~s~ um ~b~" + interior + " ~s~zu " + (entEx === 0 ? "betreten" : "verlassen"); + helpText = "~s~Drücke ~g~E~s~, um ~b~" + interior + " ~s~zu " + (entEx === 0 ? "betreten" : "verlassen"); mp.events.call("renderHelpTextOnScreen", helpText) interiorId = intId; enterExit = entEx; @@ -25,4 +25,4 @@ game.events.add('SERVER:InteriorManager_ShowHelpText', (interior, intId, entEx) function keyPressHandler() { if (game.ui.inChat) return; game.events.callServer('InteriorManager_UseTeleport', [interiorId, enterExit]); -} \ No newline at end of file +} From 47125c64815bd387168504c0b081a16bd7a02c87 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 11:52:24 +0000 Subject: [PATCH 105/138] =?UTF-8?q?/rc-Hinweis=20bei=20Report-Annahme=20an?= =?UTF-8?q?gepasst=20/=20f=C3=BCr=20Supporter+=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Report/Report.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Report/Report.cs b/ReallifeGamemode.Server/Report/Report.cs index 344da53a..2d103a19 100644 --- a/ReallifeGamemode.Server/Report/Report.cs +++ b/ReallifeGamemode.Server/Report/Report.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using GTANetworkAPI; using Newtonsoft.Json; @@ -92,7 +92,8 @@ namespace ReallifeGamemode.Server.Report } } - ChatService.SendMessage(player, "!{#008fff}[REPORT]!{#FFFFFF} Admin " + admin.Name + " hat dein Ticket angenommen! (Benutze /rc zum Schreiben)"); + ChatService.SendMessage(player, "!{#008fff}[REPORT]!{#FFFFFF} Admin " + admin.Name + " hat dein Ticket angenommen! Über /rc [Text] kannst du mit dem Admin schreiben."); + ChatService.SendMessage(admin, "!{#008fff}[REPORT]!{#FFFFFF} Du hast das Ticket von " + player.Name + " angenommen! Über /rc [Text] kannst du mit dem User schreiben."); ChatService.BroadcastDutyAdmin("!{#008fff}[REPORT]!{#FFFFFF} " + admin.Name + " hat das Ticket von " + player.Name + " angenommen"); } From a26bb11aa89966087c3ea3a912d3c2d979db89e7 Mon Sep 17 00:00:00 2001 From: Luke Date: Sat, 24 Apr 2021 12:08:25 +0000 Subject: [PATCH 106/138] Chat-Nachrichten teilweise angepasst / Punkte am Ende von einigen ErrorMessages entfernt --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 4 ++-- ReallifeGamemode.Server/Events/Login.cs | 4 ++-- ReallifeGamemode.Server/Gangwar/Gangwar.cs | 4 ++-- ReallifeGamemode.Server/Gangwar/Turf.cs | 4 ++-- ReallifeGamemode.Server/Job/RefuseCollectorJob.cs | 4 ++-- ReallifeGamemode.Server/Managers/InteractionManager.cs | 4 ++-- ReallifeGamemode.Server/Managers/JobManager.cs | 10 +++++----- ReallifeGamemode.Server/Report/Report.cs | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index abed1c22..dedd99e7 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -1352,7 +1352,7 @@ namespace ReallifeGamemode.Server.Commands if (target.GetData("isDead") == true) { - ChatService.ErrorMessage(player, "Dieser Spieler ist tot. Nutze /arevive."); + ChatService.ErrorMessage(player, "Dieser Spieler ist tot. Nutze /arevive"); return; } diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index 62d21e39..a4357238 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using GTANetworkAPI; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; @@ -100,7 +100,7 @@ namespace ReallifeGamemode.Server.Events if (user.Wanteds > 0) { - ChatService.HQMessage("Der Straftäter" + user.Name + " hat sich mit " + user.Wanteds + " Wanteds eingeloggt."); + ChatService.HQMessage("Der Straftäter " + user.Name + " hat sich mit " + user.Wanteds + " Wanteds eingeloggt."); } if (user.Wanteds == 0) diff --git a/ReallifeGamemode.Server/Gangwar/Gangwar.cs b/ReallifeGamemode.Server/Gangwar/Gangwar.cs index 2f03c031..56d7f42d 100644 --- a/ReallifeGamemode.Server/Gangwar/Gangwar.cs +++ b/ReallifeGamemode.Server/Gangwar/Gangwar.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using GTANetworkAPI; using Newtonsoft.Json; @@ -145,7 +145,7 @@ namespace ReallifeGamemode.Server.Gangwar int id = JsonConvert.DeserializeObject(jsonId); if (id == -1) { - ChatService.ErrorMessage(client, "Du befindest dich in keinem Gebiet!"); + ChatService.ErrorMessage(client, "Du befindest dich in keinem Gebiet"); return; } using (var dbContext = new DatabaseContext()) diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index 809af885..8c6cb35d 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -332,7 +332,7 @@ namespace ReallifeGamemode.Server.Gangwar List leaders = context.Users.Include(u => u.Faction).Where(u => onlinePlayers.Contains(u.Name) && u.Faction.Name == attacker && u.FactionLeader).Select(u => u.Player).ToList(); foreach (var l in leaders) { - ChatService.ErrorMessage(l, "Gangwarstart ist nicht möglich, da die beteiligten Fraktionen nicht genügend Mitglieder aufweisen."); + ChatService.ErrorMessage(l, "Du kannst keinen Gangwar starten, weil in der gegnerischen Fraktion zu wenig Spieler online sind"); } return; diff --git a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs index 651fe8e1..cc187fc8 100644 --- a/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs +++ b/ReallifeGamemode.Server/Job/RefuseCollectorJob.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using GTANetworkAPI; @@ -267,7 +267,7 @@ namespace ReallifeGamemode.Server.Job else if (data.getTrashCount() > MAX_BAG) { data.setTrashCount(MAX_BAG); - ChatService.ErrorMessage((Player)player, "Der Müllwagen ist schon voll."); + ChatService.ErrorMessage((Player)player, "Der Müllwagen ist schon voll"); } else { diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 4c1114e3..1a4c30ca 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using GTANetworkAPI; using Newtonsoft.Json; @@ -554,7 +554,7 @@ namespace ReallifeGamemode.Server.Managers var factionVehicleCount = dbContext.FactionVehicles.ToList().Where(v => v.GetOwners().Contains(user.FactionId.Value)).Count(); if (factionVehicleCount <= 6) { - ChatService.ErrorMessage(player, "Die Fraktion braucht mindestens 6 Fahrzeuge"); + ChatService.ErrorMessage(player, "Die Fraktion braucht mindestens sechs Fahrzeuge"); return; } diff --git a/ReallifeGamemode.Server/Managers/JobManager.cs b/ReallifeGamemode.Server/Managers/JobManager.cs index af5de97d..93bafaaa 100644 --- a/ReallifeGamemode.Server/Managers/JobManager.cs +++ b/ReallifeGamemode.Server/Managers/JobManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -66,7 +66,7 @@ namespace ReallifeGamemode.Server.Managers if (u.JobId == null) { - ChatService.ErrorMessage(player, "Du hast momentan keinen Job, den du kündigen könntest."); + ChatService.ErrorMessage(player, "Du bist bereits arbeitslos"); return; } @@ -89,20 +89,20 @@ namespace ReallifeGamemode.Server.Managers if (u.JobId != null) { - ChatService.ErrorMessage(player, "Du musst deinen alten Job kündigen, bevor du einen neuen ausüben kannst."); + ChatService.ErrorMessage(player, "Du musst deinen alten Job kündigen, bevor du einen Neuen ausüben kannst"); return; } //Pilotjob if (jobId == 3 && u.FlyingLicensePlane == false) { - ChatService.ErrorMessage(player, "Um diesen Job annehmen zu können, musst du einen Flugschein besitzen."); + ChatService.ErrorMessage(player, "Um diesen Job annehmen zu können, musst du einen Flugschein besitzen"); return; } if (u.DriverLicenseVehicle == false) { - ChatService.ErrorMessage(player, "Um diesen Job annehmen zu können, musst du einen Führerschein besitzen."); + ChatService.ErrorMessage(player, "Um diesen Job annehmen zu können, musst du einen Führerschein besitzen"); return; } diff --git a/ReallifeGamemode.Server/Report/Report.cs b/ReallifeGamemode.Server/Report/Report.cs index 2d103a19..d07ed8c7 100644 --- a/ReallifeGamemode.Server/Report/Report.cs +++ b/ReallifeGamemode.Server/Report/Report.cs @@ -35,7 +35,7 @@ namespace ReallifeGamemode.Server.Report if (listReports.FindAll(e => (e.isAssigned() == false)).Count == 0) { - ChatService.ErrorMessage(client, "Im Moment gibt es keine Tickets."); + ChatService.ErrorMessage(client, "Aktuell gibt es keine Tickets"); return; } From 14f9e33ffea47d4701442ecd147ba5d6120cadcf Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 18:33:45 +0200 Subject: [PATCH 107/138] Nur ein Account pro Social-Club --- ReallifeGamemode.Server/Events/Register.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Register.cs b/ReallifeGamemode.Server/Events/Register.cs index 37baf622..c736a54f 100644 --- a/ReallifeGamemode.Server/Events/Register.cs +++ b/ReallifeGamemode.Server/Events/Register.cs @@ -29,9 +29,9 @@ namespace ReallifeGamemode.Server.Events player.TriggerEvent("SERVER:Login_Error", "Das Passwort muss aus mindestens 6 Zeichen bestehen."); return; } - if (dbContext.Users.Where(u => u.SocialClubName == player.SocialClubName).Count() >= 3) + if (dbContext.Users.Where(u => u.SocialClubName == player.SocialClubName).Count()!= 0) { - player.TriggerEvent("SERVER:Login_Error", "Es sind schon 3 Konten mit dieser Socialclub-ID registriert."); + player.TriggerEvent("SERVER:Login_Error", "Es ist schon ein Konto mit dieser Socialclub-ID registriert."); return; } From 92de91465ba8fd592ad39bf11736cbf07fda97ae Mon Sep 17 00:00:00 2001 From: hydrant Date: Sat, 24 Apr 2021 21:06:56 +0200 Subject: [PATCH 108/138] Busfahrer: Auch nicht als Beifahrer in Nicht-Bus Fahrzeug einsteigen --- ReallifeGamemode.Server/Managers/JobManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/JobManager.cs b/ReallifeGamemode.Server/Managers/JobManager.cs index 93bafaaa..007228ac 100644 --- a/ReallifeGamemode.Server/Managers/JobManager.cs +++ b/ReallifeGamemode.Server/Managers/JobManager.cs @@ -202,9 +202,9 @@ namespace ReallifeGamemode.Server.Managers { JobBase job = GetJob(player.GetUser().JobId ?? -1); - if (job != null && job.GetUsersInJob().Contains(player) && seat == 0) + if (job != null && job.GetUsersInJob().Contains(player)) { - if(job.CheckVehicle(player, veh)) + if(job.CheckVehicle(player, veh) && seat == 0) { if (!playerTimersJobVehicleRespawn.ContainsKey(player)) return; From 97ead73242eb0fac57796584549da7cd57082ec5 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 00:11:06 +0000 Subject: [PATCH 109/138] Hier war ein Leerzeichen zu viel --- ReallifeGamemode.Server/Gangwar/Turf.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index 8c6cb35d..8f0466c5 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -217,8 +217,8 @@ namespace ReallifeGamemode.Server.Gangwar { using (var dbContext = new DatabaseContext()) { - ChatService.BroadcastFaction("~y~[GANGWAR] ~r~" + client.Name + "~w~ ist nicht im Gangwar beteiligt !", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault()); - ChatService.BroadcastFaction("~y~[GANGWAR] ~r~" + client.Name + "~w~ ist nicht im Gangwar beteiligt !", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault()); + ChatService.BroadcastFaction("~y~[GANGWAR] ~r~" + client.Name + "~w~ ist nicht im Gangwar beteiligt!", dbContext.Factions.Where(f => f.Name == getOwner()).FirstOrDefault()); + ChatService.BroadcastFaction("~y~[GANGWAR] ~r~" + client.Name + "~w~ ist nicht im Gangwar beteiligt!", dbContext.Factions.Where(f => f.Name == getAttacker()).FirstOrDefault()); } return; } From 49255eafd20e79a5f868ed1c2d4437cd2953a473 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sun, 25 Apr 2021 13:33:06 +0200 Subject: [PATCH 110/138] Gangwar: Meldung an alle bei Start/Ende --- ReallifeGamemode.Server/Gangwar/Turf.cs | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Server/Gangwar/Turf.cs b/ReallifeGamemode.Server/Gangwar/Turf.cs index 8f0466c5..9d6e011e 100644 --- a/ReallifeGamemode.Server/Gangwar/Turf.cs +++ b/ReallifeGamemode.Server/Gangwar/Turf.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -259,10 +259,13 @@ namespace ReallifeGamemode.Server.Gangwar return; } + string takeOverMessage = string.Empty; + if (getOwner() == FactionName) { - ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat erfolgreich das Gebiet ~g~" + getName() + "~w~ verteidigt.", ownerFaction); - ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat den Angrif auf das Gebiet ~r~" + getName() + "~w~ verloren.", attackerFaction); + takeOverMessage = $"~y~[GANGWAR] ~w~Die {getOwner()} konnten ihr Gebiet ~g~{getName()} ~w~ erfolgreich gegen die {getAttacker()} verteidigen."; + //ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat erfolgreich das Gebiet ~g~" + getName() + "~w~ verteidigt.", ownerFaction); + //ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion hat den Angrif auf das Gebiet ~r~" + getName() + "~w~ verloren.", attackerFaction); foreach (var o in owners) { @@ -276,8 +279,9 @@ namespace ReallifeGamemode.Server.Gangwar } else if (getOwner() != FactionName) { - ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht verteidigen.", ownerFaction); - ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte erfolgreich das Gebiet ~g~" + getName() + "~w~ erobern.", attackerFaction); + takeOverMessage = $"~y~[GANGWAR] ~w~Die {getAttacker()} konnten das Gebiet ~g~{getName()} ~w~ der {getAttacker()} erfolgreich erobern."; + //ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte das Gebiet ~r~" + getName() + "~w~ nicht verteidigen.", ownerFaction); + //ChatService.BroadcastFaction("~y~[GANGWAR] ~w~Deine Fraktion konnte erfolgreich das Gebiet ~g~" + getName() + "~w~ erobern.", attackerFaction); foreach (var o in owners) { if (o != null) @@ -294,6 +298,7 @@ namespace ReallifeGamemode.Server.Gangwar turf.Owner = this.Owner; turf.FactionId = attackerFaction.Id; } + ChatService.Broadcast(takeOverMessage); dbContext.SaveChanges(); } this.Attacker = null; @@ -358,9 +363,11 @@ namespace ReallifeGamemode.Server.Gangwar u.TriggerEvent("CLIENT:setAttackBlip", true, TurfID); u.TriggerEvent("GangwarScore", this.Attacker, this.Owner, this.Att_Score, this.Def_Score); u.SetData("inGangWar", getId()); - ChatService.SendMessage(u, "~y~[GANGWAR]~w~ Die " + getAttacker() + " haben das Gebiet ~y~" + TurfName + "~w~ der " + getOwner() + " angegriffen."); clientsInGangwar.Add(u); } + + ChatService.Broadcast("~y~[GANGWAR]~w~ Die " + getAttacker() + " haben das Gebiet ~y~" + TurfName + "~w~ der " + getOwner() + " angegriffen."); + playerInGangwar = clientsInGangwar.ToArray(); NAPI.ClientEvent.TriggerClientEventForAll("CLIENT:Turf_Update", JsonConvert.SerializeObject(this.TurfID), JsonConvert.SerializeObject(this.status), JsonConvert.SerializeObject(this.Owner), JsonConvert.SerializeObject(this.Attacker)); this.TurfTick(); From fa03d86d3f6beda0c97fb548ee5a0ccda175b2cd Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 25 Apr 2021 17:15:44 +0200 Subject: [PATCH 111/138] first draft eventport --- .../Commands/UserCommands.cs | 49 ++++++++++++++++++- .../Managers/PositionManager.cs | 3 ++ 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 1afc483c..18ce329f 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -16,7 +16,54 @@ using ReallifeGamemode.Services; namespace ReallifeGamemode.Server.Commands { internal class UserCommands : Script - { + { + [Command("eventport", "~m~eventport")] + public void CmdUserEventport(Player player, String option = "") + { + if (!player.IsLoggedIn()) return; + + if (option == "on") + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + return; + } + PositionManager.eventportPosition = player.Position; + PositionManager.eventportActive = true; + player.SendChatMessage("~y~Du hast hier erfolgreich einen Eventport gesetzt."); + return; + } + + if (option == "off") + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + return; + } + PositionManager.eventportActive = false; + player.SendChatMessage("Du hast den Eventport deaktiviert."); + return; + } + + if (!PositionManager.eventportActive || PositionManager.eventportPosition == null) + { + player.SendChatMessage("Im Moment ist kein Eventport aktiv."); + return; + } + + using (var dbContext = new DatabaseContext()) + { + User user = player.GetUser(dbContext); + if (user.Wanteds > 0 || user.JailTime > 0 || player.HasData("inGangWar") || !player.IsAlive()) + { + ChatService.ErrorMessage(player, "Momentan kannst du keinen Eventport nutzen"); + return; + } + } + + player.SafeTeleport(PositionManager.eventportPosition); + } + [Command("look", "~m~look")] public void CmdUserLook(Player player) { diff --git a/ReallifeGamemode.Server/Managers/PositionManager.cs b/ReallifeGamemode.Server/Managers/PositionManager.cs index 7a3c8c05..c23a06b3 100644 --- a/ReallifeGamemode.Server/Managers/PositionManager.cs +++ b/ReallifeGamemode.Server/Managers/PositionManager.cs @@ -32,6 +32,9 @@ namespace ReallifeGamemode.Server.Managers public static List AmmunationPoints = new List(); + public static Vector3 eventportPosition; + public static bool eventportActive = false; + public static void LoadPositionManager() { #region DutyPoints From 7ca92cbafb06b13bb6136e2c8e8e60ea594dca5e Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 25 Apr 2021 17:31:21 +0200 Subject: [PATCH 112/138] eventport position immer leicht versetzt --- ReallifeGamemode.Server/Commands/UserCommands.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 18ce329f..09c8dd44 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -41,13 +41,13 @@ namespace ReallifeGamemode.Server.Commands return; } PositionManager.eventportActive = false; - player.SendChatMessage("Du hast den Eventport deaktiviert."); + player.SendChatMessage("~y~Du hast den Eventport deaktiviert."); return; } if (!PositionManager.eventportActive || PositionManager.eventportPosition == null) { - player.SendChatMessage("Im Moment ist kein Eventport aktiv."); + player.SendChatMessage("~y~Im Moment ist kein Eventport aktiv."); return; } @@ -61,7 +61,14 @@ namespace ReallifeGamemode.Server.Commands } } - player.SafeTeleport(PositionManager.eventportPosition); + Random rnd = new Random(); + int randomX = rnd.Next(-5, 5); + int randomY = rnd.Next(-5, 5); + + Vector3 teleportPosition = new Vector3(PositionManager.eventportPosition.X + randomX, PositionManager.eventportPosition.Y + randomY, PositionManager.eventportPosition.Z); + + player.SafeTeleport(teleportPosition); + player.SendNotification("Du hast dich zum Event teleportiert"); } [Command("look", "~m~look")] From 1eb10c6fbf2bab7eb9d30ba8af43b57e669f1944 Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 25 Apr 2021 17:34:35 +0200 Subject: [PATCH 113/138] eventport position angepasst --- ReallifeGamemode.Server/Commands/UserCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/UserCommands.cs b/ReallifeGamemode.Server/Commands/UserCommands.cs index 09c8dd44..f9718c59 100644 --- a/ReallifeGamemode.Server/Commands/UserCommands.cs +++ b/ReallifeGamemode.Server/Commands/UserCommands.cs @@ -62,8 +62,8 @@ namespace ReallifeGamemode.Server.Commands } Random rnd = new Random(); - int randomX = rnd.Next(-5, 5); - int randomY = rnd.Next(-5, 5); + int randomX = rnd.Next(-3, 3); + int randomY = rnd.Next(-3, 3); Vector3 teleportPosition = new Vector3(PositionManager.eventportPosition.X + randomX, PositionManager.eventportPosition.Y + randomY, PositionManager.eventportPosition.Z); From 8c71f10d73bd58974fe06c66a7ce700c677c7423 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 17:37:44 +0000 Subject: [PATCH 114/138] Kolorierung der Online-Liste angepasst --- ReallifeGamemode.Client/assets/css/onlinelist/style.css | 4 ++-- ReallifeGamemode.Client/assets/css/onlinelist/style.css.map | 2 +- ReallifeGamemode.Client/assets/css/onlinelist/style.scss | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css b/ReallifeGamemode.Client/assets/css/onlinelist/style.css index a60e49cf..8685b32e 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css @@ -59,7 +59,7 @@ h2 { top: 0; z-index: 3; font-size: .9em; - background-color: black; + background-color: #404040; padding: 1em 0; } @@ -87,7 +87,7 @@ table th { top: 3em; text-align: left; z-index: 2; - background-color: black; + background-color: #404040; } table th:first-child { diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map index 3f63b940..840f5837 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map @@ -1,6 +1,6 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EACH,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,WAAW;EACvB,WAAW,EAAE,IAAI;CAClB;;AAED,AAAA,IAAI,EAAE,IAAI,CAAC;EAAE,MAAM,EAAE,KAAK;CAAI;;AAC9B,AAAA,CAAC,EAAE,CAAC,AAAA,OAAO,EAAE,CAAC,AAAA,MAAM,CAAC;E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D,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,KAAkB;CAAI;;AACtD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAa;CAAI;;AACjD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AAGvD,AAAA,EAAE,AAAA,OAAO,CAAC;EACR,OAAO,EAAE,IAAI;EAEb,UAAU,EAAE,KAAK;EACjB,eAAe,EAAE,IAAI;EACrB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,KAAK;CAGf;;AATD,AAQE,EARA,AAAA,OAAO,CAQP,EAAE,AAAA,IAAK,CAAA,WAAW,EAAE;EAAE,YAAY,EAAE,GAAG;CAAI;;AAG7C,AAAA,EAAE,AAAA,OAAO,AAAA,MAAM,CAAC;EACd,eAAe,EAAE,MAAM;CAGxB;;AAJD,AAGE,EAHA,AAAA,OAAO,AAAA,MAAM,CAGb,IAAI,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI", "sources": [ "style.scss" ], diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss index 305684ad..5c816498 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss @@ -40,7 +40,7 @@ h2 { font-size: 1.125em; } z-index: 3; font-size: .9em; - background-color: black; + background-color: #404040; padding: 1em 0; } @@ -67,7 +67,7 @@ table { text-align: left; z-index: 2; - background-color: black; + background-color: #404040; &:first-child { border-top-left-radius: .25em; } &:last-child { border-top-right-radius: .25em; } @@ -142,4 +142,4 @@ ol.inline.stats { justify-content: center; abbr { text-decoration: none; } -} \ No newline at end of file +} From 6d5a11130171d2cfbcc81b032625bfce3f7a08c8 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 17:48:37 +0000 Subject: [PATCH 115/138] =?UTF-8?q?Chat=20weniger=20breit,=20Text=20in=20E?= =?UTF-8?q?ingabefeld=20fett=20und=20Abst=C3=A4nde=20angepassert=20getan?= =?UTF-8?q?=20tun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/assets/css/chat/main.css | 9 +++++---- ReallifeGamemode.Client/assets/css/chat/main.css.map | 4 ++-- ReallifeGamemode.Client/assets/css/chat/main.scss | 7 ++++--- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css b/ReallifeGamemode.Client/assets/css/chat/main.css index 3b563634..7bffa96d 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css +++ b/ReallifeGamemode.Client/assets/css/chat/main.css @@ -59,7 +59,7 @@ a { #chat ul#chat_messages { height: 16.45em; min-width: 50ch; - max-width: calc(60vw + 10px); + max-width: calc(45vw + 10px); -webkit-transform: rotate(0deg); transform: rotate(0deg); overflow-y: auto; @@ -80,16 +80,17 @@ a { } #chat input#chat_msg { - width: 60vw; + width: 45vw; outline: 0; border: none; border-radius: 3px; + font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; color: white; background: rgba(0, 0, 0, 0.5); - padding: .5em; + padding: .5em .75em .65em; } ::-webkit-scrollbar { @@ -104,4 +105,4 @@ a { ::-webkit-scrollbar-thumb:hover { background: rgba(255, 17, 0, 0); } -/*# sourceMappingURL=main.css.map */ \ No newline at end of file +/*# sourceMappingURL=main.css.map */ diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css.map b/ReallifeGamemode.Client/assets/css/chat/main.css.map index df909d16..1532e34c 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css.map +++ b/ReallifeGamemode.Client/assets/css/chat/main.css.map @@ -1,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EACb,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,IAAI;EACZ,aAAa,EAAE,GAAG;EAElB,WAAW,EAAE,OAAO;EACpB,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,OAAO;EACpB,WAAW,EAAE,OAAO;EAEpB,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,kBAAiB;EAE7B,OAAO,EAAE,gBAAgB;CAC1B;;AAGH,AAAA,mBAAmB,CAAC;EAClB,KAAK,EAAE,IAAI;CAQZ;;AATD,AAGE,mBAHiB,AAGhB,MAAM,CAAC;EACN,UAAU,EAAE,mBAAmB;EAC/B,aAAa,EAAE,GAAG;CAGnB;;AARH,AAOI,mBAPe,AAGhB,MAAM,AAIJ,MAAM,CAAC;EAAE,UAAU,EAAE,mBAAmB;CAAI", "sources": [ "main.scss" ], "names": [], "file": "main.css" -} +} \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/chat/main.scss b/ReallifeGamemode.Client/assets/css/chat/main.scss index 64ae2124..b15046d6 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.scss +++ b/ReallifeGamemode.Client/assets/css/chat/main.scss @@ -49,7 +49,7 @@ a { text-decoration: none; } ul#chat_messages { height: 16.45em; min-width: 50ch; - max-width: calc(60vw + 10px); + max-width: calc(45vw + 10px); transform: rotate(0deg); overflow-y: auto; @@ -68,11 +68,12 @@ a { text-decoration: none; } } input#chat_msg { - width: 60vw; + width: 45vw; outline: 0; border: none; border-radius: 3px; + font-family: inherit; font-size: inherit; font-weight: inherit; line-height: inherit; @@ -80,7 +81,7 @@ a { text-decoration: none; } color: white; background: rgba(0, 0, 0, .5); - padding: .5em; + padding: .5em .75em .65em; } } From 72e2b6be6b05accdd61edde59bdccc8abb88ae03 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 17:52:45 +0000 Subject: [PATCH 116/138] FUNKTIONIERT DAS? Grund bei Vergabe von Strafpunkten wird jedem Beteiligten angezeigt --- ReallifeGamemode.Server/Managers/InteractionManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 1a4c30ca..1ee74c65 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -668,8 +668,8 @@ namespace ReallifeGamemode.Server.Managers targetUser.Points += amount; player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~."); - target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben.", true); - ChatService.HQMessage(targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten. Gesamt: " + targetUser.Points); + target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben (Grund: ~r~{reason}~w~).", true); + ChatService.HQMessage(targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten (Grund: " + reason + "). Gesamt: " + targetUser.Points); if (targetUser.Points < 0) { From 3c56cf19d93467cff028c00d834f6d9c1605b768 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 19:41:21 +0000 Subject: [PATCH 117/138] =?UTF-8?q?Chat-Input=20h=C3=B6her?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/assets/css/chat/main.css | 4 ++-- ReallifeGamemode.Client/assets/css/chat/main.css.map | 2 +- ReallifeGamemode.Client/assets/css/chat/main.scss | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css b/ReallifeGamemode.Client/assets/css/chat/main.css index 7bffa96d..913b65ce 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css +++ b/ReallifeGamemode.Client/assets/css/chat/main.css @@ -14,7 +14,7 @@ html { } #chat, a, body, html { - color: #fff; + color: white; } body, html { @@ -90,7 +90,7 @@ a { line-height: inherit; color: white; background: rgba(0, 0, 0, 0.5); - padding: .5em .75em .65em; + padding: .25em .5em .5em .5em; } ::-webkit-scrollbar { diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css.map b/ReallifeGamemode.Client/assets/css/chat/main.css.map index 1532e34c..4a9f1c6a 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css.map +++ b/ReallifeGamemode.Client/assets/css/chat/main.css.map @@ -1,6 +1,6 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EAAE,UAAU,EAAE,UAAU;CAAI;;AACjC,AAAA,CAAC,EAAE,CAAC,AAAA,OAAO,EAAE,CAAC,AAAA,MAAM,CAAC;EAAE,UAAU,EAAE,OAAO;CAAI;;AAG9C,AAAA,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;EACZ,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,CACV;CAAC;;AAED,AAAA,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC;EACnB,KAAK,EAAE,IACT;CAAC;;AAED,AAAA,IAAI,EAAE,IAAI,CAAC;EACT,sBAAsB,EAAE,WAAW;EACnC,QAAQ,EAAE,MAAM;EAChB,SAAS,EAAE,IAAI;EACf,WAAW,EAAE,IAAI;CAClB;;AAED,AAAA,IAAI,CAAC;EACH,WAAW,EAAE,oIAAoI;EACjJ,SAAS,EAAE,kBAAkB;EAC7B,WAAW,EAAE,GAAG;EAChB,SAAS,EAAE,GAAG;CACf;;AAED,AAAA,CAAC,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI;;AAE7B,AAAA,WAAW,CAAC;EACV,OAAO,EAAE,IAAI;EACb,QAAQ,EAAE,QAAQ;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,CACX;CAAC;;A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EvB,UAAU,EAAE,IAAI;EAChB,UAAU,EAAE,MAAM;EAClB,UAAU,EAAE,SAAS;EAErB,eAAe,EAAE,IAAI;EACrB,aAAa,EAAE,KAAK;CAQrB;;AA9BH,AAwBI,KAxBC,CAWH,EAAE,AAAA,cAAc,GAaX,EAAE,CAAC;EACJ,SAAS,EAAE,YAAY;EACvB,aAAa,EAAE,MAAM;CAGtB;;AA7BL,AA4BM,KA5BD,CAWH,EAAE,AAAA,cAAc,GAaX,EAAE,AAIF,WAAW,CAAC;EAAE,aAAa,EAAE,KAAK;CAAI;;AA5B7C,AAgCE,KAhCG,CAgCH,KAAK,AAAA,SAAS,CAAC;EACb,KAAK,EAAE,IAAI;EACX,OAAO,EAAE,CAAC;EACV,MAAM,EAAE,IAAI;EACZ,aAAa,EAAE,GAAG;EAElB,WAAW,EAAE,OAAO;EACpB,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,OAAO;EACpB,WAAW,EAAE,OAAO;EAEpB,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,kBAAiB;EAE7B,OAAO,EAAE,oBAAoB;CAC9B;;AAGH,AAAA,mBAAmB,CAAC;EAClB,KAAK,EAAE,IAAI;CAQZ;;AATD,AAGE,mBAHiB,AAGhB,MAAM,CAAC;EACN,UAAU,EAAE,mBAAmB;EAC/B,aAAa,EAAE,GAAG;CAGnB;;AARH,AAOI,mBAPe,AAGhB,MAAM,AAIJ,MAAM,CAAC;EAAE,UAAU,EAAE,mBAAmB;CAAI", "sources": [ "main.scss" ], diff --git a/ReallifeGamemode.Client/assets/css/chat/main.scss b/ReallifeGamemode.Client/assets/css/chat/main.scss index b15046d6..d397ad66 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.scss +++ b/ReallifeGamemode.Client/assets/css/chat/main.scss @@ -7,9 +7,7 @@ html { box-sizing: border-box; } margin: 0 } -#chat, a, body, html { - color: #fff -} +#chat, a, body, html { color: white; } body, html { -webkit-font-smoothing: antialiased; @@ -81,7 +79,7 @@ a { text-decoration: none; } color: white; background: rgba(0, 0, 0, .5); - padding: .5em .75em .65em; + padding: .25em .5em .5em .5em; } } From 431c4a20078c55a7a6edef09d8d04db4782ace81 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 19:43:41 +0000 Subject: [PATCH 118/138] =?UTF-8?q?Kolorierung=20erfordert=20Fingerspitzen?= =?UTF-8?q?gef=C3=BChl.=20Onlineliste=20besser=20jetzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/assets/css/onlinelist/style.css | 4 ++-- ReallifeGamemode.Client/assets/css/onlinelist/style.css.map | 2 +- ReallifeGamemode.Client/assets/css/onlinelist/style.scss | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css b/ReallifeGamemode.Client/assets/css/onlinelist/style.css index 8685b32e..d74093be 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css @@ -59,7 +59,7 @@ h2 { top: 0; z-index: 3; font-size: .9em; - background-color: #404040; + background-color: #222; padding: 1em 0; } @@ -87,7 +87,7 @@ table th { top: 3em; text-align: left; z-index: 2; - background-color: #404040; + background-color: #222; } table th:first-child { diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map index 840f5837..ad1da382 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.css.map @@ -1,6 +1,6 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EACH,UAAU,EAAE,UAAU;EACtB,MAAM,EAAE,KAAK;EACb,UAAU,EAAE,WAAW;EACvB,WAAW,EAAE,IAAI;CAClB;;AAED,AAAA,IAAI,EAAE,IAAI,CAAC;EAAE,MAAM,EAAE,KAAK;CAAI;;AA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D,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,KAAkB;CAAI;;AACtD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAa;CAAI;;AACjD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AACpD,AAAD,SAAI,AAAA,QAAQ,CAAC;EAAE,gBAAgB,EAAE,OAAgB;CAAI;;AAGvD,AAAA,EAAE,AAAA,OAAO,CAAC;EACR,OAAO,EAAE,IAAI;EAEb,UAAU,EAAE,KAAK;EACjB,eAAe,EAAE,IAAI;EACrB,MAAM,EAAE,CAAC;EACT,OAAO,EAAE,KAAK;CAGf;;AATD,AAQE,EARA,AAAA,OAAO,CAQP,EAAE,AAAA,IAAK,CAAA,WAAW,EAAE;EAAE,YAAY,EAAE,GAAG;CAAI;;AAG7C,AAAA,EAAE,AAAA,OAAO,AAAA,MAAM,CAAC;EACd,eAAe,EAAE,MAAM;CAGxB;;AAJD,AAGE,EAHA,AAAA,OAAO,AAAA,MAAM,CAGb,IAAI,CAAC;EAAE,eAAe,EAAE,IAAI;CAAI", "sources": [ "style.scss" ], diff --git a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss index 5c816498..a88100de 100644 --- a/ReallifeGamemode.Client/assets/css/onlinelist/style.scss +++ b/ReallifeGamemode.Client/assets/css/onlinelist/style.scss @@ -40,7 +40,7 @@ h2 { font-size: 1.125em; } z-index: 3; font-size: .9em; - background-color: #404040; + background-color: #222; padding: 1em 0; } @@ -67,7 +67,7 @@ table { text-align: left; z-index: 2; - background-color: #404040; + background-color: #222; &:first-child { border-top-left-radius: .25em; } &:last-child { border-top-right-radius: .25em; } @@ -142,4 +142,4 @@ ol.inline.stats { justify-content: center; abbr { text-decoration: none; } -} +} \ No newline at end of file From 8187cbf7684d7ba687f82ce98a59d22a60adcb90 Mon Sep 17 00:00:00 2001 From: hydrant Date: Sun, 25 Apr 2021 21:33:41 +0200 Subject: [PATCH 119/138] =?UTF-8?q?Mark=20&=20Gotomark=20f=C3=BCr=20Suppor?= =?UTF-8?q?ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Commands/AdminCommands.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index dedd99e7..ed036f49 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -614,7 +614,7 @@ namespace ReallifeGamemode.Server.Commands [Command("mark", "~m~Benutzung: ~s~/mark")] public void CmdAdminMark(Player player) { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) { ChatService.NotAuthorized(player); return; @@ -626,7 +626,7 @@ namespace ReallifeGamemode.Server.Commands [Command("gotomark", "~m~Benutzung: ~s~/gotomark")] public void CmdAdminGotoMark(Player player) { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + if (!player.GetUser()?.IsAdmin(AdminLevel.SUPPORTER) ?? true) { ChatService.NotAuthorized(player); return; From 63a7261f33bb3cd7d0d5c6b79994c20ca9a1d359 Mon Sep 17 00:00:00 2001 From: Luke Date: Sun, 25 Apr 2021 20:02:45 +0000 Subject: [PATCH 120/138] Strafpunkte-Notification angepasst dies das --- .../Managers/InteractionManager.cs | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/ReallifeGamemode.Server/Managers/InteractionManager.cs b/ReallifeGamemode.Server/Managers/InteractionManager.cs index 1ee74c65..926dd56f 100644 --- a/ReallifeGamemode.Server/Managers/InteractionManager.cs +++ b/ReallifeGamemode.Server/Managers/InteractionManager.cs @@ -603,16 +603,16 @@ namespace ReallifeGamemode.Server.Managers { if (amount > 0 && amount <= 10000) { - player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~{amount}$ ~w~gestellt. Grund: ~g~{reason}~w~."); - target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ein Ticket in Höhe von ~y~{amount}$ ~w~gestellt.", true); - target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Strafticket im Interaktionsmenü annehmen.", true); + player.SendNotification($"~w~Du hast ~y~{targetname} ~w~ein Ticket in Höhe von ~b~${amount} ~w~ausgestellt. Grund: ~g~{reason}~w~."); + target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ein Ticket in Höhe von ~y~${amount} ~w~ausgestellt.", true); + target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Das Ticket kann im Interaktionsmenü angenommen werden.", true); target.SetData("ticket_boolean", true); target.SetData("ticket_amount", amount); target.SetData("ticket_player", player); } else { - player.SendNotification("~r~Du kannst nur zwischen 1$ und 10000$ angeben!"); + player.SendNotification("~r~Du kannst nur zwischen $1 und $10.000 angeben!"); } } } @@ -668,7 +668,7 @@ namespace ReallifeGamemode.Server.Managers targetUser.Points += amount; player.SendNotification($"~w~Du hast ~y~{targetname} ~b~{amount} ~w~Strafpunkte gegeben. Grund: ~g~{reason}~w~."); - target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} | {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben (Grund: ~r~{reason}~w~).", true); + target.SendNotification($"~b~{player.GetUser().FactionRank.RankName} {playername} ~w~hat dir ~y~{amount} ~w~Strafpunkte gegeben (Grund: ~r~{reason}~w~).", true); ChatService.HQMessage(targetname + " hat von " + playername + " " + amount + " Strafpunkt(e) erhalten (Grund: " + reason + "). Gesamt: " + targetUser.Points); if (targetUser.Points < 0) @@ -677,9 +677,7 @@ namespace ReallifeGamemode.Server.Managers } else if (targetUser.Points >= 12) { - target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~r~12/12 ~x~Strafpunkten.", true); - target.SendNotification($"~w~Dir wird ~r~Auto- ~w~und ~r~Motorradführerschein ~w~entzogen.", true); //FlashNotif - + target.SendNotification($"~x~Du hast nun ~r~12/12 ~x~Strafpunkte. ~w~Dir wurde dein ~r~Auto- und dein Motorradführerschein ~w~entzogen.", true); ChatService.HQMessage(targetname + " besitzt nun keinen Führerschein mehr."); targetUser.Points = 0; @@ -688,7 +686,7 @@ namespace ReallifeGamemode.Server.Managers } else { - target.SendNotification($"~w~Grund: ~g~{reason}~w~. ~x~Du hast nun ~y~{targetUser.Points}/12 ~x~Strafpunkten.", true); + target.SendNotification($"~x~Du hast nun ~y~{targetUser.Points}/12 ~x~Strafpunkt(e).", true); } dbContext.SaveChanges(); From 1f816e6ca946fd6c7d0b33c5632dfe32fc02f38b Mon Sep 17 00:00:00 2001 From: Fabian Date: Sun, 25 Apr 2021 23:40:46 +0200 Subject: [PATCH 121/138] keine sani benachrichtigung bei wanted tod --- ReallifeGamemode.Client/util/weapondamage.ts | 2 +- ReallifeGamemode.Server/Events/Death.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index 555d4292..cd3ea62d 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -37,7 +37,7 @@ export default function weapondamageUtil() { } }); - mp.events.add('outgoingDamage', (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { + mp.events.add(RageEnums.EventKey.OUTGOING_DAMAGE, (sourceEntity, targetEntity, sourcePlayer, weapon, boneIndex, damage) => { if (spawnschutzEnabled && getWantedCount() === 0) { return true; } diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index cb2cf4a2..872632fa 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -163,7 +163,7 @@ namespace ReallifeGamemode.Server.Events { user.Dead = true; - if (!player.HasData("reviveSperre") && player.GetData("isDead") == false && !player.HasData("inGangWar") && player.GetData("SAdminduty") == false) + if (user.Wanteds > 0 || !player.HasData("reviveSperre") && player.GetData("isDead") == false && !player.HasData("inGangWar") && player.GetData("SAdminduty") == false) { //MEDIC AUFTRAG MedicTask reviveTask = new MedicTask() From 111a0f2dea71b70f6329f26906cd14b299f887e6 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 01:55:53 +0200 Subject: [PATCH 122/138] sani revive tote wanteds --- ReallifeGamemode.Client/Event/event.ts | 34 +++++++++++++++++++ .../Commands/AdminCommands.cs | 12 +++++++ .../Commands/FactionCommands.cs | 7 ++++ 3 files changed, 53 insertions(+) create mode 100644 ReallifeGamemode.Client/Event/event.ts diff --git a/ReallifeGamemode.Client/Event/event.ts b/ReallifeGamemode.Client/Event/event.ts new file mode 100644 index 00000000..eafdb730 --- /dev/null +++ b/ReallifeGamemode.Client/Event/event.ts @@ -0,0 +1,34 @@ +import * as NativeUI from '../libs/NativeUI'; + +const Menu = NativeUI.Menu; +const UIMenuItem = NativeUI.UIMenuItem; +const UIMenuListItem = NativeUI.UIMenuListItem; +const UIMenuCheckboxItem = NativeUI.UIMenuCheckboxItem; +const BadgeStyle = NativeUI.BadgeStyle; +const Point = NativeUI.Point; +const ItemsCollection = NativeUI.ItemsCollection; +const Color = NativeUI.Color; + +let ggbItem = new UIMenuItem("Gut gegen Boese", ""); +ggbItem.BackColor = new Color(42, 46, 49); + +export default function createEvent(globalData: IGlobalData) { + + var eventMenu: NativeUI.Menu; + let screenRes = mp.game.graphics.getScreenResolution(0, 0); + + mp.events.add('showEventMenu', () => { + + if (!globalData.InMenu) { + globalData.InMenu = true; + + eventMenu = new Menu("Event starten", "", new Point(0, screenRes.y / 3), null, null); + eventMenu.AddItem(ggbItem); + eventMenu.Visible = true; + + eventMenu.MenuClose.on(() => { + globalData.InMenu = false; + }); + } + }); +} \ No newline at end of file diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index ed036f49..db79857d 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -545,6 +545,18 @@ namespace ReallifeGamemode.Server.Commands #region Admin + [Command("event", "~m~Benutzung: ~s~/event")] + public void CmdAdminEvent(Player player) + { + if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) + { + ChatService.NotAuthorized(player); + return; + } + + player.TriggerEvent("showEventMenu"); + } + [Command("countdown", "~m~Benutzung: ~s~/countdown [Zeit] [Text]", GreedyArg = true)] public void CmdAdminCountdown(Player player, string timer_string, string text) { diff --git a/ReallifeGamemode.Server/Commands/FactionCommands.cs b/ReallifeGamemode.Server/Commands/FactionCommands.cs index f6ad5d2a..83968304 100644 --- a/ReallifeGamemode.Server/Commands/FactionCommands.cs +++ b/ReallifeGamemode.Server/Commands/FactionCommands.cs @@ -402,10 +402,17 @@ namespace ReallifeGamemode.Server.Commands ChatService.ErrorMessage(player, "Der Spieler hat eine Revivesperre"); return; } + using (var dbContext = new DatabaseContext()) { var deadPlayerUser = deadPlayer.GetUser(dbContext); + if (deadPlayerUser.Wanteds > 0) + { + ChatService.ErrorMessage(player, "Dieser Spieler hat Wanteds"); + return; + } + if (deadPlayerUser.Handmoney >= 100) { deadPlayerUser.Handmoney -= 100; From 9820bc3850002389e4ae16a9919c07af0c93b96a Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 02:00:54 +0200 Subject: [PATCH 123/138] =?UTF-8?q?raus=20mit=20dem=20m=C3=BCll,=20kommt?= =?UTF-8?q?=20sp=C3=A4ter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Client/Event/event.ts | 34 ------------------- .../Commands/AdminCommands.cs | 14 +------- 2 files changed, 1 insertion(+), 47 deletions(-) delete mode 100644 ReallifeGamemode.Client/Event/event.ts diff --git a/ReallifeGamemode.Client/Event/event.ts b/ReallifeGamemode.Client/Event/event.ts deleted file mode 100644 index eafdb730..00000000 --- a/ReallifeGamemode.Client/Event/event.ts +++ /dev/null @@ -1,34 +0,0 @@ -import * as NativeUI from '../libs/NativeUI'; - -const Menu = NativeUI.Menu; -const UIMenuItem = NativeUI.UIMenuItem; -const UIMenuListItem = NativeUI.UIMenuListItem; -const UIMenuCheckboxItem = NativeUI.UIMenuCheckboxItem; -const BadgeStyle = NativeUI.BadgeStyle; -const Point = NativeUI.Point; -const ItemsCollection = NativeUI.ItemsCollection; -const Color = NativeUI.Color; - -let ggbItem = new UIMenuItem("Gut gegen Boese", ""); -ggbItem.BackColor = new Color(42, 46, 49); - -export default function createEvent(globalData: IGlobalData) { - - var eventMenu: NativeUI.Menu; - let screenRes = mp.game.graphics.getScreenResolution(0, 0); - - mp.events.add('showEventMenu', () => { - - if (!globalData.InMenu) { - globalData.InMenu = true; - - eventMenu = new Menu("Event starten", "", new Point(0, screenRes.y / 3), null, null); - eventMenu.AddItem(ggbItem); - eventMenu.Visible = true; - - eventMenu.MenuClose.on(() => { - globalData.InMenu = false; - }); - } - }); -} \ No newline at end of file diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index db79857d..d312239c 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.Http; @@ -545,18 +545,6 @@ namespace ReallifeGamemode.Server.Commands #region Admin - [Command("event", "~m~Benutzung: ~s~/event")] - public void CmdAdminEvent(Player player) - { - if (!player.GetUser()?.IsAdmin(AdminLevel.ADMIN) ?? true) - { - ChatService.NotAuthorized(player); - return; - } - - player.TriggerEvent("showEventMenu"); - } - [Command("countdown", "~m~Benutzung: ~s~/countdown [Zeit] [Text]", GreedyArg = true)] public void CmdAdminCountdown(Player player, string timer_string, string text) { From 62b1c1ccaaf55fb78d115b5502ad14681fd3bb20 Mon Sep 17 00:00:00 2001 From: Luke Date: Mon, 26 Apr 2021 00:02:24 +0000 Subject: [PATCH 124/138] Eingabefeld (Chat) angepasst. War im Halbschlaf --- ReallifeGamemode.Client/assets/css/chat/main.css | 6 +++--- ReallifeGamemode.Client/assets/css/chat/main.css.map | 2 +- ReallifeGamemode.Client/assets/css/chat/main.scss | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css b/ReallifeGamemode.Client/assets/css/chat/main.css index 913b65ce..a8d28c93 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css +++ b/ReallifeGamemode.Client/assets/css/chat/main.css @@ -87,10 +87,10 @@ a { font-family: inherit; font-size: inherit; font-weight: inherit; - line-height: inherit; + line-height: 1; color: white; background: rgba(0, 0, 0, 0.5); - padding: .25em .5em .5em .5em; + padding: .25em .5em .5em; } ::-webkit-scrollbar { @@ -105,4 +105,4 @@ a { ::-webkit-scrollbar-thumb:hover { background: rgba(255, 17, 0, 0); } -/*# sourceMappingURL=main.css.map */ +/*# sourceMappingURL=main.css.map */ \ No newline at end of file diff --git a/ReallifeGamemode.Client/assets/css/chat/main.css.map b/ReallifeGamemode.Client/assets/css/chat/main.css.map index 4a9f1c6a..7f240a1f 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.css.map +++ b/ReallifeGamemode.Client/assets/css/chat/main.css.map @@ -1,6 +1,6 @@ { "version": 3, - "mappings": "AAAA,AAAA,IAAI,CAAC;EAAE,UAAU,EAAE,UAAU;CAAI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EACV,MAAM,EAAE,IAAI;EACZ,aAAa,EAAE,GAAG;EAElB,WAAW,EAAE,OAAO;EACpB,SAAS,EAAE,OAAO;EAClB,WAAW,EAAE,OAAO;EACpB,WAAW,EAAE,CAAC;EAEd,KAAK,EAAE,KAAK;EACZ,UAAU,EAAE,kBAAiB;EAE7B,OAAO,EAAE,eAAe;CACzB;;AAGH,AAAA,mBAAmB,CAAC;EAClB,KAAK,EAAE,IAAI;CAQZ;;AATD,AAGE,mBAHiB,AAGhB,MAAM,CAAC;EACN,UAAU,EAAE,mBAAmB;EAC/B,aAAa,EAAE,GAAG;CAGnB;;AARH,AAOI,mBAPe,AAGhB,MAAM,AAIJ,MAAM,CAAC;EAAE,UAAU,EAAE,mBAAmB;CAAI", "sources": [ "main.scss" ], diff --git a/ReallifeGamemode.Client/assets/css/chat/main.scss b/ReallifeGamemode.Client/assets/css/chat/main.scss index d397ad66..b0de6970 100644 --- a/ReallifeGamemode.Client/assets/css/chat/main.scss +++ b/ReallifeGamemode.Client/assets/css/chat/main.scss @@ -74,12 +74,12 @@ a { text-decoration: none; } font-family: inherit; font-size: inherit; font-weight: inherit; - line-height: inherit; + line-height: 1; color: white; background: rgba(0, 0, 0, .5); - padding: .25em .5em .5em .5em; + padding: .25em .5em .5em; } } @@ -92,4 +92,4 @@ a { text-decoration: none; } &:hover { background: rgba(255, 17, 0, 0); } } -} \ No newline at end of file +} From 304efcebbb9987ff931d3c5ed672defc30f40b2f Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 02:09:04 +0200 Subject: [PATCH 125/138] =?UTF-8?q?=C3=BCberweisung=20benachrichtigung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Bank/bank.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs index 6b2788d8..45e0db70 100644 --- a/ReallifeGamemode.Server/Bank/bank.cs +++ b/ReallifeGamemode.Server/Bank/bank.cs @@ -202,6 +202,7 @@ namespace ReallifeGamemode.Server.Bank else { player.SendNotification($"~w~Du hast {target.Name} $~g~{amount} ~w~Überwiesen."); + target.SendNotification($"~w~{player.Name} hat dir $~g~{amount} ~w~Überwiesen."); player.GetUser(dbContext).Faction.BankAccount.Balance -= (int)(amount * 1.05); target.GetUser(dbContext).otheramount += amount; dbContext.SaveChanges(); From cd601c4a875a7e04c8dfc3634a8c883cea79f588 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 02:20:48 +0200 Subject: [PATCH 126/138] =?UTF-8?q?=C3=BCberweisung=20benachrichtigung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Bank/bank.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Bank/bank.cs b/ReallifeGamemode.Server/Bank/bank.cs index 45e0db70..145b97ce 100644 --- a/ReallifeGamemode.Server/Bank/bank.cs +++ b/ReallifeGamemode.Server/Bank/bank.cs @@ -150,6 +150,7 @@ namespace ReallifeGamemode.Server.Bank else { player.SendNotification($"~w~Du hast {target.Name} $~g~{amount} ~w~Überwiesen."); + target.SendNotification($"~w~{player.Name} hat dir $~g~{amount} ~w~Überwiesen."); player.GetUser(dbContext).BankAccount.Balance -= (int)(amount * 1.05); target.GetUser(dbContext).otheramount += amount; dbContext.SaveChanges(); @@ -202,7 +203,6 @@ namespace ReallifeGamemode.Server.Bank else { player.SendNotification($"~w~Du hast {target.Name} $~g~{amount} ~w~Überwiesen."); - target.SendNotification($"~w~{player.Name} hat dir $~g~{amount} ~w~Überwiesen."); player.GetUser(dbContext).Faction.BankAccount.Balance -= (int)(amount * 1.05); target.GetUser(dbContext).otheramount += amount; dbContext.SaveChanges(); From 0ab081cccb1e371b83ab5a8336dd7194a8383609 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 21:18:51 +0200 Subject: [PATCH 127/138] =?UTF-8?q?neuer=20knast:=20punkte=20ge=C3=A4ndert?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReallifeGamemode.Server/Events/Death.cs | 2 +- ReallifeGamemode.Server/Events/Login.cs | 4 +-- ReallifeGamemode.Server/Finance/Economy.cs | 2 +- ReallifeGamemode.Server/Wanted/Jail.cs | 42 +++++++++++++++------- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 872632fa..5f980db3 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -148,7 +148,7 @@ namespace ReallifeGamemode.Server.Events if (copNearby) { user.SetJailTime(true, dbContext); - Jail.Check_PutBehindBars(user); + Jail.Check_PutBehindBars(user, "cell"); ChatService.HQMessage(user.Name + " wurde ins Gefängnis eingeliefert."); } else diff --git a/ReallifeGamemode.Server/Events/Login.cs b/ReallifeGamemode.Server/Events/Login.cs index a4357238..639baff4 100644 --- a/ReallifeGamemode.Server/Events/Login.cs +++ b/ReallifeGamemode.Server/Events/Login.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using GTANetworkAPI; using Microsoft.EntityFrameworkCore; using Newtonsoft.Json; @@ -164,7 +164,7 @@ namespace ReallifeGamemode.Server.Events } else { - Jail.Check_PutBehindBars(user); + Jail.Check_PutBehindBars(user, "cell"); } player.Dimension = 0; diff --git a/ReallifeGamemode.Server/Finance/Economy.cs b/ReallifeGamemode.Server/Finance/Economy.cs index 3e5cfce8..4bf28832 100644 --- a/ReallifeGamemode.Server/Finance/Economy.cs +++ b/ReallifeGamemode.Server/Finance/Economy.cs @@ -200,7 +200,7 @@ namespace ReallifeGamemode.Server.Finance if (putInJail != 0 && minusJail) { - Jail.Check_PutBehindBars(u); + Jail.Check_PutBehindBars(u, "cell"); } } diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 745a12e1..f5c06a7c 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -19,7 +19,18 @@ namespace ReallifeGamemode.Server.Wanted { private static Dictionary Jailtime { get; set; } = new Dictionary(); //time in seconds - public static void Check_PutBehindBars(User user) + private static Vector3 JailIn_Point = new Vector3(1690.754, 2591.0464, 45.914402); + private static int JailIn_Range = 3; + private static Vector3 JailOut_Point = new Vector3(1848.3097, 2585.9036, 45.67201); + + private static List prisonCells = new List() { + new Vector3(1629.2026, 2569.8057, 45.564846), + new Vector3(1642.7831, 2570.2622, 45.56483), + new Vector3(1651.512, 2570.2249, 45.564907) + }; + + //positionInJail: ENTWEDER "cell" ODER "outside" + public static void Check_PutBehindBars(User user, String positionInJail) { user.SetBlipAndNametagColor(); Player player = user.Player; @@ -31,15 +42,19 @@ namespace ReallifeGamemode.Server.Wanted player.ClearAnimation(); player.SafeSetHealth(100); player.Armor = 0; - Random rnd = new Random(); - int rndInt = rnd.Next(1, 3); - Vector3 position = new Vector3(); - if (rndInt == 1) - position = new Vector3(458.9842, -997.2126, 24.91485); //send client to jail - if (rndInt == 2) - position = new Vector3(459.696, -994.3766, 24.91486); //send client to jail - if (rndInt == 3) - position = new Vector3(458.3372, -1001.258, 24.91485); //send client to jail + + Vector3 position = null; + + if (positionInJail == "cell") + { + Random rnd = new Random(); + int rndInt = rnd.Next(1, 3); + position = prisonCells[rndInt]; + + } else if (positionInJail == "outside") + { + position = new Vector3(1691.42, 2562.77, 45.56); + } player.SafeTeleport(position, 0, true); @@ -78,7 +93,7 @@ namespace ReallifeGamemode.Server.Wanted using var dbContext = new DatabaseContext(); foreach (var player in NAPI.Pools.GetAllPlayers()) { - if (player.Position.DistanceTo(new Vector3(458.9842, -997.2126, 24.91485)) > 7) + if (player.Position.DistanceTo(JailIn_Point) > JailIn_Range) { continue; } @@ -98,7 +113,8 @@ namespace ReallifeGamemode.Server.Wanted user.SetBlipAndNametagColor(); user.AnnouncePlayerJailedIn(); dbContext.SaveChanges(); - Check_PutBehindBars(user); + //HERE: Freilauf + Check_PutBehindBars(user, "outside"); break; } } @@ -139,7 +155,7 @@ namespace ReallifeGamemode.Server.Wanted if (user.JailTime <= 0) { Jailtime.Remove(user.Id); - player.SafeTeleport(new Vector3(427.879, -984.65, 30.71)); + player.SafeTeleport(JailOut_Point); player.TriggerEvent("jailTime", 0); return; } From eff0f226be6be50685f62f33d0e973ba1ffcb003 Mon Sep 17 00:00:00 2001 From: Luke Date: Mon, 26 Apr 2021 19:53:16 +0000 Subject: [PATCH 128/138] rechtschreibung schlechtschreibung --- ReallifeGamemode.Client/Player/weaponlist.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ReallifeGamemode.Client/Player/weaponlist.ts b/ReallifeGamemode.Client/Player/weaponlist.ts index 49f640c0..cba4f2d6 100644 --- a/ReallifeGamemode.Client/Player/weaponlist.ts +++ b/ReallifeGamemode.Client/Player/weaponlist.ts @@ -1,4 +1,4 @@ -import * as NativeUI from '../libs/NativeUI'; +import * as NativeUI from '../libs/NativeUI'; const Menu = NativeUI.Menu; const UIMenuItem = NativeUI.UIMenuItem; @@ -10,7 +10,7 @@ const ItemsCollection = NativeUI.ItemsCollection; const Color = NativeUI.Color; let screenRes = mp.game.graphics.getScreenResolution(0, 0); -let saveItem = new UIMenuItem("Waffen Nehmen", ""); +let saveItem = new UIMenuItem("Waffen nehmen", ""); saveItem.BackColor = new Color(13, 71, 161); saveItem.HighlightedBackColor = new Color(25, 118, 210); @@ -131,7 +131,7 @@ export default function weaponList(globalData: IGlobalData) { weaponMenu.ItemSelect.on((item) => { - if (item.Text === "Waffen Nehmen") { + if (item.Text === "Waffen nehmen") { mp.events.callRemote("saveWeaponSelection", primary, secondary, melee, specialWep, armor); weaponMenu.Close(); globalData.InMenu = false; @@ -150,4 +150,4 @@ export default function weaponList(globalData: IGlobalData) { }); } }); -} \ No newline at end of file +} From 085bffb9cfe58f3adf882e82a3e1d4a1efe4a2c8 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 21:55:53 +0200 Subject: [PATCH 129/138] =?UTF-8?q?polygon=20f=C3=BCr=20knast=20drin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Player/{nodm.ts => polygons.ts} | 32 ++++++++++++++++++- ReallifeGamemode.Client/index.ts | 4 +-- ReallifeGamemode.Server/Wanted/Jail.cs | 2 +- 3 files changed, 34 insertions(+), 4 deletions(-) rename ReallifeGamemode.Client/Player/{nodm.ts => polygons.ts} (54%) diff --git a/ReallifeGamemode.Client/Player/nodm.ts b/ReallifeGamemode.Client/Player/polygons.ts similarity index 54% rename from ReallifeGamemode.Client/Player/nodm.ts rename to ReallifeGamemode.Client/Player/polygons.ts index bffea4fc..66edb397 100644 --- a/ReallifeGamemode.Client/Player/nodm.ts +++ b/ReallifeGamemode.Client/Player/polygons.ts @@ -1,5 +1,31 @@ import polygons from "../polygons"; +//Start: Eingang direkt rechts, rechts entlang +const prisonVector1 = new mp.Vector3(1809.99365234375, 2612.373291015625, 45.50623321533203); +const prisonVector2 = new mp.Vector3(1810.377197265625, 2620.338623046875, 45.51300048828125); +const prisonVector3 = new mp.Vector3(1835.8336181640625, 2688.819091796875, 45.4307975769043); +const prisonVector4 = new mp.Vector3(1830.5731201171875, 2703.89990234375, 45.42714309692383); +const prisonVector5 = new mp.Vector3(1776.7342529296875, 2747.79052734375, 45.42777633666992); +const prisonVector6 = new mp.Vector3(1762.360107421875, 2752.788818359375, 45.42710494995117); +const prisonVector7 = new mp.Vector3(1662.0726318359375, 2749.177001953125, 45.444488525390625); +const prisonVector8 = new mp.Vector3(1648.1600341796875, 2742.01611328125, 45.441619873046875); +const prisonVector9 = new mp.Vector3(1584.302978515625, 2679.99072265625, 45.47876739501953); +const prisonVector10 = new mp.Vector3(1575.2301025390625, 2667.2109375, 45.48185729980469); +const prisonVector11 = new mp.Vector3(1547.1693115234375, 2591.489990234375, 45.388912200927734); +const prisonVector12 = new mp.Vector3(1546.39892578125, 2576.266845703125, 45.38877868652344); +const prisonVector13 = new mp.Vector3(1550.493896484375, 2482.98388671875, 45.38750076293945); +const prisonVector14 = new mp.Vector3(1557.9322509765625, 2468.98681640625, 45.387237548828125); +const prisonVector15 = new mp.Vector3(1652.527099609375, 2409.1259765625, 45.40341567993164); +const prisonVector16 = new mp.Vector3(1667.7176513671875, 2407.0595703125, 45.401432037353516); +const prisonVector17 = new mp.Vector3(1749.3123779296875, 2419.23779296875, 45.42228698730469); +const prisonVector18 = new mp.Vector3(1762.95849609375, 2426.209228515625, 45.42059326171875); +const prisonVector19 = new mp.Vector3(1809.08837890625, 2473.969970703125, 45.445960998535156); +const prisonVector20 = new mp.Vector3(1814.2039794921875, 2489.00830078125, 45.44499588012695); +const prisonVector21 = new mp.Vector3(1807.0340576171875, 2535.93212890625, 43.4123420715332); +const prisonVector22 = new mp.Vector3(1809.77587890625, 2590.69775390625, 43.41337966918945); +const prisonVector23 = new mp.Vector3(1819.170654296875, 2597.941650390625, 45.525978088378906); +const prisonVector24 = new mp.Vector3(1819.3084716796875, 2612.3154296875, 45.52067947387695); + const busbaseVector1 = new mp.Vector3(-522.4485, -2138.7021, 7.7564063); const busbaseVector2 = new mp.Vector3(-584.9822, -2072.467, 5.9921026); const busbaseVector3 = new mp.Vector3(-669.1689, -2172.7917, 6.009973); @@ -37,10 +63,14 @@ const polygon_pilotAnfaenger = polygons.add([pilotAnfaengerVector1, pilotAnfaeng const polygon_pilotProfi = polygons.add([pilotProfiVector1, pilotProfiVector2, pilotProfiVector3, pilotProfiVector4], 15, false, [255, 155, 0, 255], 0); const polygon_muellbase = polygons.add([muellbaseVector1, muellbaseVector2, muellbaseVector3], 15, false, [255, 155, 0, 255], 0); +const polygon_prison = polygons.add([prisonVector1, prisonVector2, prisonVector3, prisonVector4, prisonVector5, prisonVector6, prisonVector7, prisonVector8, + prisonVector9, prisonVector10, prisonVector11, prisonVector12, prisonVector13, prisonVector14, prisonVector15, prisonVector16, + prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 25, true, [255, 155, 0, 255], 0); + export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase]; export let isInAnyNoDMPolygon; -export default function nodmHandler() { +export default function polygonHandler() { mp.events.add('playerEnterPolygon', (polygon) => { diff --git a/ReallifeGamemode.Client/index.ts b/ReallifeGamemode.Client/index.ts index 0ec8ef2d..decabaff 100644 --- a/ReallifeGamemode.Client/index.ts +++ b/ReallifeGamemode.Client/index.ts @@ -186,8 +186,8 @@ ped(); import reportList from './Player/reportmenu'; reportList(globalData); -import nodmHandler from './Player/nodm'; -nodmHandler(); +import polygonHandler from './Player/polygons'; +polygonHandler(); import checkpointHandle from './util/checkpoint'; checkpointHandle(globalData); diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index f5c06a7c..7dd7509a 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -29,7 +29,7 @@ namespace ReallifeGamemode.Server.Wanted new Vector3(1651.512, 2570.2249, 45.564907) }; - //positionInJail: ENTWEDER "cell" ODER "outside" + //positionInJail: ENTWEDER "cell" ODER "outside", TODO: enum oder sowas public static void Check_PutBehindBars(User user, String positionInJail) { user.SetBlipAndNametagColor(); From 9c1942bfb22e3ba4459c71c2f5ef6df162395f2b Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 21:59:35 +0200 Subject: [PATCH 130/138] fixxxxx --- ReallifeGamemode.Client/util/weapondamage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/util/weapondamage.ts b/ReallifeGamemode.Client/util/weapondamage.ts index cd3ea62d..c631b268 100644 --- a/ReallifeGamemode.Client/util/weapondamage.ts +++ b/ReallifeGamemode.Client/util/weapondamage.ts @@ -1,4 +1,4 @@ -import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/nodm"; +import { isInAnyNoDMPolygon, listNoDMZones } from "../Player/polygons"; import polygons from "../polygons"; import { getWantedCount } from "../Gui/wanteds"; import { spawnschutzEnabled } from "../Player/spawnschutz"; From 543accf718633518f66f654a8273a5ad83a9693d Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 22:07:52 +0200 Subject: [PATCH 131/138] knast vectoren angepasst --- ReallifeGamemode.Client/Player/polygons.ts | 50 +++++++++++----------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/ReallifeGamemode.Client/Player/polygons.ts b/ReallifeGamemode.Client/Player/polygons.ts index 66edb397..a8e859e1 100644 --- a/ReallifeGamemode.Client/Player/polygons.ts +++ b/ReallifeGamemode.Client/Player/polygons.ts @@ -1,30 +1,30 @@ import polygons from "../polygons"; //Start: Eingang direkt rechts, rechts entlang -const prisonVector1 = new mp.Vector3(1809.99365234375, 2612.373291015625, 45.50623321533203); -const prisonVector2 = new mp.Vector3(1810.377197265625, 2620.338623046875, 45.51300048828125); -const prisonVector3 = new mp.Vector3(1835.8336181640625, 2688.819091796875, 45.4307975769043); -const prisonVector4 = new mp.Vector3(1830.5731201171875, 2703.89990234375, 45.42714309692383); -const prisonVector5 = new mp.Vector3(1776.7342529296875, 2747.79052734375, 45.42777633666992); -const prisonVector6 = new mp.Vector3(1762.360107421875, 2752.788818359375, 45.42710494995117); -const prisonVector7 = new mp.Vector3(1662.0726318359375, 2749.177001953125, 45.444488525390625); -const prisonVector8 = new mp.Vector3(1648.1600341796875, 2742.01611328125, 45.441619873046875); -const prisonVector9 = new mp.Vector3(1584.302978515625, 2679.99072265625, 45.47876739501953); -const prisonVector10 = new mp.Vector3(1575.2301025390625, 2667.2109375, 45.48185729980469); -const prisonVector11 = new mp.Vector3(1547.1693115234375, 2591.489990234375, 45.388912200927734); -const prisonVector12 = new mp.Vector3(1546.39892578125, 2576.266845703125, 45.38877868652344); -const prisonVector13 = new mp.Vector3(1550.493896484375, 2482.98388671875, 45.38750076293945); -const prisonVector14 = new mp.Vector3(1557.9322509765625, 2468.98681640625, 45.387237548828125); -const prisonVector15 = new mp.Vector3(1652.527099609375, 2409.1259765625, 45.40341567993164); -const prisonVector16 = new mp.Vector3(1667.7176513671875, 2407.0595703125, 45.401432037353516); -const prisonVector17 = new mp.Vector3(1749.3123779296875, 2419.23779296875, 45.42228698730469); -const prisonVector18 = new mp.Vector3(1762.95849609375, 2426.209228515625, 45.42059326171875); -const prisonVector19 = new mp.Vector3(1809.08837890625, 2473.969970703125, 45.445960998535156); -const prisonVector20 = new mp.Vector3(1814.2039794921875, 2489.00830078125, 45.44499588012695); -const prisonVector21 = new mp.Vector3(1807.0340576171875, 2535.93212890625, 43.4123420715332); -const prisonVector22 = new mp.Vector3(1809.77587890625, 2590.69775390625, 43.41337966918945); -const prisonVector23 = new mp.Vector3(1819.170654296875, 2597.941650390625, 45.525978088378906); -const prisonVector24 = new mp.Vector3(1819.3084716796875, 2612.3154296875, 45.52067947387695); +const prisonVector1 = new mp.Vector3(1809.99365234375, 2612.373291015625, 40.50623321533203); +const prisonVector2 = new mp.Vector3(1810.377197265625, 2620.338623046875, 40.51300048828125); +const prisonVector3 = new mp.Vector3(1835.8336181640625, 2688.819091796875, 40.4307975769043); +const prisonVector4 = new mp.Vector3(1830.5731201171875, 2703.89990234375, 40.42714309692383); +const prisonVector5 = new mp.Vector3(1776.7342529296875, 2747.79052734375, 40.42777633666992); +const prisonVector6 = new mp.Vector3(1762.360107421875, 2752.788818359375, 40.42710494995117); +const prisonVector7 = new mp.Vector3(1662.0726318359375, 2749.177001953125, 40.444488525390625); +const prisonVector8 = new mp.Vector3(1648.1600341796875, 2742.01611328125, 40.441619873046875); +const prisonVector9 = new mp.Vector3(1584.302978515625, 2679.99072265625, 40.47876739501953); +const prisonVector10 = new mp.Vector3(1575.2301025390625, 2667.2109375, 40.48185729980469); +const prisonVector11 = new mp.Vector3(1547.1693115234375, 2591.489990234375, 40.388912200927734); +const prisonVector12 = new mp.Vector3(1546.39892578125, 2576.266845703125, 40.38877868652344); +const prisonVector13 = new mp.Vector3(1550.493896484375, 2482.98388671875, 40.38750076293945); +const prisonVector14 = new mp.Vector3(1557.9322509765625, 2468.98681640625, 40.387237548828125); +const prisonVector15 = new mp.Vector3(1652.527099609375, 2409.1259765625, 40.40341567993164); +const prisonVector16 = new mp.Vector3(1667.7176513671875, 2407.0595703125, 40.401432037353516); +const prisonVector17 = new mp.Vector3(1749.3123779296875, 2419.23779296875, 40.42228698730469); +const prisonVector18 = new mp.Vector3(1762.95849609375, 2426.209228515625, 40.42059326171875); +const prisonVector19 = new mp.Vector3(1809.08837890625, 2473.969970703125, 40.445960998535156); +const prisonVector20 = new mp.Vector3(1814.2039794921875, 2489.00830078125, 40.44499588012695); +const prisonVector21 = new mp.Vector3(1807.0340576171875, 2535.93212890625, 38.4123420715332); +const prisonVector22 = new mp.Vector3(1809.77587890625, 2590.69775390625, 38.41337966918945); +const prisonVector23 = new mp.Vector3(1819.170654296875, 2597.941650390625, 40.525978088378906); +const prisonVector24 = new mp.Vector3(1819.3084716796875, 2612.3154296875, 40.52067947387695); const busbaseVector1 = new mp.Vector3(-522.4485, -2138.7021, 7.7564063); const busbaseVector2 = new mp.Vector3(-584.9822, -2072.467, 5.9921026); @@ -65,7 +65,7 @@ const polygon_muellbase = polygons.add([muellbaseVector1, muellbaseVector2, muel const polygon_prison = polygons.add([prisonVector1, prisonVector2, prisonVector3, prisonVector4, prisonVector5, prisonVector6, prisonVector7, prisonVector8, prisonVector9, prisonVector10, prisonVector11, prisonVector12, prisonVector13, prisonVector14, prisonVector15, prisonVector16, - prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 25, true, [255, 155, 0, 255], 0); + prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 40, true, [255, 155, 0, 255], 0); export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase]; export let isInAnyNoDMPolygon; From 259965c289de5d84659048e3d39c7170f6ff3800 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 22:16:32 +0200 Subject: [PATCH 132/138] fixed dummen error --- ReallifeGamemode.Server/Events/Death.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Server/Events/Death.cs b/ReallifeGamemode.Server/Events/Death.cs index 5f980db3..c41bbb90 100644 --- a/ReallifeGamemode.Server/Events/Death.cs +++ b/ReallifeGamemode.Server/Events/Death.cs @@ -163,7 +163,7 @@ namespace ReallifeGamemode.Server.Events { user.Dead = true; - if (user.Wanteds > 0 || !player.HasData("reviveSperre") && player.GetData("isDead") == false && !player.HasData("inGangWar") && player.GetData("SAdminduty") == false) + if (user.Wanteds == 0 && !player.HasData("reviveSperre") && player.GetData("isDead") == false && !player.HasData("inGangWar") && player.GetData("SAdminduty") == false) { //MEDIC AUFTRAG MedicTask reviveTask = new MedicTask() From d661c3ede51214af15234e6ab4837851ec161bb3 Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 22:34:44 +0200 Subject: [PATCH 133/138] knastausbruch im neuen knast --- ReallifeGamemode.Client/Player/polygons.ts | 8 ++++ ReallifeGamemode.Server/Util/ThreadTimers.cs | 11 ----- ReallifeGamemode.Server/Wanted/Jail.cs | 50 +++++++++++--------- 3 files changed, 36 insertions(+), 33 deletions(-) diff --git a/ReallifeGamemode.Client/Player/polygons.ts b/ReallifeGamemode.Client/Player/polygons.ts index a8e859e1..c20be858 100644 --- a/ReallifeGamemode.Client/Player/polygons.ts +++ b/ReallifeGamemode.Client/Player/polygons.ts @@ -86,5 +86,13 @@ export default function polygonHandler() { mp.events.call('toggleNoDmZone', false); isInAnyNoDMPolygon = false; } + + if (polygon == polygon_prison) { + mp.events.callRemote("SERVER:CheckPlayerInJail"); + } + }); + + mp.events.add('CLIENT:PrisonBreakout', () => { + mp.events.callRemote("SERVER:PrisonBreakout"); }); } diff --git a/ReallifeGamemode.Server/Util/ThreadTimers.cs b/ReallifeGamemode.Server/Util/ThreadTimers.cs index 7b5db17b..5d205ae6 100644 --- a/ReallifeGamemode.Server/Util/ThreadTimers.cs +++ b/ReallifeGamemode.Server/Util/ThreadTimers.cs @@ -32,9 +32,6 @@ namespace ReallifeGamemode.Server.Util timer5000.Start(); timer5000.Elapsed += Timer5000_Elapsed; - timer10000.Start(); - timer10000.Elapsed += Timer10000_Elapsed; - timer60000.Start(); timer60000.Elapsed += Timer60000_Elapsed; } @@ -78,14 +75,6 @@ namespace ReallifeGamemode.Server.Util }); } - private static void Timer10000_Elapsed(object sender, ElapsedEventArgs e) - { - NAPI.Task.Run(() => - { - Jail.BrakeOut_Elapsed(); - }); - } - private static void Timer2500_Elapsed(object sender, ElapsedEventArgs e) { NAPI.Task.Run(() => diff --git a/ReallifeGamemode.Server/Wanted/Jail.cs b/ReallifeGamemode.Server/Wanted/Jail.cs index 7dd7509a..0630228b 100644 --- a/ReallifeGamemode.Server/Wanted/Jail.cs +++ b/ReallifeGamemode.Server/Wanted/Jail.cs @@ -51,7 +51,8 @@ namespace ReallifeGamemode.Server.Wanted int rndInt = rnd.Next(1, 3); position = prisonCells[rndInt]; - } else if (positionInJail == "outside") + } + else if (positionInJail == "outside") { position = new Vector3(1691.42, 2562.77, 45.56); } @@ -123,27 +124,6 @@ namespace ReallifeGamemode.Server.Wanted } } - public static void BrakeOut_Elapsed() - { - foreach (var player in NAPI.Pools.GetAllPlayers()) - { - User user = player.GetUser(); - - if (user != null && player.Position.DistanceTo2D(new Vector3(458.9842, -997.2126, 24.91485)) > 7 && Jailtime.ContainsKey(user.Id)) - { - using (var dbContext = new DatabaseContext()) - { - user = player.GetUser(dbContext); - user.JailTime = 0; - user.GiveWanteds(null, 50, "Knast-Ausbruch"); - player.TriggerEvent("jailTime", 0); - dbContext.SaveChanges(); - Jailtime.Remove(user.Id); - } - } - } - } - public static void JailOut_Elapsed() { using var dbContext = new DatabaseContext(); @@ -227,5 +207,31 @@ namespace ReallifeGamemode.Server.Wanted target.TriggerEvent("jailTime", 0); } } + + [RemoteEvent("SERVER:PrisonBreakout")] + public static void BrakeOut_Elapsed(Player player) + { + User user = player.GetUser(); + + using (var dbContext = new DatabaseContext()) + { + user = player.GetUser(dbContext); + user.JailTime = 0; + user.GiveWanteds(null, 50, "Knast-Ausbruch"); + player.TriggerEvent("jailTime", 0); + dbContext.SaveChanges(); + Jailtime.Remove(user.Id); + } + } + + [RemoteEvent("SERVER:CheckPlayerInJail")] + public void checkPlayerInJail(Player player) + { + User user = player.GetUser(); + if (Jailtime.ContainsKey(user.Id)) + { + player.TriggerEvent("CLIENT:PrisonBreakout"); + } + } } } From 8aa35ea15fc1f621e7f0e8efc2d9887cb0afd17b Mon Sep 17 00:00:00 2001 From: Fabian Date: Mon, 26 Apr 2021 22:39:39 +0200 Subject: [PATCH 134/138] knast polygon unsichtbar es funktioniert juhu --- ReallifeGamemode.Client/Player/polygons.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/Player/polygons.ts b/ReallifeGamemode.Client/Player/polygons.ts index c20be858..0ee4f550 100644 --- a/ReallifeGamemode.Client/Player/polygons.ts +++ b/ReallifeGamemode.Client/Player/polygons.ts @@ -65,7 +65,7 @@ const polygon_muellbase = polygons.add([muellbaseVector1, muellbaseVector2, muel const polygon_prison = polygons.add([prisonVector1, prisonVector2, prisonVector3, prisonVector4, prisonVector5, prisonVector6, prisonVector7, prisonVector8, prisonVector9, prisonVector10, prisonVector11, prisonVector12, prisonVector13, prisonVector14, prisonVector15, prisonVector16, - prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 40, true, [255, 155, 0, 255], 0); + prisonVector17, prisonVector18, prisonVector19, prisonVector20, prisonVector21, prisonVector22, prisonVector23, prisonVector24], 40, false, [255, 155, 0, 255], 0); export let listNoDMZones = [polygon_busbase, polygon_stadthalle, polygon_fahrschule, polygon_pilotAnfaenger, polygon_pilotProfi, polygon_muellbase]; export let isInAnyNoDMPolygon; From 4d081d2114b13cee2d216305d9b83f37cd42339a Mon Sep 17 00:00:00 2001 From: hydrant Date: Mon, 26 Apr 2021 22:56:29 +0200 Subject: [PATCH 135/138] inputhelper kaputt gemacht bis er nicht mehr das spiel kaputt macht --- ReallifeGamemode.Client/assets/html/inputhelper/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReallifeGamemode.Client/assets/html/inputhelper/index.html b/ReallifeGamemode.Client/assets/html/inputhelper/index.html index a83e9194..335e30f4 100644 --- a/ReallifeGamemode.Client/assets/html/inputhelper/index.html +++ b/ReallifeGamemode.Client/assets/html/inputhelper/index.html @@ -24,7 +24,7 @@ - +