- Katılım
- 5 Şubat 2018
- Mesajlar
- 1.072
- Elmaslar
- 620
- Puanlar
- 16.230
- Yaş
- 21
- Minecraft
- Fhalinkz
Selam Millet!
Bugün sizlere skript ile cooldown yani zaman aralığı yaratmayı göstereceğim.
Basit bir cooldown örneği
Kılıca sağ tıklayınca bir ateş topu çıkar ve 15 saniye içinde tekrar kullanmaya çalışırsa oyuncuya şu kadar saniye süreniz kaldı der.
Kod:
on right-click with sword:
if {cooldown::%player%} isn't set:
set {cooldown::%player%} to now
if difference between {cooldown::%player%} and now > 15 seconds:
set {cooldown::%player%} to now
shoot a fireball with speed 4
else:
set {_n} to "%difference between 15 seconds and (difference between {cooldown::%player%} and now)%"
replace all "seconds" with "&fsaniye" in {_n}
show a action bar with "&aBu yetenegi &f%{_n}% &asonra tekrar kullanabilirsin" to player
Şimdi bunu komutlarla nasıl kullanabiliriz onu göstereceğim
/yemek yazınca size bir yemek verir ve 15 saniye içerisinde tekrar kullanmaya çalışırsanız komutu kullandırtmaz.
Kod:
command /yemek:
trigger:
if {yemek::cooldown::%player%} isn't set:
set {yemek::cooldown::%player%} to now
if difference between {yemek::cooldown::%player%} and now > 15 seconds:
set {yemek::cooldown::%player%} to now
give a steak to the player
else:
set {_süre} to "%difference between 15 seconds and (difference between {yemek::cooldown::%player%} and now)%"
replace all "seconds" with "&fsaniye" in {_süre}
show a action bar with "&aBu komudu &f%{_süre}% &asonra tekrar kullanabilirsin." to player
Evet, konumuzun sonuna geldik. Eğer rehberim işinize yaradıysa elmas vermeyi unutmayın.
Fikirleriniz benim için önemli. Bunları yorumlarda belirtirseniz çok mutlu olurum. iyi forumlar..