I'm making a economy system and I need help with subtract quantity from message
CODE:
Sorry for my english, I'm from Spain.
CODE:
Code:
command /retirar:
trigger:
set {retirar.%player%} to true
message "&6&lBirdMC &8» &c¡Ingresa la cantidad que quieras retirar!"
on any move:
if {retirar.%player%} is true:
teleport player to location of player
message "&6&lBirdMC &8» &c¡Ingresa la cantidad que quieras retirar!"
on chat:
if {retirar.%player%} is true:
if "%message%" contains "a" or "b" or "c" or "d" or "e" or "f" or "g" or "h" or "i" or "j" or "k" or "l" or "m" or "n" or "ñ" or "o" or "p" or "q" or "r" or "s" or "t" or "u" or "v" or "x" or "y" or "z" or "?" or "¿" or "!" or "¡" or "<" or ">" or "." or "," or ":" or ";" or "@" or """" or "%%":
message "&6&lBirdMC &8» &c¡Introduce un número!"
cancel event
stop
if {dinerobanco.%player%} is 0:
cancel event
message "&6&lBirdMC &8» &c¡No tienes suficiente dinero en el banco!"
set {retirar.%player%} to false
stop
else:
cancel event
message "&6&lBirdMC &8» &e¡Has decidido retirar &a%message%€&e!"
set {retirar.%player%} to false
subtract "%message%" from {dinerobanco.%player%}
add "%message%" to {dineroefectivo.%player%}
Sorry for my english, I'm from Spain.