CustomModelData Items in skript

  • 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 community!

    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!

GamingJack3019

New Member
Dec 10, 2023
6
0
1
I wanna do an Menu with CustomModelData Slots like this, i have already made it but i use for this variables and i will do this without variables i do this
set {item} to player's tool
Set slot 1 of {gui} to {item} named "&f}

But i will do this like this

set slot 1 of {gui} to book named "&f" with CustomModelData 1
or something like this

Can somebody help me
2024-01-10_20.29.58.png
 
I don't understand the issue, using the parser the code below didnt generate any errors


Code:
function openMenu(p: player, i: item):
    set metadata tag "inventory" of {_p} to chest inventory named "Inventory"
    set slot 1 of metadata tag "inventory" of {_p} to {_i} with custom model data 4
    open (metadata tag "inventory" of {_p}) to {_p}
command /menu:
    trigger:
        openMenu(player, (player's tool))