Skocz do zawartości
  • 0

Pozwolenie na broń


Kiler512
 Udostępnij

Pytanie

12 odpowiedzi na to pytanie

Rekomendowane odpowiedzi

  • 0
command /kupbron [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is true:
  			if player's balance >= 2500:
  				remove 2500 from player's balance
  				add potato named "&6Bron" to player
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Nie masz pozwolenia! /pozwolenie"
command /pozwolenie [<text>]:
  	trigger:
  		if player's balance >= 1000:
  			remove 1000 from player's balance
  			chance of 40%:
  				send "&6Zdales otrzymales pozwolenie!"
  				set {pozwolenie::%player%} to true
  			else:
  				send "&6OBLALES!"

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
25 minut temu, xAxee napisał:
command /kupbron [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is true:
  			if player's balance >= 2500:
  				remove 2500 from player's balance
  				add potato named "&6Bron" to player
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Nie masz pozwolenia! /pozwolenie"
command /pozwolenie [<text>]:
  	trigger:
  		if player's balance >= 1000:
  			remove 1000 from player's balance
  			chance of 40%:
  				send "&6Zdales otrzymales pozwolenie!"
  				set {pozwolenie::%player%} to true
  			else:
  				send "&6OBLALES!"

 

Dzięki wielkie, ale czy mógłbyś jeszcze dopisać, że jak już się raz zdało to żeby już nie dało się uzyć tej komendy tylko wyskakiwało coś typu "Masz juz pozwolenie na bron"

 ? :D

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
command /kupbron [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is true:
  			if player's balance >= 2500:
  				remove 2500 from player's balance
  				add potato named "&6Bron" to player
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Nie masz pozwolenia! /pozwolenie"
command /pozwolenie [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is false:
  			if player's balance >= 1000:
  				remove 1000 from player's balance
  				chance of 40%:
  					send "&6Zdales otrzymales pozwolenie!"
  					set {pozwolenie::%player%} to true
  				else:
  					send "&6OBLALES!"
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Zdales juz kiedys!"

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
Godzinę temu, xAxee napisał:
command /kupbron [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is true:
  			if player's balance >= 2500:
  				remove 2500 from player's balance
  				add potato named "&6Bron" to player
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Nie masz pozwolenia! /pozwolenie"
command /pozwolenie [<text>]:
  	trigger:
  		if {pozwolenie::%player%} is false:
  			if player's balance >= 1000:
  				remove 1000 from player's balance
  				chance of 40%:
  					send "&6Zdales otrzymales pozwolenie!"
  					set {pozwolenie::%player%} to true
  				else:
  					send "&6OBLALES!"
  			else:
  				send "&6Nie posiadasz kasy!"
  		else:
  			send "&6Zdales juz kiedys!"

 

Dzięki wielkie, jeszcze jedno pytanko :D Umiałbyś zrobić, że jak klika się na NPC o nazwie np. "&2Bronie" to otwiera sie gui z tym? 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
on npc right click:
	if name of event-entity is "&2Bronie":
		open chest with 1 rows named "&2Bronie" to player
		set player's current inventory's slot 0 to potato named "&6Bron" 
		set player's current inventory's slot 1 to paper named "&6Pozwolenie"
on inventory click:
	if inventory name of current inventory of player is "&2Bronie":
		if clicked slot is 0 or 1:
			close player's inventory
			if clicked slot is 0:
				execute player command "/bron"
			else:
				execute player command "/pozwolenie"

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
15 minut temu, xAxee napisał:
on npc right click:
	if name of event-entity is "&2Bronie":
		open chest with 1 rows named "&2Bronie" to player
		set player's current inventory's slot 0 to potato named "&6Bron" 
		set player's current inventory's slot 1 to paper named "&6Pozwolenie"
on inventory click:
	if inventory name of current inventory of player is "&2Bronie":
		if clicked slot is 0 or 1:
			close player's inventory
			if clicked slot is 0:
				execute player command "/bron"
			else:
				execute player command "/pozwolenie"

 

Jest jakiś błąd "Can't compare 'clicked slot' with an integer (nazwa.sk, line 29; if clicked slot is 0 or 1:') 

A jak klikam na NPC nie otwiera sie, może być to spowodowane tym błędem ? 

 

Odnośnik do komentarza
Udostępnij na innych stronach

  • 0
26 minut temu, Kiler512 napisał:

Jest jakiś błąd "Can't compare 'clicked slot' with an integer (nazwa.sk, line 29; if clicked slot is 0 or 1:') 

A jak klikam na NPC nie otwiera sie, może być to spowodowane tym błędem ? 

 

masz SkQuery?  zamień on right click... na on rightclick with entity

Odnośnik do komentarza
Udostępnij na innych stronach

Nieaktywny
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...