Jump to content

Message does not send


pnguin

Recommended Posts

Hi there! I tried to make a /vote system no errors displayed but if someone already voted and he tries to vote aigan it does not send a message saying "You already voted!"

heres the code

command /vote [<text>]:
	trigger:
		if arg is set:
			if {vote.%player's uuid%} is not set:
				if arg-1 is "mark":
					add 1 to {markvotes::*}
					broadcast "&3&o%executor%&9 voted for mark! &7(&3##%size of {markvotes::*}%&7)"
					set {vote.%player's uuid%} to true
				else:
					if {vote.%player's uuid%} is true:
						send "&cYou already voted!" to executor

 

I used to play Minehut I guess?
Yeah, I still watch the forums for some reason. (15/5/2023)
Link to comment
Share on other sites

Try this (just spacing issues btw):

command /vote [<text>]:
	trigger:
		if arg is set:
			if {vote::%player's uuid%} is not set:
				if arg-1 is "mark":
					add 1 to {markvotes::*}
					broadcast "&3&o%executor%&9 voted for mark! &7(&3##%size of {markvotes::*}%&7)"
					set {vote::%player's uuid%} to true
			else:
				if {vote::%player's uuid%} is true:
					send "&cYou already voted!"

btw, when you are doing things like {vote::%player's uuid%} you should use "::" instead of "." as it will be easier to control it

If I have helped you out in your post or you liked what I posted, please upvote and react to my post! It helps me a lot!

Some Minehut Links:

Server Rules • Staff Applications • News & Updates • Reports • Appeals


Minehut: VIP (07/04/2021 --> Current)
Elestra/Versa Realms: Manager (12/04/2021 --> Current)

If you have any questions contact me!
My Discord: BanditEagle#2481
My Spigot Profile: https://www.spigotmc.org/members/banditeagle.935281/
My IGN: BanditEagle

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...