From 60688d217815570814c1af4249a2839c3efd37a4 Mon Sep 17 00:00:00 2001 From: VegaZ Date: Wed, 3 Oct 2018 20:36:18 +0200 Subject: [PATCH] Add Tablefill --- Client/Gui/playerlist.html | 17 +++++++++++++---- Client/Gui/playerlist.js | 17 ++++++++++++++--- 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/Client/Gui/playerlist.html b/Client/Gui/playerlist.html index bb55c176..27f3ec10 100644 --- a/Client/Gui/playerlist.html +++ b/Client/Gui/playerlist.html @@ -8,11 +8,12 @@ - +
+
@@ -21,11 +22,19 @@ - - - +
Ping
+ \ No newline at end of file diff --git a/Client/Gui/playerlist.js b/Client/Gui/playerlist.js index 1c689ddf..21b1e65d 100644 --- a/Client/Gui/playerlist.js +++ b/Client/Gui/playerlist.js @@ -16,8 +16,19 @@ mp.events.add("showPlayerlist", () => { }); mp.events.add("fetchPlayerList", (playersJson) => { - var players = JSON.parse(playersJson); - players.forEach((player) => { + + pList = JSON.parse(playersJson); + + pList.forEach((player) => { mp.gui.chat.push(player.Id + ", " + player.Name + ", " + player.Ping); }); -}); \ No newline at end of file +}); + +//function getTable() { +// var table = ""; +// pList.forEach((player) => { +// var tableRow = "" + player.Id + "" + player.Name + "" + player.Ping + ""; +// table = table + tableRow; +// }) +// return document.write(table); +//} \ No newline at end of file