Fix network player list and enhance Red/Black UI theme

- Fix network player list serialization by using pipe-separated strings
  instead of arrays (fixes "Failed to read network arguments" error)
- Enhanced phone blocking with multiple native calls
- Redesign UI with deep black background and pulsing red accents
This commit is contained in:
Claude
2026-01-13 14:29:58 +00:00
parent fff1896848
commit 937fd103ab
2 changed files with 213 additions and 152 deletions

View File

@@ -160,27 +160,27 @@ addNetworkHandler("ModMenu:TeleportToPlayer", function(client, targetId) {
addNetworkHandler("ModMenu:GetPlayers", function(client) {
let clients = getClients();
let playerList = [];
let playerNames = "";
let playerIds = "";
console.log("[ModMenu] Getting players, found " + clients.length + " clients");
for (let i = 0; i < clients.length; i++) {
let c = clients[i];
// Skip the requesting player (optional - include self for testing)
// if (c.index === client.index) continue;
// Only add players with valid data
if (c && c.name) {
playerList.push({
id: c.index,
name: c.name || ("Player " + c.index)
});
if (playerNames.length > 0) {
playerNames += "|";
playerIds += "|";
}
playerNames += c.name;
playerIds += c.index;
console.log("[ModMenu] Added player: " + c.name + " (ID: " + c.index + ")");
}
}
console.log("[ModMenu] Sending " + playerList.length + " players to " + client.name);
triggerNetworkEvent("ModMenu:PlayerList", client, playerList);
console.log("[ModMenu] Sending players to " + client.name + ": " + playerNames);
// Send as separate strings instead of array
triggerNetworkEvent("ModMenu:PlayerList", client, playerNames, playerIds);
});
// ============================================================================