diff --git a/ReallifeGamemode.Client/Voice/main.ts b/ReallifeGamemode.Client/Voice/main.ts index ac4ad7aa..b3dd6ce1 100644 --- a/ReallifeGamemode.Client/Voice/main.ts +++ b/ReallifeGamemode.Client/Voice/main.ts @@ -1,5 +1,3 @@ -import playerInteraction from "Interaction/playerinteraction"; - /** * @overview Life of German Reallife - Voice Main main.ts * @author Zeuto @@ -8,6 +6,7 @@ import playerInteraction from "Interaction/playerinteraction"; export default function voice() { + let dictLoaded = false; const Use3d = true; const UseAutoVolume = false; const MaxRange = 30.0; @@ -18,10 +17,27 @@ export default function voice() { mp.keys.bind(0x73, false, _ => { mp.voiceChat.muted = !mp.voiceChat.muted; - - mp.game.graphics.notify("[" + new Date().toLocaleTimeString() + "] Voice-Chat: " + (!mp.voiceChat.muted ? '~g~aktiviert' : '~r~deaktiviert')); }); + let gX = 0.5; + let gY = 0.5; + + mp.events.add('render', () => { + + if (!dictLoaded) { + mp.game.graphics.requestStreamedTextureDict("voiceimages", true); + dictLoaded = true; + } + + var { x, y } = mp.game.graphics.getScreenActiveResolution(0, 0); + + if (!mp.voiceChat.muted) { + mp.game.graphics.drawSprite("voiceimages", "microphone-black-shape", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 0, 102, 0, 255); + } else { + mp.game.graphics.drawSprite("voiceimages", "microphone-off", 0.165, 0.952, 0.015, 0.015 * (x / y), 0, 255, 51, 51, 255); + } + }) + function addListener(target: PlayerMp) { listeners.push(target); diff --git a/ReallifeGamemode.Client/dlcpacks/voiceimages/dlc.rpf b/ReallifeGamemode.Client/dlcpacks/voiceimages/dlc.rpf new file mode 100644 index 00000000..97ce0303 Binary files /dev/null and b/ReallifeGamemode.Client/dlcpacks/voiceimages/dlc.rpf differ diff --git a/ReallifeGamemode.Server/Commands/AdminCommands.cs b/ReallifeGamemode.Server/Commands/AdminCommands.cs index fbacb9ad..e31b542f 100644 --- a/ReallifeGamemode.Server/Commands/AdminCommands.cs +++ b/ReallifeGamemode.Server/Commands/AdminCommands.cs @@ -109,6 +109,7 @@ namespace ReallifeGamemode.Server.Commands { SaveManager.SaveAllOnSave(); } + #endregion #region Support [Command("o", "~m~Benutzung: ~s~/o [Nachricht]", GreedyArg = true)]