Sign in to follow this  
turbodymacz1337

Mute system help

Recommended Posts

Posted (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 by turbodymacz1337

Share this post


Link to post
setPlayerMuted
isPlayerMuted
onPlayerChat
cancelEvent 

For type 0 if local is default chat if not and is a costum command then not put the event 

  • Like 1

Share this post


Link to post
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.

  • Like 1

Share this post


Link to post

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.