Yetkililer Skripti


# Copyright © 2015-2019 LifeMCServer

command /yetkililer [<text>] [<offlineplayer>] [<text>]:
	usage: &c/yetkililer yardim
	trigger:
		if arg-1 is not set:
			if arg-2 is not set:
				if arg-3 is not set:
					if size of {yetkililer::*} is between 0 and 9:
						wait 4 ticks
						set {_x} to -1
						open chest with 1 rows named "&6&lYetkililer" to player
						loop {yetkililer::*}:
							add 1 to {_x}
							if loop-value is online:
								format slot {_x} of player with loop-value's skull named "&a%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &aAcik" to close
							else:
								format slot {_x} of player with loop-value's skull named "&c%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &cKapali" to close
					else if size of {yetkililer::*} is between 10 and 18:
						wait 4 ticks
						set {_x} to -1
						open chest with 2 rows named "&6&lYetkililer" to player
						loop {yetkililer::*}:
							add 1 to {_x}
							if loop-value is online:
								format slot {_x} of player with loop-value's skull named "&a%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &aAcik" to close
							else:
								format slot {_x} of player with loop-value's skull named "&c%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &cKapali" to close
					else if size of {yetkililer::*} is between 18 and 27:
						wait 4 ticks
						set {_x} to -1
						open chest with 3 rows named "&6&lYetkililer" to player
						loop {yetkililer::*}:
							add 1 to {_x}
							if loop-value is online:
								format slot {_x} of player with loop-value's skull named "&a%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &aAcik" to close
							else:
								format slot {_x} of player with loop-value's skull named "&c%loop-value%" with lore "&2Yetki&8: %{%loop-value%.yetki}% &r| &2Durum: &cKapali" to close
					else if size of {yetkililer::*} is greater than 27:
						send "&cBu sunucuda gereginden fazla yetkili var. Lutfen &b/yetkililer reset &cyazarak hepsini silip tekrar ekleyin!" to player
		else if arg-1 is "yardim":
			if arg-2 is not set:
				if arg-3 is not set:
					send "&6&l&m-----------------------------------------" to player
					send "" to player
					send "&bYetkililer Skripti - by @LifeMCServer"
					send "&f/yetkililer &6Yetkilileri gosterir."
					send "&f/yetkililer list &6Eklenmis olan yetkilileri gosterir."
					send "&f/yetkililer ekle <oyuncuadi> <grup> &6Yetkiliyi ekler."
					send "&f/yetkililer sil <oyuncuadi> &6Yetkiliyi siler."
					send "&f/yetkililer reset &6Tum yetkilileri temizler."
					send "" to player
					send "&6&l&m-----------------------------------------" to player
		else if arg-1 is "ekle":
			if player have permission "op":
				if arg-2 is set:
					if arg-3 is set:
						add offlineplayer-arg to {yetkililer::*}
						set {%arg-2%.yetki} to "%colored arg-3%"
						send "&a%arg-2% &6Adli oyuncu &abasariyla &c%colored arg-3% &6olarak eklendi."
		else if arg-1 is "sil":
			if player have permission "op":
				if arg-2 is set:
					remove offlineplayer-arg from {yetkililer::*}
					delete {%arg-2%.yetki}
					send "&a%arg-2% &cAdli oyuncu &abasariyla &csilindi!"
		else if arg-1 is "reset":
			if player have permission "op":
				if arg-2 is not set:
					if arg-3 is not set:
						loop {yetkililer::*}:
							delete {%loop-value%.yetki}
						wait 1 tick
						delete {yetkililer::*}
						send "&cTum yetkililer &abasariyla &csilindi!"
		else if arg-1 is "list":
			if arg-2 is not set:
				if arg-3 is not set:
					send "&6&lYetkililer"
					send ""
					send "%{yetkililer::*}%"
		else:
			send "&6&l&m-----------------------------------------" to player	
			send "" to player
			send "&bYetkililer Skripti - by @LifeMCServer"
			send "&f/yetkililer &6Yetkilileri gosterir."
			send "&f/yetkililer ekle <oyuncuadi> <grup> &6Yetkiliyi ekler."
			send "&f/yetkililer sil <oyuncuadi> &6Yetkiliyi siler."
			send "&f/yetkililer reset &6Tum yetkilileri temizler."
			send "" to player
			send "&6&l&m-----------------------------------------" to player