Mefisto_PL Posted November 6, 2013 Share Posted November 6, 2013 Hi ! I want to make anty spam when poll ( from votemanager ) is running, but idk how.. I tried with "onPollStarting" + "onPlayerChat" events, but it doesn't good. Please help me numbers = {"1","2","3","4","5","6","7","8","9"} function antiVoteSpam ( msg, msgType ) for i, v in pairs ( numbers ) do if string.find ( msg, v ) then cancelEvent() end end end addEvent("onPollStarting",true) addEventHandler("onPollStarting", root, antiVoteSpam) addEventHandler("onPlayerChat", root, antiVoteSpam) Link to comment
TAPL Posted November 7, 2013 Share Posted November 7, 2013 numbers = {"1","2","3","4","5","6","7","8","9"} function antiVoteSpam ( msg, msgType ) if isPollActive then for i, v in pairs ( numbers ) do if string.find ( msg, v ) then cancelEvent() end end end end addEventHandler("onPlayerChat", root, antiVoteSpam) addEventHandler("onPollStart", root, function() isPollActive = true end) addEventHandler("onPollEnd", root, function() isPollActive = false end) addEventHandler("onPollStop", root, function() isPollActive = false end) Link to comment
Mefisto_PL Posted November 7, 2013 Author Share Posted November 7, 2013 Working, thanks <3 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