Finished migration to TypeScript, temporary disabled char creator

This commit is contained in:
hydrant
2019-03-11 22:17:49 +01:00
parent 715cf3c1e6
commit 8ce3fd6f52
71 changed files with 4800 additions and 4627 deletions

View File

@@ -0,0 +1,37 @@
/**
* @overview Life of German Reallife - Gui Playerlist playerlist.js
* @author VegaZ
* @copyright (c) 2008 - 2018 Life of German
*/
export default function playerList() {
var playerlistBrowser
var pList;
mp.events.add("showPlayerlist", () => {
if (!playerlistBrowser) {
playerlistBrowser = mp.browsers.new('package://Gui/playerlist.html');
mp.gui.chat.activate(false);
mp.gui.cursor.show(true, true);
}
});
mp.events.add("fetchPlayerList", (playersJson) => {
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);
//}