Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.
If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!
Now, what are you waiting for? Join the community now!
You can always check out skUnity Downloads for downloads and any other information about Skript!
[on] (hotbar|held [(item|slot)]|inventory slot) (switch|change):
[on] [player['s]] (tool|item held|held item) chang(e|ing):
Along with those, also use the inventory click event. You can detect a specific slot and cancel the eventThe event called when a player switches slots by scrolling or pressing the keypads to move inventory items.code_language.skript:[on] (hotbar|held [(item|slot)]|inventory slot) (switch|change):
Called whenever a player changes his held item by selecting a different slot (e.g. the keys 1-9 or the mouse wheel), not by dropping or replacing the item in the current slot.code_language.skript:[on] [player['s]] (tool|item held|held item) chang(e|ing):
I never tried to see if cancel event works :\
Thanks but I dont understand how I put that in to my skriptAlong with those, also use the inventory click event. You can detect a specific slot and cancel the event
Have you looked at the examples in the documentation?Thanks but I dont understand how I put that in to my skript
on such and such event:
cancel event
Thanks but I dont understand this part [on] (hotbar|held [(item|slot)]|inventory slot) (switch|change):Have you looked at the examples in the documentation?
Cancelling an event is very simple:
code_language.skript:on such and such event: cancel event
That's an event for when an item is switched on the hotbar with another item. So if they swapped an item from their hotbar to say, the slot you want to lock in their inventory.Thanks but I dont understand this part [on] (hotbar|held [(item|slot)]|inventory slot) (switch|change):
on hotbar inventory slot switch:
if event-slot is 15:
cancel event
Thanks, there is an error tho (only 1) http://prntscr.com/hvkxlxAlong with those, also use the inventory click event. You can detect a specific slot and cancel the event