Block placing of player head with name

  • 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.

Nikola

Member
Jul 10, 2019
38
1
8
Serbia
Hi, I'm making custom food skript using heads (example: head looking like a Strawberry named "Strawberry"), and I need your help. I want to block placing of food heads, and I'm using this code:
Code:
on place:
    if event-block is head item:
        set {_name} to name of player's tool
        if "%{_name}%" is "&cStrawberry":
            cancel event
There is no error. I think that error is in 2nd line, invalid item name. Can someone help me make this skript work? Again, I want to block placing of a item. Thank you all!
 
Code:
on place of player skull:
    if player's tool's name is "&cStrawberry":
        cancel event
 
Last edited:
Code:
on place of player skull:
    if player's tool's name is "&cStrawberry":
        cancel event

don't forget about: player wall skull

on place of player skull:

Only detects with floor placements

Code:
on place of player skull or player wall skull:
    if player's tool's name is "&cStrawberry":
        cancel event
 
Thanks, but it still doesn't work. Using @Lego_freak1999's code gives me error in the picture, and @Goose's code gives me no errors, but still placing on the floor isn't blocked.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    130 KB · Views: 204
I haven't updated it because some very important features for my skripts were changed in never ones..

Yeah i feel u but u should update and fix those things with the new syntaxes. If u need any help with stuff not working after a update create a new help post or send me a dm. The longer u wait the more work it will be to update.
[doublepost=1584105961,1584104681][/doublepost]
Thanks, but it still doesn't work. Using @Lego_freak1999's code gives me error in the picture, and @Goose's code gives me no errors, but still placing on the floor isn't blocked.

and did Goose method also let u place it on wall or did it block that
 
Yeah i feel u but u should update and fix those things with the new syntaxes. If u need any help with stuff not working after a update create a new help post or send me a dm. The longer u wait the more work it will be to update.
[doublepost=1584105961,1584104681][/doublepost]

and did Goose method also let u place it on wall or did it block that
His method doesn't block anything, the one you've sent has error, skript doesn't recognize "player wall skull"
 
His method doesn't block anything, the one you've sent has error, skript doesn't recognize "player wall skull"

Yeah i looked at the alliases it seems to be messed up got to have a better look at it
[doublepost=1584146176,1584141091][/doublepost]
His method doesn't block anything, the one you've sent has error, skript doesn't recognize "player wall skull"

https://github.com/SkriptLang/skrip...60062ccaa618d20b356753#commitcomment-37821004
 
Status
Not open for further replies.