Im trying to make some simple /addwin and /remwin cmds and I'm new to skript. but I can't get this to work. when I add a win it will show I have 1 win (even when I do it multiple times) and when I use /remwin It will skip 0 and show I have -1 win.
here is my skript:
here is my skript:
Code:
command /addwin <offlineplayer>:
permission: event.wins.addwin
trigger:
set {_plr} to arg-1
set {_uuid} to uuid of {_plr}
if {_data::players::%{_uuid}%::wins} is not set:
set {_data::players::%{_uuid}%::wins} to 0
add 1 to {_data::players::%{_uuid}%::wins}
send "&aAdded a win for %{_plr}%! Total wins: %{_data::players::%{_uuid}%::wins}%" to player
broadcast "&c%{_plr}%&b now has %{_data::players::%{_uuid}%::wins}% wins!"
command /remwin <offlineplayer>:
permission: event.wins.remwin
trigger:
set {_plr} to arg-1
set {_uuid} to uuid of {_plr}
if {_data::players::%{_uuid}%::wins} is not set:
set {_data::players::%{_uuid}%::wins} to 0
remove 1 from {_data::players::%{_uuid}%::wins}
send "&aRemoved a win for %{_plr}%! Total wins: %{_data::players::%{_uuid}%::wins}%" to player
broadcast "&c%{_plr}%&b now has %{_data::players::%{_uuid}%::wins}% wins!"