Ridwan RF Posted March 19, 2014 Share Posted March 19, 2014 (edited) Hello guys, It's me your pupil, Im here to ask some help on my script that I made for auto-muting players when they are flooding chat, the problem is when I flood the chat, yes I did get "You're now muted for 2 mins reason (Flooding)" on the outputchatbox, but I didnt get muted here's pic, and here's script antiSpam = {} function antiChatSpam() if isTimer(antiSpam[source]) then cancelEvent() outputChatBox("#ffffff"..getPlayerName(source).." #ff0000has been muted 2 mins Reason:[Flooding/Spamming] !", getRootElement(), 255, 255, 0,true) setPlayerMuted(source, true) setTimer ( autoUnmute, 120000, 1, source) else antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 1000, 1, source) end end addEventHandler("onPlayerChat", root, antiChatSpam) function autoUnmute ( player ) if ( isElement ( player ) and isPlayerMuted ( player ) ) then setPlayerMuted ( player, false ) outputChatBox ("#FFFFFF"..getPlayerName ( player ).." #bbfa00has been unmute by Console! Dont Try It #f5f5f5[Again]",getRootElement(), 255, 255, 0,true ) end end Thanks for reading, I hope it can be solved. Edited March 19, 2014 by Guest Link to comment
iPrestege Posted March 19, 2014 Share Posted March 19, 2014 The script is added to a group that have a permission to mute a player? Link to comment
cheez3d Posted March 19, 2014 Share Posted March 19, 2014 Give the resource ACL privileges. Link to comment
Ridwan RF Posted March 19, 2014 Author Share Posted March 19, 2014 Oh, Thanks for helping. It solved. Thanks 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