Shadow Napisano 18 Lipca 2019 (edytowane) Zanim napiszecie, że to jest banalnie proste to przeczytajcie xD. Mam problem z tym pluginem BrumBrum mi go wysłał i tłumaczył jak coś dodać ale ja nie ogarniałem o co chodzi nie wiem o jaką pętle chodzi xD mam nadzieję, że ktoś pomoże Spoiler #pragma semicolon 1 public Plugin:myinfo = { name = "Disable Game Sounds", author = "Mitch", description = "Fix to the annoying round sounds, and death sounds", version = "1.3.1", url = "https://forums.alliedmods.net/showthread.php?t=???" }; public OnPluginStart() { CreateConVar("sm_disablegamesounds_version", "1.3.0", "DisableGameSounds Version", FCVAR_DONTRECORD|FCVAR_NOTIFY); HookEvent("round_poststart", Event_Standard); HookEvent("round_start", Event_Standard); HookEvent("round_end", Event_Standard); HookEvent("round_freeze_end", Event_Standard); HookEvent("teamplay_round_start", Event_Standard); HookEvent("player_death", Event_Player); HookEvent("player_spawn", Event_Player); } public Action:Event_Player(Handle:event, const String:name[], bool:dontBroadcast) { new client = (GetClientOfUserId(GetEventInt(event, "userid"))); ClientCommand(client, "playgamesound Music.StopAllMusic"); } public Action:Event_Standard(Handle:event, const String:name[], bool:dontBroadcast) { for(new i = 1; i <= MaxClients; i++) if(IsClientInGame(i)) ClientCommand(i, "playgamesound Music.StopAllMusic"); } Przepraszam ale mam downa xDD Edytowane 18 Lipca 2019 przez Shadow Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Mesharsky 1 Napisano 18 Lipca 2019 Pewnie chodziło mu o to ;p #pragma semicolon 1 public Plugin myinfo = { name = "Disable Game Sounds", author = "Mitch", description = "Fix to the annoying round sounds, and death sounds", version = "1.3.1", url = "https://forums.alliedmods.net/showthread.php?t=???" }; public void OnPluginStart() { CreateConVar("sm_disablegamesounds_version", "1.3.0", "DisableGameSounds Version", FCVAR_DONTRECORD|FCVAR_NOTIFY); HookEvent("round_poststart", Event_Standard); HookEvent("round_start", Event_Standard); HookEvent("round_end", Event_Standard); HookEvent("round_freeze_end", Event_Standard); HookEvent("teamplay_round_start", Event_Standard); HookEvent("player_death", Event_Player); HookEvent("player_spawn", Event_Player); } public Action Event_Player(Event hEvent, const char[] name, bool bDontBroadcast) { int client = (GetClientOfUserId(GetEventInt(hEvent, "userid"))); ClientCommand(client, "snd_playsounds Music.StopAllExceptMusic"); } public Action Event_Standard(Event hEvent, const char[] name, bool bDontBroadcast) { for(int i = 1; i <= MaxClients; i++) if(IsClientInGame(i)) StopMusic(i); } void StopMusic(int client) { if (!IsValidClient(client))return; ClientCommand(client, "snd_playsounds Music.StopAllExceptMusic"); } bool IsValidClient(int client) { if(client <= 0 || client > MaxClients || !IsClientInGame(client)) return false; return true; } Przez Brum Brum, 18 Lipca 2019 Tak, dokładnie o to mi chodziło :D Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Shadow 1 Napisano 18 Lipca 2019 choć działa z opóźnieniem to i tak dziękuję <3 Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach
Vasto_Lorde Napisano 18 Lipca 2019 Wiadomość wygenerowana automatycznie Temat został zamknięty. Powodem jest całkowite rozwiązanie problemu zawartego w temacie. Jeśli się z tym nie zgadzasz, zaraportuj ten post z prośbą o ponowne otwarcie i kontynuację dyskusji. Udostępnij tę odpowiedź Odnośnik do odpowiedzi Udostępnij na innych stronach