liste kleiner, user kleiner
This commit is contained in:
@@ -12,12 +12,21 @@ setPlayerCount = (factionId, value) => {
|
||||
}
|
||||
}
|
||||
|
||||
function addPlayerEntry(userId, userName, factionId, factionName, userPing) {
|
||||
function getFactionNameByFactionId(factionId) {
|
||||
switch (factionId) {
|
||||
case 1: return "LSPD";
|
||||
case 2: return "LSED";
|
||||
case 3: return "FIB";
|
||||
case 4: return "Trucker";
|
||||
case 5: return "Vagos";
|
||||
case 7: return "Grove Street";
|
||||
case 8: return "Ballas";
|
||||
case 9: return "Weazle News";
|
||||
default: return "Zivilisten";
|
||||
}
|
||||
}
|
||||
|
||||
function addPlayerEntry(userId, userName, factionId, userPing) {
|
||||
var factionName = getFactionNameByFactionId(factionId);
|
||||
document.getElementById('players').innerHTML += `<tr><td>${userId}</td> <td>${userName}</td> <td class="group group--${factionId}">${factionName}</td> <td>${userPing}</td></tr>`;
|
||||
}
|
||||
|
||||
addPlayerEntries = (json) => {
|
||||
JSON.parse(json).forEach(e => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user