Fix online list show faction

This commit is contained in:
CroniX
2021-01-23 17:06:09 +01:00
parent 9b5fcffdf6
commit dfc9be29c6
2 changed files with 11 additions and 10 deletions

View File

@@ -9,7 +9,7 @@ export default function playerList(globalData: IGlobalData): void {
var playerlistBrowser: BrowserMp = null;
var pList;
mp.events.add("showPlayerlist", (playersJson, factionname) => {
mp.events.add("showPlayerlist", (playersJson) => {
if (playerlistBrowser !== null) {
playerlistBrowser.destroy();
@@ -25,7 +25,7 @@ export default function playerList(globalData: IGlobalData): void {
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)}',${JSON.stringify(factionname)},'${JSON.stringify(player.Ping)}');`);
playerlistBrowser.execute(`ad_row('${JSON.stringify(player.Id)}','${JSON.stringify(player.Name)}',${JSON.stringify(player.FactionName)},'${JSON.stringify(player.Ping)}');`);
});
}
});