turbodymacz1337 Posted July 18, 2019 Share Posted July 18, 2019 (edited) I would like to ask for a help about mute system that uses command to mute a player in local chat only. Plenty of clanwar servers are using it, I will give you an example of the script. It works like normal mute system but you do it like; /lmute <playername> This command disable local chat for you and you will be able to use ONLY teamchat. Edited July 18, 2019 by turbodymacz1337 Link to comment
Dimos7 Posted July 18, 2019 Share Posted July 18, 2019 setPlayerMuted isPlayerMuted onPlayerChat cancelEvent For type 0 if local is default chat if not and is a costum command then not put the event 1 Link to comment
HassoN Posted July 18, 2019 Share Posted July 18, 2019 6 hours ago, turbodymacz1337 said: I would like to ask for a help about mute system that uses command to mute a player in local chat only. Plenty of clanwar servers are using it, I will give you an example of the script. It works like normal mute system but you do it like; /lmute <playername> This command disable local chat for you and you will be able to use ONLY teamchat. You may use: addCommandHandler -- to make the command like you've said 'lmute'. getPlayerFromName -- get the player's name from what you've typed in the command. setElementData / setAccountData -- use either of them to give data to the player you want to mute. Then you should modify your local chat script and add a check, it should be something like: if getElementData(...) then return false end 32 minutes ago, Dimos7 said: setPlayerMuted isPlayerMuted onPlayerChat cancelEvent For type 0 if local is default chat if not and is a costum command then not put the event since MTA doesn't have a local chat system he's talking obviously about a custom chat system. 6 hours ago, turbodymacz1337 said: I would like to ask for a help about mute system that uses command to mute a player in local chat only. Plenty of clanwar servers are using it, I will give you an example of the script. It works like normal mute system but you do it like; /lmute <playername> This command disable local chat for you and you will be able to use ONLY teamchat. You may use: addCommandHandler -- to make the command like you've said 'lmute'. getPlayerFromName -- get the player's name from what you've typed in the command. setElementData / setAccountData -- use either of them to give data to the player you want to mute. Then you should modify your local chat script and add a check, it should be something like: if getElementData(...) then return false end 32 minutes ago, Dimos7 said: setPlayerMuted isPlayerMuted onPlayerChat cancelEvent For type 0 if local is default chat if not and is a costum command then not put the event since MTA doesn't have a local chat system he's talking obviously about a custom chat system. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now