added factionname in online list
This commit is contained in:
@@ -16,7 +16,7 @@ export default function playerList() {
|
||||
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)}');`);
|
||||
playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',0,'${JSON.stringify(player.fac)}','${JSON.stringify(player.Ping)}');`);
|
||||
});
|
||||
} else {
|
||||
playerlistBrowser.destroy();
|
||||
|
||||
@@ -16,7 +16,7 @@ function ad_row(id, name, level, faction, ping) {
|
||||
td1.innerHTML = ''+id;
|
||||
td2.innerHTML = name.slice(1, -1);
|
||||
td3.innerHTML = 'WIP';
|
||||
td4.innerHTML = 'WIP';
|
||||
td4.innerHTML = ''+faction;
|
||||
td5.innerHTML = ''+ping;
|
||||
tr.appendChild(td1);
|
||||
tr.appendChild(td2);
|
||||
|
||||
@@ -304,7 +304,8 @@ namespace ReallifeGamemode.Server.Events
|
||||
{
|
||||
Id = p.Handle.Value,
|
||||
p.Name,
|
||||
p.Ping
|
||||
p.Ping,
|
||||
fac = p.GetUser().Faction.Name
|
||||
});
|
||||
player.TriggerEvent("showPlayerlist", JsonConvert.SerializeObject(listPlayers));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user