Already solved.
Hi. I'm trying to write a guns script. The gun would fire an arrow but I don't want people to be able to pick up those arrows. Is there a way to do that?
Nevermind. I found a solution.
Hi. I'm trying to write a guns script. The gun would fire an arrow but I don't want people to be able to pick up those arrows. Is there a way to do that?
Code:
if player has 1 {@pistolammo}:
shoot arrow from the player at speed 2
#I want to make it shoot an arrow that can't be picked up
remove 1 {@pistolammo} from player
Nevermind. I found a solution.
Code:
on right click with iron hoe:
name of player's held item is "§rPistol §7(Right Click)"
cancel event
if player does not have 1 {@pistolammo}:
set action bar of player to "§4You do not have ammo!"
if player has 1 {@pistolammo}:
shoot an arrow from the player at speed 4
set {_arrow} to last shot arrow
remove 1 {@pistolammo} from player
add "{pickup:0b}" to the nbt of {_arrow}
Last edited: