Closed DennisWillers closed 3 years ago
Consider adding siteid = 115
under version
, if you plan to upload this to Openplanet.nl. (115 is the next file ID, as shown here.)
Your Main.as
contains preprocessor directives that Openplanet will throw warnings about, plus your Main()
function does nothing, so you could just remove that entire file.
Instead of resetting color in the menu with \\$fff
, please use \\$z
instead for consistency.
Also, the default texts are cool looking, BUT could be annoying for people in the server if everyone has this plugin and presses those buttons. It would be nice to change the defaults to something less obnoxious (eg. remove $o
and $s
, $i
, etc. so only the colors remain), and let people configure to be obnoxious by themselves if they want to.
You should also add a time-out to the buttons so that people don't spam the chat full with gg's. Maybe make it so only 1 message per second can be sent?
Changed everything with one different: Only the button that the last time is pressed, can not be clicked for one second. Of course you can switch spamming between buttons. But if a spammer wants to spam, they will find a way. I used now the main method for reset a button, that was clicked one second ago.
Edit: Deleted not necessary print statements ChatButtonBar.zip
Why not make it a global timer? I'm not too worried about people "who want to spam", I'm more worried about literally everyone who gets their hands on this plug-in trying & starting to spam.
There are use cases in which two different buttons want to be pressed one after the other. For example Hi and GlHf, or GG and BB. To wait a second to press a button can feel very long. Especially if you have not much time between races like in 3 vs 3. But you don´t need to spam the same button always, that´s why I implement that the same button can not pressed again in less than one second.
But even a second doesn't stop people from trying every button when they have the plugin installed for the first time. So I think, I would just implement something, that just makes the plugin a bit more annoying for the user as it should be. And if we are honest, this plugin will not become as popular as your dashboard ;).
If you tell me you'll sign the plugin only if I add this global one second timer, then I'll do it. But I prefer the solution with just not pressing the same button in less than a second.
Good point, I didn't think of that. Just checked the code, you could still really quickly spam by pressing 1 button, then the other, then the first one, etc. Might not be a huge problem though.
this plugin will not become as popular
Well, who knows 🙃 this seems like a really cool plugin to feature as well, and I don't really want to end up in a situation where a ton of people have this plugin and the chat becomes super obnoxious. Seems like a tough responsibility to have to me 😅
But with the plugin manager, updating plugins has become super easy anyway, so it can always be updated in the future.
Here you go! 👍 ChatButtonBar.zip
Thanks! :)
Good point, I didn't think of that. Just checked the code, you could still really quickly spam by pressing 1 button, then the other, then the first one, etc. Might not be a huge problem
If you want I can try to fix this bug after work too. Should be possible with a list. Don´t want that you have a bad feeling about it. 👀
That would be great!
Should be fixed now :) Hopefully you see this message, even if this issue is closed :P
The logic in checkIfButtonsCanNotBeClicked
seems a bit weird to me, it probably won't work the way you expect, but it's good enough. Thanks!
The behavior is as expected :D
For your information:
The array buttonCanNotBePressed
is filled by the method checkIfButtonCanPressed
in Chat.as
. checkIfButtonCanPressed
also iterrates over the array and check if the button, which want to be pressed, is not in the arraylist. The method checkIfButtonsCanNotBeClicked
in the Main.as
checks after every yield()
if the array is not empty. If something is in the array the method resetButtonCanBeClicked
set a sleep timer of a second and then delete the element at the index position of the array.
Plugin description
Description
glhf, gg or nt looks boring. With the Chat-Button-Bar you can bring color into the game. With a single button click you can send predefined chat texts. And if the predefined buttons are not enough, you can create your own standard texts.
Features
Limits
Did you provide a
perms
meta value or a#perms
preprocessor option?no ( I think so :D )
Did you use
Permissions.as
?yes
Attach your plugin
ChatButtonBar.zip