Hi, i have question - how i can write Player´s name to value in YAML file?
Here is my Skript
But i want that here will be write
player´s name - so i want to it will execute command "give %player% 297 1"
How I can set %player% here?
This is default command that will be execute
P.S: sorry for my English, I am from the Czech Republic I hope that you understand me
[doublepost=1498374848,1498339041][/doublepost]Solved, I used
And now I can use <player> in config
Here is my Skript
Code:
on load:
if folder "plugins/Arcades/" doesn't exists:
create folder "plugins/Arcades"
if file "plugins/Arcades/config.yml" doesn't exists:
create file "plugins/Arcades/config.yml"
set "Minigames.sheeps" to "true" in yaml file "plugins/Arcades/config.yml"
set "Minigames.eggcatch" to "true" in yaml file "plugins/Arcades/config.yml"
set "Minigames.dropfood" to "true" in yaml file "plugins/Arcades/config.yml"
set "Minigames.buildit" to "true" in yaml file "plugins/Arcades/config.yml"
set "Options.prefix" to "&0&l[&b&lArcades&0&l]" in yaml file "plugins/Arcades/config.yml"
if folder "plugins/Arcades/arenas" doesn't exists:
create folder "plugins/Arcades/arenas"
if folder "plugins/Arcades/lang" doesn't exists:
create folder "plugins/Arcades/lang"
if file "plugins/Arcades/lang/en.yml" doesn't exists:
create file "plugins/Arcades/lang/en.yml"
set "game_is_full" to "The game is full!" in yaml file "plugins/Arcades/lang/en.yml"
set "game_is_already_running" to "Game is already running!" in yaml file "plugins/Arcades/lang/en.yml"
set "game_is_disabled" to "Game is disabled!" in yaml file "plugins/Arcades/lang/en.yml"
set {gamerunning} to value "game_is_already_running" get of "plugins/Arcades/lang/en.yml"
set {gamedisabled} to value "game_is_disabled" get of "plugins/Arcades/lang/en.yml"
set {gameisfull} to value "game_is_full" get of "plugins/Arcades/lang/en.yml"
if folder "plugins/Arcades/minigames" doesn't exists:
create folder "plugins/Arcades/minigames"
if file "plugins/Arcades/minigames/sheeps.yml" doesn't exists:
create file "plugins/Arcades/minigames/sheeps.yml"
set "Options.mission" to "drop" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.amount" to "30" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.give" to "30" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.time" to "60" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.players_killed" to "2" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.maxhp" to "5" in yaml file "plugins/Arcades/minigames/dropfood.yml"
set "Options.command" to "/give 297 1" in yaml file "plugins/Arcades/minigames/dropfood.yml"
if file "plugins/Arcades/minigames/eggcatch.yml" doesn't exists:
create file "plugins/Arcades/minigames/eggcatch.yml"
if file "plugins/Arcades/minigames/dropfood.yml" doesn't exists:
create file "plugins/Arcades/minigames/dropfood.yml"
if file "plugins/Arcades/minigames/buildit.yml" doesn't exists:
create file "plugins/Arcades/minigames/buildit.yml"
Code:
set "Options.command" to "/give 297 1" in yaml file "plugins/Arcades/minigames/dropfood.yml"
How I can set %player% here?
This is default command that will be execute
P.S: sorry for my English, I am from the Czech Republic I hope that you understand me
[doublepost=1498374848,1498339041][/doublepost]Solved, I used
Code:
on join:
set {_join} to {playerjoin}
replace all "<player>" with "%player%" in {_join}
set the join message to "%{_join}%"