Jump to content

gun skript


karlip_a

Recommended Posts

gun

 

command /gun:
	permission: op
	trigger:
		give a iron ingot named "&7Gun" to player
variables:
	{%player%.ammo} = 0
on right click:
	if name of player's held item is "&7Gun":
		add 1 to {ammo}
		if {ammo} is less than 21:
			shoot an arrow
		if {ammo} is more than 21:
			send "&4You dont have any ammo left!"
on right click:
	if name of player's held item is "&8AMMO":
		if {ammo} is more than 21:
			remove 1 arrow named "&8AMMO" from player
			set {ammo} to 0
command /AMMO:
	permission: op
	trigger:
		give a arrow named "&8AMMO" to player

 

Link to comment
Share on other sites

5 hours ago, karlip_a said:

gun

 

command /gun:
	permission: op
	trigger:
		give a iron ingot named "&7Gun" to player
variables:
	{%player%.ammo} = 0
on right click:
	if name of player's held item is "&7Gun":
		add 1 to {ammo}
		if {ammo} is less than 21:
			shoot an arrow
		if {ammo} is more than 21:
			send "&4You dont have any ammo left!"
on right click:
	if name of player's held item is "&8AMMO":
		if {ammo} is more than 21:
			remove 1 arrow named "&8AMMO" from player
			set {ammo} to 0
command /AMMO:
	permission: op
	trigger:
		give a arrow named "&8AMMO" to player

 

Ammo system doesn't seem to work. It doesn't consume or take ammo

Edited by ItsKirby

2021-06-09_20_22_08.jpg.422c39613f8b72de894e5ec1f3377dca.jpg

Yo who actually reads these

[Vip] - 12/29/2020
[Pro] - 1/25/2022
 

 

 

Link to comment
Share on other sites

  • 8 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...