Operatory: Różnice pomiędzy wersjami
Przejdź do nawigacji
Przejdź do wyszukiwania
m (a nie wiem) |
m (→Operatory relacyjne) |
||
| Linia 1: | Linia 1: | ||
'''Operatory''' służą albo do porównywania liczb(relacyjne) lub do urozmaicania [[warunki|warunków]]. | '''Operatory''' służą albo do porównywania liczb(relacyjne) lub do urozmaicania [[warunki|warunków]]. | ||
| − | == Operatory relacyjne == | + | ==Operatory relacyjne== |
| − | Operatory | + | Operatory relacyjne służą do porównania liczb. |
| − | * '''<''' lub '''is less than''' - mniejsze niż | + | |
| − | * '''>''' lub '''is greater than''' - większe niż | + | *'''<''' lub '''is less than''' - mniejsze niż |
| − | * '''=''' lub '''is equal to''' - równe | + | *'''>''' lub '''is greater than''' - większe niż |
| − | * '''>=''' lub '''is greater or equal to''' - większe lub równe | + | *'''=''' lub '''is equal to''' - równe |
| − | * '''<=''' lub '''is less or equal to''' - mniejsze lub równe | + | *'''>=''' lub '''is greater or equal to''' - większe lub równe |
| − | * '''!= | !>= | !<''' lub isn't - nie jest | + | *'''<=''' lub '''is less or equal to''' - mniejsze lub równe |
| + | *'''!= | !>= | !<''' lub isn't - nie jest | ||
Przykład: | Przykład: | ||
| − | + | ||
| + | command /donate: | ||
trigger: | trigger: | ||
if {kasa::%player%} >= 5000: | if {kasa::%player%} >= 5000: | ||
remove 5000 from {kasa::%player%} | remove 5000 from {kasa::%player%} | ||
| − | + | send "Dziękujemy za donate!" | |
| − | == Operatory logiczne == | + | ==Operatory logiczne== |
Te operatory służą do jego urozmaicenia oraz skrócenia kodu | Te operatory służą do jego urozmaicenia oraz skrócenia kodu | ||
| − | * '''or''' - lub | + | |
| − | * '''and''' - i | + | *'''or''' - lub |
| − | * '''not''' - nie jest | + | *'''and''' - i |
| + | *'''not''' - nie jest | ||
Przykład: | Przykład: | ||
Wersja z 17:47, 27 paź 2019
Operatory służą albo do porównywania liczb(relacyjne) lub do urozmaicania warunków.
Operatory relacyjne
Operatory relacyjne służą do porównania liczb.
- < lub is less than - mniejsze niż
- > lub is greater than - większe niż
- = lub is equal to - równe
- >= lub is greater or equal to - większe lub równe
- <= lub is less or equal to - mniejsze lub równe
- != | !>= | !< lub isn't - nie jest
Przykład:
command /donate:
trigger:
if {kasa::%player%} >= 5000:
remove 5000 from {kasa::%player%}
send "Dziękujemy za donate!"
Operatory logiczne
Te operatory służą do jego urozmaicenia oraz skrócenia kodu
- or - lub
- and - i
- not - nie jest
Przykład:
command /ciastko [<player>]:
trigger:
if arg-1 is not online:
send "Ten gracz nie jest online"
else:
if arg-1 is "Libter" or "bvcz":
send "+1"