Fixed server -> client transport

This commit is contained in:
hydrant
2018-10-03 19:14:58 +02:00
parent e7b2c06e92
commit ef51044840
3 changed files with 11 additions and 11 deletions

View File

@@ -15,10 +15,9 @@ mp.events.add("showPlayerlist", () => {
}
});
mp.events.add("fetchPlayerList", (players) => {
for (var player in players)
{
mp.gui.chat.push(player["Id"] + ", " + player["Name"] + ", " + player["Ping"])
}
mp.events.add("fetchPlayerList", (playersJson) => {
var players = JSON.parse(playersJson);
players.forEach((player) => {
mp.gui.chat.push(player.Id + ", " + player.Name + ", " + player.Ping);
});
});