skriptMC/0functions.sk

25 lines
879 B
Text
Raw Normal View History

2021-06-28 21:50:46 +02:00
# named with a 0 at the begining to be sure he is load first
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
2021-06-28 12:04:45 +02:00
function option(option: text) :: text: # options
if {_option} is "serverName":
set {_resultat} to "Serveur d'Anri"
if {_option} is "errorMessage":
set {_resultat} to "&4Tu n'as pas la permission d'utiliser cette commande."
return {_resultat}
2021-06-28 12:04:45 +02:00
function sendToOperators(player: player, message: text): # envoie message aux opérateurs (exclu le player s'il est OP aussi)
loop all players:
if loop-player is a op:
if loop-player is not {_player}:
send {_message} to loop-player
2021-06-28 21:50:46 +02:00
function ScriptList(addRemove: text, list: text):
if {_addRemove} is "add":
add {_list} to {scripts::*}
if {_addRemove} is "remove":
remove {_list} from {scripts::*}