Columner Posted January 27, 2020 Share Posted January 27, 2020 So I would like to get a toggle for my Skript but I haven't figured it out yet. Basically I would like a command, for example /toggleitem, to toggle the items on/off. So you get items every 30 seconds, but when you activate the command, you don't get items anymore. My Skript: every 30 seconds: add 1 of (random item out of all items) to inventory of all players Joined September 2019 [VIP] since June 29th, 2020 Link to comment Share on other sites More sharing options...
nicholxs Posted January 31, 2020 Share Posted January 31, 2020 Just use a boolean for example: every 30 seconds: loop all players: if {giveitems::%loop-player%} is true: #do stuff You can make a command to set {giveitems::%loop-player%} to true/false. There are other ways to do this but this one is pretty simple and easy to understand First Joined: July 2015VIP: January 2020Jr.Mod: 1st April 2020Mod: 16th July 2020Info:~ Skript Developer ~ Discord: @nicholxs#0001 ~ Previous names: Nichxlxs, Deterno, iHaveSkills, Retrical Link to comment Share on other sites More sharing options...
grover19711 Posted April 18, 2020 Share Posted April 18, 2020 i want to know how you made it work in minecraft Link to comment Share on other sites More sharing options...
_iZ_ Posted April 20, 2020 Share Posted April 20, 2020 I'm gonna one-up Nichxlxs XD every 30 seconds in world "world": if {randomItems} is not set: add 1 of (random item out of all items) to inventory of all players command /toggle: permission: op permission message: &4Insufficient permission trigger: if {randomItems} is not set: message "&7Random items &cdisabled" set {randomItems} to false else: message "&7Random items &aenabled" delete {randomItems} 1 » IGN: _iZ_ « » Joined: 12/18/2016 « » VIP: 1/13/2018 « » Helper: 1/29/2021 « » [<3]: 5/8/2021 « » Skript dev « » Discord: iZz#0420 « React to this if I was helpful, found this interesting, or you're just nice Link to comment Share on other sites More sharing options...
thetacovacuum Posted April 20, 2020 Share Posted April 20, 2020 every 1 second: give (random element out of all items) to all players where [{itemsExempt::%input's uuid%} is not set] command /command: trigger: if {itemsExept::%player's uuid%} is set: delete {itemsExempt::%player's uuid%} # no unnecessary memory usage send "&aEnabled bla bla" else: send "&cDisabled bla bla" set {itemsExempt::%player's uuid%} to true this is how i'd do it Link to comment Share on other sites More sharing options...
CursedWarLock Posted April 29, 2020 Share Posted April 29, 2020 what if i dont want it to be everyone only who does /toggle? Link to comment Share on other sites More sharing options...
Migins Posted April 29, 2020 Share Posted April 29, 2020 5 hours ago, CursedWarLock said: what if i dont want it to be everyone only who does /toggle? add a permission to the command command /toggle: permission: skript.toggle trigger: @MikeTheAngel requesting lock - necroposting, post was made in January. ► Support July 29, 2020 → November 3, 2020 ► Helper November 3, 2020 → February 22, 2021 ► Moderator February 22, 2021 → May 17, 2021 ► I might not always respond to forum dms, however I am always contactable on discord (mig#0069) Link to comment Share on other sites More sharing options...
Feirdo Posted September 21, 2020 Share Posted September 21, 2020 @_iz_How do i make the permissions @a? Link to comment Share on other sites More sharing options...
Tres Posted September 21, 2020 Share Posted September 21, 2020 3 hours ago, Feirdo said: @_iz_How do i make the permissions @a? You make the permissions @a by removing the permission from the skript. Topic locked due to necroposting. Link to comment Share on other sites More sharing options...
Recommended Posts