Jump to content

Voteday skript help.


Mrbizarre

Recommended Posts

On 12/5/2021 at 12:45 PM, Mrbizarre said:

So i wanted to make a voteday skript, but my brain is like so confused. I tried looking up vote day system's i tried making one, but nothing i did worked? If yall had one that would be great.

so you vote for the time to be day? Try this (untested)

 

options:
	mainworld: world

command /voteday:
	trigger:
		if time in world "{@mainworld}" is not between 18:00 and 6:00:
			send "&cYou can't vote for day time during the day!" to player
			stop
		if {DayVoted::*} contains player:
			send "&cYou already voted for day time tonight!" to player
			stop
		add player to {DayVoted::*}
		send "&6You voted for the time to change to day!" to player
		set {_playersneeded} to number of all players / 2
		replace all ".5" with "" in {_playersneeded}
		set {_playersvoted} to size of {DayVoted::*}
		broadcast "&6%player% voted for the time to change to day! (%{_playersvoted}%&6/%{_playersneeded}%)"
		if {_playersvoted} >= {_playersneeded}:
			clear {DayVoted::*}
			set time in world {@mainworld} to 6:01
			broadcast "&eThe time has been set to day!"

at time 6:01 in world {@mainworld}:
	clear {DayVoted::*}

 

 

 

image.png.bc433d6489d70ad831075fe76809b993.png
 

Owner of Lifestealed, Labs, Encore, UNOfficially and Observed
 

OG [VIP] 12/26/20 - 10/27/2021
OG [PRO] 12/27/21 - 11/18/2022
OG [LEGEND] 11/18/2022 - 3/14/2023
[DEFAULT] 3/14/2023 - 5/8/2024

[MOD] 5/8/2024 - Present

 

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...