ice_brasil Posted July 9, 2013 Posted July 9, 2013 I want a player only possar use the button "t" 5 in 5 seconds If he tries to use the button nothing happens, it would be for the player not being able to chat only every 5 seconds function () setTimer(function(player) bindKey(player, "t", "down", ) end,5000, 1,source) What did this wrong?
Castillo Posted July 9, 2013 Posted July 9, 2013 That makes no sense, you must use the event "onPlayerChat" with cancelEvent to cancel the message if 5 seconds didn't yet pass, and you can use getTickCount to compare how long did it pass since last chat.
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