I am trying to write a code to transfer gold nuggets between players.
I am trying to write a code to transfer gold nuggets between players
I tried to enter a code like this through the code, but it didn't work:
give arg-1 gold nuggets to arg-2
I had to stop at such a solution. What can be done since this decision is clearly bad?
make console execute command "give %arg-2% gold_nugget %arg-1%"
make console execute command "clear %player% gold_nugget %arg-1%"
Full code:
command /pay <number> <player>:
trigger:
if number of gold nuggets in the player's inventory >= arg-1:
if distance between player and arg-2 is smaller than 5:
send "§9Вы передали %{rpname.%arg-2%}% %arg-1% §9золотых"
send "§9 %{rpname.%player%}% передал вам %arg-1% §9золотых" to arg-2
make console execute command "give %arg-2% gold_nugget %arg-1%"
make console execute command "clear %player% gold_nugget %arg-1%"
else:
send "§4Игрок слишком далеко!"
else:
send "§4Недостаточно золотых!"
I am trying to write a code to transfer gold nuggets between players
I tried to enter a code like this through the code, but it didn't work:
give arg-1 gold nuggets to arg-2
I had to stop at such a solution. What can be done since this decision is clearly bad?
make console execute command "give %arg-2% gold_nugget %arg-1%"
make console execute command "clear %player% gold_nugget %arg-1%"
Full code:
command /pay <number> <player>:
trigger:
if number of gold nuggets in the player's inventory >= arg-1:
if distance between player and arg-2 is smaller than 5:
send "§9Вы передали %{rpname.%arg-2%}% %arg-1% §9золотых"
send "§9 %{rpname.%player%}% передал вам %arg-1% §9золотых" to arg-2
make console execute command "give %arg-2% gold_nugget %arg-1%"
make console execute command "clear %player% gold_nugget %arg-1%"
else:
send "§4Игрок слишком далеко!"
else:
send "§4Недостаточно золотых!"