client_packages/index.js:
D:\trp\client_packages\cef\hud\id:
packages/gamemode/events.js:
Кто-то знает, почему?
mp.events.add("showID", (id) => {
try {
let idBrowser = mp.browsers.new("packages://cef/hud/id/index.html");
idBrowser.active = true;
idBrowser.execute(
} catch (err) {
console.log(err);
}
});
try {
let idBrowser = mp.browsers.new("packages://cef/hud/id/index.html");
idBrowser.active = true;
idBrowser.execute(
showID(${id})
);} catch (err) {
console.log(err);
}
});
D:\trp\client_packages\cef\hud\id:
<script>
function player_id(id) {
let player_id = document.getElementById("id_player");
player_id.innerHTML = "ID: " + id;
}
</script>
<div class="id_player" id="id_player">ID: NaN</div>
function player_id(id) {
let player_id = document.getElementById("id_player");
player_id.innerHTML = "ID: " + id;
}
</script>
<div class="id_player" id="id_player">ID: NaN</div>
packages/gamemode/events.js:
..
player.call("showID", [player.id]);
..
player.call("showID", [player.id]);
..
Кто-то знает, почему?