• mute player if they die
    5 replies, posted
Hello, I was wondering if there was a way to keep the player from using the mic if they die, cant seem to figure out a way to make this happen. thanks!
You can use the hook: [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerDeath]Gamemode.PlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to set a value to false, and use gm_sourcenet and the ProcessVoiceData hook to return false and prevent the users voice from being handled, and then set that one value you set in the beginning to true with a [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawn]Gamemode.PlayerSpawn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook.
[QUOTE=Helix Alioth;23417825]You can use the hook: [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerDeath]Gamemode.PlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to set a value to false, and use gm_sourcenet and the ProcessVoiceData hook to return false and prevent the users voice from being handled, and then set that one value you set in the beginning to true with a [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawn]Gamemode.PlayerSpawn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook.[/QUOTE] Why use a module to mute someone? This does the job just fine: [url]http://wiki.garrysmod.com/?title=Gamemode.PlayerCanHearPlayersVoice[/url]
[QUOTE=Helix Alioth;23417825]You can use the hook: [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerDeath]Gamemode.PlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] to set a value to false, and use gm_sourcenet and the ProcessVoiceData hook to return false and prevent the users voice from being handled, and then set that one value you set in the beginning to true with a [b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawn]Gamemode.PlayerSpawn [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook.[/QUOTE] I doubt that the OP understands what any of this means because I sure as hell don't.
Do what FPtje said.
Thanks, That worked but now I have a new issue. I am trying to script a fuel consumption mod and I dont know how i can get the player's vehicle speed without getting everyones. Any ideas?
Sorry, you need to Log In to post a reply to this thread.