• Problem with Player:SetMuted( Player player ) or another..
    0 replies, posted
[lua]function MuteTheNonAdmins( pl ) for _, pl in pairs(player.GetAll()) do if pl:IsAdmin() then pl:SetMuted() end end end[/lua] I don't really understand how SetMuted works, but is there another way ( The way Assmod or ULX does it ) to mute players? I will try to look into the Assmod plugin for it. EDIT: [lua] function PLUGIN.IsPlayerVoiceMuted( PLAYER ) for k, v in pairs( player.GetAll() ) do if v and v:GetNWBool( "PlayerMuted" ) then v:ConCommand( "-voicerecord " ) end end end[/lua] Snippet from the Assmod plugin, very useless to spam -voicerecord in someones console. I don't even know if Garry's FCVAR_SERVER_CAN_EXECUTE allows it anymore. Hmm I guess I'll try that for now, up until I figure out how to use SetMuted correctly. Nope doesn't allow it anymore.
Sorry, you need to Log In to post a reply to this thread.