Justin Knight Posted October 24, 2014 Author Share Posted October 24, 2014 How can I put a timer on the chat box so you have to wait 1-2 seconds before chatting? Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 24, 2014 Share Posted October 24, 2014 You could timestamp the messages being thrown into the server and check if it's from the same person if so, check if the past message was more than 2 seconds ago, if so, proceed. It's all a server edit(unless you want to show the timestamps on the client then you'd just send the time sent along with the message), so it shouldn't be too hard to figure out :P Link to comment Share on other sites More sharing options...
Justin Knight Posted October 26, 2014 Author Share Posted October 26, 2014 I was hopping I could stop the user from sending a chat on the client side so the server wouldn't even have to worry about it. Is there a way to use the chat bubble to stop flooding? I know that sounds weird but is there a simple if statement I could use to check and see if the user still has a chat bubble before allowing them to chat? I'm still trying to figure vb6 out here. Link to comment Share on other sites More sharing options...
Growlith1223 Posted October 26, 2014 Share Posted October 26, 2014 I believe there is, never really used the chatbubble system so i can't really tell ya m8 Link to comment Share on other sites More sharing options...
abhi2011 Posted October 26, 2014 Share Posted October 26, 2014 > I was hopping I could stop the user from sending a chat on the client side so the server wouldn't even have to worry about it. Is there a way to use the chat bubble to stop flooding? I know that sounds weird but is there a simple if statement I could use to check and see if the user still has a chat bubble before allowing them to chat? I'm still trying to figure vb6 out here.When client receives a chat msg/chat bubble packet then check on which player the chat msg is on. If that index = cur player index then set a global variable to true. Then when you try to send a message then check if that global variable is true. If true then don't send new chat packet to server. If false then send the chat packet to server. Link to comment Share on other sites More sharing options...
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