diff --git a/ReallifeGamemode.Client/Gui/playerlist.ts b/ReallifeGamemode.Client/Gui/playerlist.ts index e4d00a66..e4be88ad 100644 --- a/ReallifeGamemode.Client/Gui/playerlist.ts +++ b/ReallifeGamemode.Client/Gui/playerlist.ts @@ -1,6 +1,6 @@ /** * @overview Life of German Reallife - Gui Playerlist playerlist.js - * @author VegaZ + * @author VegaZ. Siga. * @copyright (c) 2008 - 2018 Life of German */ @@ -9,21 +9,25 @@ export default function playerList() { var playerlistBrowser var pList; - mp.events.add("showPlayerlist", () => { + mp.events.add("showPlayerlist", (playersJson) => { if (!playerlistBrowser) { - playerlistBrowser = mp.browsers.new('package://Gui/playerlist.html'); + playerlistBrowser = mp.browsers.new('package://assets/html/Playerlist/Tabliste.html'); mp.gui.chat.activate(false); mp.gui.cursor.show(true, true); + pList = JSON.parse(playersJson); + pList.forEach((player) => { + playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',0,0,'${JSON.stringify(player.Ping)}');`); + }); + } else { + playerlistBrowser.destroy(); + playerlistBrowser = null; + mp.gui.chat.activate(true); + mp.gui.cursor.show(false, false); } }); - mp.events.add("fetchPlayerList", (playersJson) => { - - pList = JSON.parse(playersJson); - - pList.forEach((player) => { - mp.gui.chat.push(player.Id + ", " + player.Name + ", " + player.Ping); - }); + mp.events.add("CEF:fetchPlayerList", () => { + }); } diff --git a/ReallifeGamemode.Client/Player/keys.ts b/ReallifeGamemode.Client/Player/keys.ts index 99cc6feb..996954b0 100644 --- a/ReallifeGamemode.Client/Player/keys.ts +++ b/ReallifeGamemode.Client/Player/keys.ts @@ -96,7 +96,7 @@ export default function keys(globalData: GlobalData) { //O //Spielerliste mp.keys.bind(0x4F, false, function () { - if (!globalData.InChat) { + if (!globalData.InChat && !globalData.InMenu) { mp.events.callRemote("keyPress:O"); //mp.events.call("showPlayerlist"); } diff --git a/ReallifeGamemode.Client/assets/css/inventory/style.css b/ReallifeGamemode.Client/assets/css/inventory/style.css index 32a97152..a4f76446 100644 --- a/ReallifeGamemode.Client/assets/css/inventory/style.css +++ b/ReallifeGamemode.Client/assets/css/inventory/style.css @@ -280,23 +280,10 @@ h5 { } /*Handelfenster */ #tf_betrag { - background-color: #313131; /* blau */ - border: none; - height: 30px; - width: 100% - text-align: center; - text-decoration: none; - display: inline-block; - font-size: 12px; - position: relative; - left: 1.5%; - color:#ffffff; -} -#tf_zahl { background-color: #313131; /* blau */ border: none; height: 30px; - width: 100%; + width: 124px; text-align: center; text-decoration: none; display: inline-block; @@ -305,6 +292,20 @@ h5 { left: 1.5%; color: #ffffff; } +#tf_zahl { + background-color: #313131; /* blau */ + border: none; + height: 30px; + width: 124px; + text-align: center; + text-decoration: none; + display: inline-block; + font-size: 12px; + position: relative; + left: 42%; + top: 40%; + color: #ffffff; +} #tf_name { background-color: #313131; /* blau */ border: none; @@ -347,7 +348,8 @@ h5 { font-size: 16px; font-color: white; position: relative; - left: 1.5%; + left: 42%; + top: 40%; color: #ffffff; } diff --git a/ReallifeGamemode.Client/assets/html/Playerlist/Tabliste.html b/ReallifeGamemode.Client/assets/html/Playerlist/Tabliste.html new file mode 100644 index 00000000..33d0bb9b --- /dev/null +++ b/ReallifeGamemode.Client/assets/html/Playerlist/Tabliste.html @@ -0,0 +1,30 @@ + + +
+ +| ID | +Spielername | +Level | +Fraktion | +Ping | +
|---|
-