using function to send message to ops
This commit is contained in:
parent
ab971060ac
commit
36d3b70acf
1 changed files with 10 additions and 9 deletions
19
main.sk
19
main.sk
|
@ -1,6 +1,12 @@
|
||||||
options:
|
options:
|
||||||
errorMessage: "&4Tu n'as pas la permission d'utiliser cette commande."
|
errorMessage: "&4Tu n'as pas la permission d'utiliser cette commande."
|
||||||
|
|
||||||
|
function sendToOperators(player: player, message: text):
|
||||||
|
loop all players:
|
||||||
|
if loop-player is a op:
|
||||||
|
if loop-player is not {_player}:
|
||||||
|
send {_message} to loop-player
|
||||||
|
|
||||||
command skr [<text>]: # recharge ce skript
|
command skr [<text>]: # recharge ce skript
|
||||||
executable by: players, console
|
executable by: players, console
|
||||||
description: Reload de skripts.
|
description: Reload de skripts.
|
||||||
|
@ -171,10 +177,7 @@ command gmc [<player>]: # met un joueur en créatif
|
||||||
stop
|
stop
|
||||||
set gamemode of {_player} to creative
|
set gamemode of {_player} to creative
|
||||||
send "%player% a changé ton mode de jeu en créatif." to {_player}
|
send "%player% a changé ton mode de jeu en créatif." to {_player}
|
||||||
loop all players:
|
sendToOperators({_player}, "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en créatif.")
|
||||||
if loop-player is a op:
|
|
||||||
if loop-player is not {_player}:
|
|
||||||
send "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en créatif." to loop-player
|
|
||||||
else:
|
else:
|
||||||
send {@errorMessage}
|
send {@errorMessage}
|
||||||
|
|
||||||
|
@ -191,10 +194,7 @@ command gms [<player>]: # met un joueur en spectateur
|
||||||
stop
|
stop
|
||||||
set gamemode of {_player} to spectator
|
set gamemode of {_player} to spectator
|
||||||
send "%player% a changé ton mode de jeu en spectateur." to {_player}
|
send "%player% a changé ton mode de jeu en spectateur." to {_player}
|
||||||
loop all players:
|
sendToOperators({_player}, "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en spectateur.")
|
||||||
if loop-player is a op:
|
|
||||||
if loop-player is not {_player}:
|
|
||||||
send "&7&o%player%&7&o a changé le mode de jeu de %{_player}%&7&o en spectateur." to loop-player
|
|
||||||
else:
|
else:
|
||||||
send {@errorMessage}
|
send {@errorMessage}
|
||||||
|
|
||||||
|
@ -244,6 +244,7 @@ command killall: # tue toutes les entités
|
||||||
kill loop-entity
|
kill loop-entity
|
||||||
add 1 to {_count}
|
add 1 to {_count}
|
||||||
send "Tu as tué %{_count}% entités."
|
send "Tu as tué %{_count}% entités."
|
||||||
|
sendToOperators(player, "&7%{player}%&7 as tué %{_count}%&7 entités.")
|
||||||
else:
|
else:
|
||||||
send {@errorMessage}
|
send {@errorMessage}
|
||||||
|
|
||||||
|
@ -366,7 +367,7 @@ command deacoudre: # dé à coudre
|
||||||
|
|
||||||
every 0.5 second in "world": # dé à coudre
|
every 0.5 second in "world": # dé à coudre
|
||||||
loop all players:
|
loop all players:
|
||||||
if {thimble} is not true: # dé à coudre
|
if {thimble} is not true:
|
||||||
continue
|
continue
|
||||||
set action bar of loop-player to "&dEn partie de &lDé à coudre&r&d."
|
set action bar of loop-player to "&dEn partie de &lDé à coudre&r&d."
|
||||||
if block at loop-player is water:
|
if block at loop-player is water:
|
||||||
|
|
Loading…
Reference in a new issue