Paplo Posted June 21, 2013 Share Posted June 21, 2013 I want If the player says . To wait 3 seconds between each message . how i can do that? Link to comment
MIKI785 Posted June 21, 2013 Share Posted June 21, 2013 Read this: https://wiki.multitheftauto.com/wiki/OnPlayerCommand There is example that is what you want, just edit it. Link to comment
Paplo Posted June 21, 2013 Author Share Posted June 21, 2013 Read this: https://wiki.multitheftauto.com/wiki/OnPlayerCommandThere is example that is what you want, just edit it. thanks is working antiSpam = {} function antiChatSpam() if isTimer(antiSpam[source]) then cancelEvent() outputChatBox("wait 3 sc and say", source, 255, 255, 0,true) else antiSpam[source] = setTimer(function(source) antiSpam[source] = nil end, 3000, 1, source) end end addEventHandler("onPlayerChat", root, antiChatSpam) Anyone who needs code 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