So i want to recreate the freind or foe series SB747,Ibalisticsquid ETC But I dont know how to setup a pvp on and off timer thing i want it so pvp will randomly go on for like 15 mins then off then randomly come back on again plus i want a timer to pop up on top of the hotbar when pvp comes on?
First run these two commands in the chat to set things up
/team add Players
/scoreboard objectives add PVP dummy
/scoreboard objectives add hidden dummy
/scoreboard players set 0 hidden 0
Next run these commands in their own repeating (purple) command blocks so they are constantly active
/team join Players @a
/scoreboard players remove count PVP 1
/execute as @a if score count PVP < 0 hidden run team modify Players friendlyFire false
/execute as @a if score count PVP > 0 hidden run team modify Players friendlyFire true
/execute as @a if score count PVP > 0 hidden run scoreboard objectives setdisplay sidebar PVP
/execute as @a if score count PVP < 0 hidden run scoreboard objectives setdisplay sidebar
Now have a normal command block with the command
/scoreboard players set count PVP 18000 -(The last number is about 15 minutes I think but you can change it to be bigger or smaller)
Whenever you want pvp enabled you simply have to power that command block, you could hook it up to a normal redstone clock or a button of some sort. The system will automatically count down then turn off pvp when it is done.
I hope this helps! Let me know if you need more assistance
So i want to recreate the freind or foe series SB747,Ibalisticsquid ETC But I dont know how to setup a pvp on and off timer thing i want it so pvp will randomly go on for like 15 mins then off then randomly come back on again plus i want a timer to pop up on top of the hotbar when pvp comes on?
Okay this can be done!
First run these two commands in the chat to set things up
/team add Players
/scoreboard objectives add PVP dummy
/scoreboard objectives add hidden dummy
/scoreboard players set 0 hidden 0
Next run these commands in their own repeating (purple) command blocks so they are constantly active
/team join Players @a
/scoreboard players remove count PVP 1
/execute as @a if score count PVP < 0 hidden run team modify Players friendlyFire false
/execute as @a if score count PVP > 0 hidden run team modify Players friendlyFire true
/execute as @a if score count PVP > 0 hidden run scoreboard objectives setdisplay sidebar PVP
/execute as @a if score count PVP < 0 hidden run scoreboard objectives setdisplay sidebar
Now have a normal command block with the command
/scoreboard players set count PVP 18000 -(The last number is about 15 minutes I think but you can change it to be bigger or smaller)
Whenever you want pvp enabled you simply have to power that command block, you could hook it up to a normal redstone clock or a button of some sort. The system will automatically count down then turn off pvp when it is done.
I hope this helps! Let me know if you need more assistance
Formerly Tpnoll
This is my new forum account, why did I change it? The world will never know.
Contact me at [email protected]
Oh yeah and run
/gamerule commandBlockOutput false
So your chat dosent get spammed
Formerly Tpnoll
This is my new forum account, why did I change it? The world will never know.
Contact me at [email protected]
ok i will try this also can you help me with comething else?