list tab in command /skr

This commit is contained in:
Mylloon 2021-06-28 21:50:46 +02:00
parent 53aa9b1854
commit c5c3134b56
6 changed files with 42 additions and 1 deletions

View file

@ -1,3 +1,9 @@
# named with a 0 at the begining to be sure he is load first
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
function option(option: text) :: text: # options
if {_option} is "serverName":
set {_resultat} to "Serveur d'Anri"
@ -10,3 +16,9 @@ function sendToOperators(player: player, message: text): # envoie message aux op
if loop-player is a op:
if loop-player is not {_player}:
send {_message} to loop-player
function ScriptList(addRemove: text, list: text):
if {_addRemove} is "add":
add {_list} to {scripts::*}
if {_addRemove} is "remove":
remove {_list} from {scripts::*}

View file

@ -1,3 +1,8 @@
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
on chat: # chat
cancel event
if {nick.%uuid of player%} is set:

View file

@ -5,6 +5,11 @@ options:
Z1: -312.5
Z2: -304.5
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
command deacoudre [<text>]: # lancement de la partie
executable by: players
description: Lance une partie de dé à coudre.

View file

@ -1,3 +1,8 @@
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
command sethome [<text>]: # défni un home
executable by: players
description: Défini un point de téléportation.

11
main.sk
View file

@ -1,3 +1,8 @@
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
command skr [<text>]: # reload skript
executable by: players, console
description: Reload de skripts.
@ -5,9 +10,13 @@ command skr [<text>]: # reload skript
if arg-1 is set:
execute player command "sk reload %arg-1%"
else if arg-1 isn't set:
execute player command "sk reload functions" # pour être sûr que functions est bien chargé en premier
execute player command "sk reload scripts"
on tab complete for "skr": # autocompletion des homes
set tab completions for position 1 to the first element of {scripts::*}
loop {scripts::*}:
add loop-value to tab completions
command broadcast [<text>]: # annonce
executable by: players, console
aliases: bc

View file

@ -1,6 +1,11 @@
options:
pasDePartie: "&4Aucune partie est en cours."
on load:
ScriptList("add", script)
on unload:
ScriptList("remove", script)
command party [<player>] [<text>]: # commande party
executable by: players
description: Regarde le nombre de joueur dans une partie ou invite un joueur dans ta partie.