Solved How to give a player permission when righ-click on item?

  • Welcome to skUnity!

    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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

St4ckY_

New Member
Apr 22, 2020
7
0
1
22
So I have multiverseportals but to have access you need to be OP or you group should have "multiverse.portal.access.<portal name>". So how to make that if player right-click on specific item as example paper renamed to Snow Pass, get portal access for that portal? I found this:
on right click:
event-player's tool's name = "snow pass"
console command "<lp user %player% permission set multiverse.portal.access.snow1 true>"
But its not working when I press item called "snow pass" should I set specific item id?
I would love if someone do the script with the same details and paper renamed "Snow Pass"
Thanks a lot.
[doublepost=1587539868,1587537244][/doublepost]So I tried this script too but its not working:
on right click with paper:
event-player's tool's name = "Snow Pass"
wait 1 tick
console command "<say hi>"
[doublepost=1587543912][/doublepost]SOLVED:
on right click holding a paper:
if name of tool of player is "&bSnow Pass":
execute console command "lp user %player% permission set multiverse.portal.access.snow1"
remove 1 paper named "&bSnow Pass" with lore "&bRight click to apply the &b&lSnow Pass!" from player's inventory

command /snowpass:
permission: op
trigger:
add 1 paper named "&bSnow Pass" with lore "&bRight click to apply the &b&lSnow Pass!" to player's inventory
 
Last edited:
Status
Not open for further replies.