Add Tablefill

This commit is contained in:
VegaZ
2018-10-03 20:36:18 +02:00
parent e900499893
commit 60688d2178
2 changed files with 27 additions and 7 deletions

View File

@@ -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);
});
});
});
//function getTable() {
// var table = "";
// pList.forEach((player) => {
// var tableRow = "<tr><td>" + player.Id + "</td><td>" + player.Name + "</td><td>" + player.Ping + "</td>";
// table = table + tableRow;
// })
// return document.write(table);
//}